Initial import of the asterisk-addons 1.2.0 beta ebuild.
authorStefan Knoblich <stkn@gentoo.org>
Sat, 27 Aug 2005 18:19:39 +0000 (18:19 +0000)
committerStefan Knoblich <stkn@gentoo.org>
Sat, 27 Aug 2005 18:19:39 +0000 (18:19 +0000)
Package-Manager: portage-2.0.51.22-r2

net-misc/asterisk-addons/ChangeLog [new file with mode: 0644]
net-misc/asterisk-addons/Manifest [new file with mode: 0644]
net-misc/asterisk-addons/asterisk-addons-1.2.0_beta1.ebuild [new file with mode: 0644]
net-misc/asterisk-addons/files/asterisk-addons-1.2.0_beta1-gentoo-base.diff [new file with mode: 0644]
net-misc/asterisk-addons/files/asterisk-addons-1.2.0_beta1-gentoo-ooh323c.diff [new file with mode: 0644]
net-misc/asterisk-addons/files/asterisk-addons-1.2.0_beta1-gentoo-res_sqlite3.diff [new file with mode: 0644]
net-misc/asterisk-addons/files/digest-asterisk-addons-1.2.0_beta1 [new file with mode: 0644]
net-misc/asterisk-addons/metadata.xml [new file with mode: 0644]

diff --git a/net-misc/asterisk-addons/ChangeLog b/net-misc/asterisk-addons/ChangeLog
new file mode 100644 (file)
index 0000000..c4f9b1d
--- /dev/null
@@ -0,0 +1,14 @@
+# ChangeLog for net-misc/asterisk-addons
+# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk-addons/ChangeLog,v 1.1 2005/08/27 18:19:39 stkn Exp $
+
+*asterisk-addons-1.2.0_beta1 (27 Aug 2005)
+
+  27 Aug 2005; <stkn@gentoo.org>
+  +files/asterisk-addons-1.2.0_beta1-gentoo-base.diff,
+  +files/asterisk-addons-1.2.0_beta1-gentoo-ooh323c.diff,
+  +files/asterisk-addons-1.2.0_beta1-gentoo-res_sqlite3.diff, +metadata.xml,
+  +asterisk-addons-1.2.0_beta1.ebuild:
+  Initial import. Asterisk-addons have been splitted out of the main asterisk
+  ebuild starting with 1.2.0_beta1.
+
diff --git a/net-misc/asterisk-addons/Manifest b/net-misc/asterisk-addons/Manifest
new file mode 100644 (file)
index 0000000..4dd0367
--- /dev/null
@@ -0,0 +1,7 @@
+MD5 d2645797f0e8dba6b3d9ce97069449de asterisk-addons-1.2.0_beta1.ebuild 3289
+MD5 44cf247f04cc83413fcb40ed59d0847a metadata.xml 248
+MD5 b0cad4bcd307955165d180155132414f ChangeLog 640
+MD5 d9614f6289a7b8edda8045241187e138 files/asterisk-addons-1.2.0_beta1-gentoo-base.diff 1852
+MD5 00cfba5fc6217bd223624a267cd55a13 files/digest-asterisk-addons-1.2.0_beta1 144
+MD5 727a0a2296bb763d31542e624c6ca224 files/asterisk-addons-1.2.0_beta1-gentoo-ooh323c.diff 1282
+MD5 67d6be912d6a4cbc6250339885e778a0 files/asterisk-addons-1.2.0_beta1-gentoo-res_sqlite3.diff 1930
diff --git a/net-misc/asterisk-addons/asterisk-addons-1.2.0_beta1.ebuild b/net-misc/asterisk-addons/asterisk-addons-1.2.0_beta1.ebuild
new file mode 100644 (file)
index 0000000..26f7543
--- /dev/null
@@ -0,0 +1,156 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk-addons/asterisk-addons-1.2.0_beta1.ebuild,v 1.1 2005/08/27 18:19:39 stkn Exp $
+
+IUSE="mysql sqlite h323"
+
+inherit eutils flag-o-matic
+
+## TODO:
+#
+# - cleanup
+#
+
+#AST_PATCHES_PV="1.2.0_pre-1.0"
+SQLITE_PV="3.2.1"
+
+MY_P="${P/_/-}"
+
+DESCRIPTION="Additional Plugins for Asterisk"
+HOMEPAGE="http://www.asterisk.org/"
+SRC_URI="http://ftp.digium.com/pub/asterisk/${MY_P}.tar.gz
+        sqlite? ( http://www.sqlite.org/sqlite-${SQLITE_PV}.tar.gz )"
+
+S=${WORKDIR}/${MY_P}
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~x86"
+
+DEPEND="
+       >=net-misc/asterisk-1.2.0_beta1
+       mysql? ( dev-db/mysql )"
+
+pkg_setup() {
+       local n dosleep=0
+       einfo "Running pre-flight checks..."
+
+       if use h323 && built_with_use net-misc/asterisk h323; then
+               echo
+               ewarn "h323: Emerging ${PN} with the h323 flag enabled will overwrite asterisk's chan_h323.so!"
+               ewarn "h323: Be sure to upgrade ${ROOT}etc/asterisk/h323.conf afterwards!"
+               dosleep=1
+       fi
+
+       echo
+       if [[ $dosleep -gt 0 ]]; then
+               ebeep
+               n=10
+               while [[ $n -gt 0 ]]; do
+                       echo -en "  Waiting $n seconds...\r"
+                       sleep 1
+                       (( n-- ))
+               done
+       fi
+}
+
+src_unpack() {
+       unpack ${A}
+       cd ${S}
+
+       #
+       # gentoo patchset
+       #
+       epatch ${FILESDIR}/${P}-gentoo-base.diff
+       epatch ${FILESDIR}/${P}-gentoo-res_sqlite3.diff
+       epatch ${FILESDIR}/${P}-gentoo-ooh323c.diff
+
+       # patch sqlite
+       if use sqlite; then
+               cd ${WORKDIR}/sqlite-${SQLITE_PV}
+
+               epatch ${FILESDIR}/sqlite-${SQLITE_PV}-data-corruption.patch
+               epunt_cxx
+       fi
+
+       # rebuild ooh323c configure
+       if use h323; then
+               cd ${S}/asterisk-ooh323c
+               libtoolize --copy --force || die "libtoolize failed"
+       fi
+}
+
+src_compile() {
+       append-flags -fPIC
+
+       emake -j1 || die "Make failed"
+
+       if use sqlite; then
+               cd ${WORKDIR}/sqlite-${SQLITE_PV}
+               econf --enable-threadsafe || die ""
+               emake || die ""
+
+               cd ${S}
+               emake -j1 -C res_sqlite3 \
+                       SQLITEDIR=${WORKDIR}/sqlite-${SQLITE_PV} || die "Make res_sqlite failed"
+       fi
+
+       if use h323; then
+               cd ${S}/asterisk-ooh323c
+               econf || die "econf failed"
+               emake || die "emake failed"
+       fi
+}
+
+src_install() {
+       make DESTDIR=${D} install || die "Make install failed"
+
+       if use sqlite; then
+               make -C res_sqlite3 \
+                       DESTDIR=${D} install || die "Make install res_sqlite3 failed"
+       fi
+
+       if use h323; then
+               make -C asterisk-ooh323c \
+                       DESTDIR=${D} install || die "Make instal ooh323c failed"
+       fi
+
+       # install standard docs...
+       dodoc README
+       dodoc doc/cdr_mysql.txt
+
+       insinto /usr/share/doc/${PF}
+       doins configs/*.sample
+
+       if use sqlite; then
+               cd ${S}/res_sqlite3
+               docinto res_sqlite3
+               dodoc README
+               insinto /usr/share/doc/${PF}/res_sqlite3
+               doins res_sqlite.conf dialplan.sql
+               keepdir /var/lib/asterisk/sqlite
+       fi
+
+       if use h323; then
+               cd ${S}/asterisk-ooh323c
+               docinto chan_ooh323c
+               dodoc AUTHORS INSTALL NEWS README COPYING ChangeLog
+               dodoc h323.conf.sample extensions.conf.sample
+
+               insinto /etc/asterisk
+               newins h323.conf.sample h323.conf
+       fi
+
+       einfo "Fixing permissions"
+       chown -R root:asterisk ${D}etc/asterisk
+       chmod -R u=rwX,g=rX,o= ${D}etc/asterisk
+
+       chown -R asterisk:asterisk ${D}var/lib/asterisk
+       chmod -R u=rwX,g=rX,o=     ${D}var/lib/asterisk
+}
+
+#pkg_postinst() {
+#      #
+#      # Announcements, warnings, reminders...
+#      #
+#}
diff --git a/net-misc/asterisk-addons/files/asterisk-addons-1.2.0_beta1-gentoo-base.diff b/net-misc/asterisk-addons/files/asterisk-addons-1.2.0_beta1-gentoo-base.diff
new file mode 100644 (file)
index 0000000..25d432c
--- /dev/null
@@ -0,0 +1,40 @@
+--- asterisk-addons/Makefile.orig      2005-07-30 21:04:44.000000000 +0200
++++ asterisk-addons/Makefile   2005-07-30 21:06:06.000000000 +0200
+@@ -16,7 +16,6 @@
+ MODS=format_mp3/format_mp3.so app_saycountpl.so
+ 
+ CFLAGS+=-fPIC
+-CFLAGS+=-I../asterisk
+ CFLAGS+=-D_GNU_SOURCE
+ 
+ INSTALL=install
+@@ -27,17 +26,11 @@
+ #
+ # MySQL stuff...  Autoconf anyone??
+ #
+-MODS+=$(shell if [ -d /usr/local/mysql/include ] || [ -d /usr/include/mysql ] || [ -d /usr/local/include/mysql ] || [ -d /opt/mysql/include ]; then echo "cdr_addon_mysql.so app_addon_sql_mysql.so res_config_mysql.so"; fi)
+-CFLAGS+=$(shell if [ -d /usr/local/mysql/include ]; then echo "-I/usr/local/mysql/include"; fi)
++MODS+=$(shell if [ -d /usr/include/mysql ]; then echo "cdr_addon_mysql.so app_addon_sql_mysql.so res_config_mysql.so"; fi)
+ CFLAGS+=$(shell if [ -d /usr/include/mysql ]; then echo "-I/usr/include/mysql"; fi)
+-CFLAGS+=$(shell if [ -d /usr/local/include/mysql ]; then echo "-I/usr/local/include/mysql"; fi)
+-CFLAGS+=$(shell if [ -d /opt/mysql/include/mysql ]; then echo "-I/opt/mysql/include/mysql"; fi)
+ MLFLAGS=
+-MLFLAGS+=$(shell if [ -d /usr/lib/mysql ]; then echo "-L/usr/lib/mysql"; fi)
+ MLFLAGS+=$(shell if [ -d /usr/lib64/mysql ]; then echo "-L/usr/lib64/mysql"; fi)
+-MLFLAGS+=$(shell if [ -d /usr/local/mysql/lib ]; then echo "-L/usr/local/mysql/lib"; fi)
+-MLFLAGS+=$(shell if [ -d /usr/local/lib/mysql ]; then echo "-L/usr/local/lib/mysql"; fi)
+-MLFLAGS+=$(shell if [ -d /opt/mysql/lib/mysql ]; then echo "-L/opt/mysql/lib/mysql"; fi)
++MLFLAGS+=$(shell if [ -d /usr/lib/mysql ]; then echo "-L/usr/lib/mysql"; fi)
+ 
+ OSARCH=$(shell uname -s)
+ 
+@@ -55,7 +48,8 @@
+ format_mp3/format_mp3.so:
+       $(MAKE) -C format_mp3 all
+ 
+-install: all
++install:
++      $(INSTALL) -m 755 -d $(DESTDIR)$(MODULES_DIR)
+       for x in $(MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
+ 
+ clean:
diff --git a/net-misc/asterisk-addons/files/asterisk-addons-1.2.0_beta1-gentoo-ooh323c.diff b/net-misc/asterisk-addons/files/asterisk-addons-1.2.0_beta1-gentoo-ooh323c.diff
new file mode 100644 (file)
index 0000000..460cbee
--- /dev/null
@@ -0,0 +1,30 @@
+--- asterisk-addons/asterisk-ooh323c/Makefile.am.orig  2005-08-24 23:19:04.000000000 +0200
++++ asterisk-addons/asterisk-ooh323c/Makefile.am       2005-08-24 23:20:08.000000000 +0200
+@@ -19,10 +19,10 @@
+       $(MAKE) "CFLAGS = -g -DGNU -D_GNU_SOURCE -D_REENTRANT" all
+ 
+ install: 
+-      cp .libs/libchan_h323.so.1.0.1 /usr/lib/asterisk/modules/chan_h323.so
++      cp .libs/libchan_h323.so.1.0.1 $(DESTDIR)/usr/lib/asterisk/modules/chan_h323.so
+ 
+ sample:
+-      cp h323.conf.sample /etc/asterisk/h323.conf
++      cp h323.conf.sample $(DESTDIR)/etc/asterisk/h323.conf
+ 
+ 
+ EXTRA_DIST = extensions.conf h323.conf README COPYING
+--- asterisk-addons/asterisk-ooh323c/Makefile.in.orig  2005-08-24 23:19:12.000000000 +0200
++++ asterisk-addons/asterisk-ooh323c/Makefile.in       2005-08-24 23:19:53.000000000 +0200
+@@ -1214,10 +1214,10 @@
+       $(MAKE) "CFLAGS = -g -DGNU -D_GNU_SOURCE -D_REENTRANT" all
+ 
+ install: 
+-      cp .libs/libchan_h323.so.1.0.1 /usr/lib/asterisk/modules/chan_h323.so
++      cp .libs/libchan_h323.so.1.0.1 $(DESTDIR)/usr/lib/asterisk/modules/chan_h323.so
+ 
+ sample:
+-      cp h323.conf.sample /etc/asterisk/h323.conf
++      cp h323.conf.sample $(DESTDIR)/etc/asterisk/h323.conf
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+ .NOEXPORT:
diff --git a/net-misc/asterisk-addons/files/asterisk-addons-1.2.0_beta1-gentoo-res_sqlite3.diff b/net-misc/asterisk-addons/files/asterisk-addons-1.2.0_beta1-gentoo-res_sqlite3.diff
new file mode 100644 (file)
index 0000000..5d077b4
--- /dev/null
@@ -0,0 +1,61 @@
+--- asterisk-addons/res_sqlite3/Makefile.orig  2005-08-04 23:27:22.000000000 +0200
++++ asterisk-addons/res_sqlite3/Makefile       2005-08-04 23:37:38.000000000 +0200
+@@ -1,44 +1,24 @@
+-ASTDIR=/usr/src/asterisk
+-ASTXS=$(ASTDIR)/contrib/scripts/astxs
+-ASTSQLITE=/var/lib/asterisk/sqlite
+-SQLITE2=/usr/local/bin/sqlite
+-SQLITE3=/usr/local/bin/sqlite3
+-SQLITEBASE=http://www.sqlite.org/
+-SQLITEFILE=sqlite-3.2.1
++SQLITEDIR=
++DESTDIR=
+ 
+-CFLAGS=-I$(SQLITEFILE) -I $(SQLITEFILE)/src
++ASTCFG=/usr/bin/asterisk-config
++ASTSQLITE=/var/lib/asterisk/sqlite
++ASTMODDIR=/usr/lib/asterisk/modules
+ 
+-all: .sqlite res_sqlite.so
++CFLAGS=-I$(SQLITEDIR) -I$(SQLITEDIR)/src
+ 
++all: res_sqlite.so
+ 
+ res_sqlite.so:
+-      ASTSRC=$(ASTDIR) $(ASTXS) "-append=CFLAGS:$(CFLAGS)" "-append=EXTOBJ:./$(SQLITEFILE)/.libs/libsqlite3.a" res_sqlite.c
+-
+-.sqlite:
+-      wget $(SQLITEBASE)/$(SQLITEFILE).tar.gz
+-      tar -zxvf $(SQLITEFILE).tar.gz
+-      cd $(SQLITEFILE) && test -f ./config.status || ./configure --enable-threadsafe
+-      cd $(SQLITEFILE) && make
+-      touch .sqlite
++      $(CC) $(shell $(ASTCFG) --cflags) $(CFLAGS) -fPIC -c -o res_sqlite.o res_sqlite.c
++      $(CC) $(shell $(ASTCFG) --solink) -o res_sqlite.so res_sqlite.o $(SQLITEDIR)/.libs/libsqlite3.a
+ 
+ clean:
+       /bin/rm -f *.o *.so *~
+ 
+-distclean: clean
+-      /bin/rm -fr .sqlite sqlite $(SQLITEFILE) $(SQLITEFILE).tar.gz
+-
+ install:
+-      $(ASTXS) -autoload -install res_sqlite.so
+-      /bin/mkdir -p $(ASTSQLITE)
+-      if [ ! -f  /etc/asterisk/res_sqlite.conf ] ; then /bin/cp res_sqlite.conf /etc/asterisk; fi
+-
+-sqlite_install: .sqlite
+-      cd sqlite && make install
+-      test -f /etc/ld.so.conf && ldconfig
+-
+-upgrade: $(SQLITE2) $(SQLITE3)
+-      @echo upgrading database files 
+-      @upgrade.sh $(ASTSQLITE) $(SQLITE2) $(SQLITE3)
+-
+-
+-
++      /bin/mkdir -p $(DESTDIR)$(ASTSQLITE)
++      /bin/mkdir -p $(DESTDIR)$(ASTMODDIR)
++      /bin/mkdir -p $(DESTDIR)/etc/asterisk
++      /bin/cp res_sqlite.so $(DESTDIR)$(ASTMODDIR)
++      /bin/cp res_sqlite.conf $(DESTDIR)/etc/asterisk
diff --git a/net-misc/asterisk-addons/files/digest-asterisk-addons-1.2.0_beta1 b/net-misc/asterisk-addons/files/digest-asterisk-addons-1.2.0_beta1
new file mode 100644 (file)
index 0000000..aef5625
--- /dev/null
@@ -0,0 +1,2 @@
+MD5 e0d42e4b0b1b7276bd7c760e5e5c437a asterisk-addons-1.2.0-beta1.tar.gz 740760
+MD5 ccf3831c2f67452d444c5e5e2c7ca6f0 sqlite-3.2.1.tar.gz 1351842
diff --git a/net-misc/asterisk-addons/metadata.xml b/net-misc/asterisk-addons/metadata.xml
new file mode 100644 (file)
index 0000000..10f27dc
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>voip</herd>
+<maintainer>
+  <email>stkn@gentoo.org</email>
+  <name>Stefan Knoblich</name>
+</maintainer>
+</pkgmetadata>