wok-current view bristuff/receipt @ rev 1819
Add: dzen2
author | Mallory MOLLO <mallory@sweetpeople.org> |
---|---|
date | Fri Dec 05 21:28:29 2008 +0100 (2008-12-05) |
parents | 14119a3f80ea |
children | c1610baa4cf4 |
line source
1 #!/bin/sh
2 # SliTaz package receipt.
4 PACKAGE="bristuff"
5 VERSION="0.4.0-test6-xr1"
6 CATEGORY="meta"
7 SHORT_DESC="ISDN patches for Asterisk/Zaptel."
8 MAINTAINER="pascal.bellard@slitaz.org"
9 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WEB_SITE="http://www.junghanns.net/"
11 WGET_URL="http://updates.xorcom.com/astribank/bristuff/1.4/$TARBALL"
12 BUILD_DEPENDS="openssl-dev ncurses-dev zlib-dev patch libogg-dev libvorbis-dev \
13 curl-dev newt-dev libusb-dev sqlite-dev alsa-lib-dev fxload speex-dev \
14 iksemel-dev mysql-dev glibc-dev spandsp-dev tiff-dev radiusclient-ng-dev \
15 mysql libmysqlclient cmake postgresql postgresql-dev libpostgresqlclient \
16 libtool unixODBC-dev libunixODBC nbs nbs-dev mISDNuser-dev mISDNuser \
17 gnutls-dev"
18 DEPENDS="asterisk asterisk-sound zaptel nbs mISDNuser"
20 #TODO: net-snmp(-dev) vpb-driver(-dev)
21 #Asterisk: libopenh323-dev (Not so nice addon), libsnmp-dev (Asterisk 1.4)
22 #Asterisk+=app_ivrdemo? app_osplookup app_rpt? app_skel?
23 #Asterisk+=cdr_sqlite(sqlite) res_snmp(netsnmp)
24 #Asterisk+=chan_features? chan_h323(openh323) chan_vpb(vpbapi)
25 #Asterisk+=pbx_gtkconsole(gtk) pbx_kdeconsole(qt)
26 #Asterisk+=IMAP_STORAGE(imap_tk,ssl) CORE-SOUNDS-ES-GSM CORE-SOUNDS-FR-GSM
27 #Asterisk+=MOH-FREEPLAY-GSM EXTRA-SOUNDS-EN-GSM
29 # Download a source tarball
30 . /etc/tazwok.conf
31 slitaz_wget()
32 {
33 if [ ! -f $SOURCES_REPOSITORY/$(basename $2) ]; then
34 local here=$(pwd)
35 cd $SOURCES_REPOSITORY
36 wget $1 $2
37 cd $here
38 fi
39 cp $SOURCES_REPOSITORY/$(basename $2) .
40 }
42 # Rules to configure and make the package.
43 compile_rules()
44 {
45 if [ ! -d ../linux/taz ]; then
46 tazwok cook linux
47 fi
48 KVERS=$(grep "kernel version" ../linux/linux-*/.config)
49 KVERS=${KVERS##* }
50 KSRC=$(cd ../linux/linux-* ; pwd)
51 export KVERS
52 export KSRC
53 cd $src
54 eval $(grep ^ADD_VER= download.sh)
55 slitaz_wget -c $SF_MIRROR/agx-ast-addons/agx-ast-addons-$ADD_VER.tar.bz2
56 #bluetooth:
57 #slitaz_wget -c http://svn.digium.com/view/asterisk-addons/trunk/channels/chan_mobile.c?view=co
58 #slitaz_wget -c http://www.chan-mobile.org/downloads/chan_mobile-1.4.x.patch
59 # cd asterisk-addons
60 # patch -p0 < chan_mobile-1.4.x.patch
61 tar xjf agx-ast-addons-$ADD_VER.tar.bz2
62 for i in CMakeLists.u bristuff.u; do
63 [ -f done.$i ] && continue
64 echo "Apply $i..."
65 patch -p0 < ../stuff/$i || return 1
66 touch done.$i
67 done
68 chmod +x apply-patches.sh
69 sh ./download.sh
70 echo "Apply sounds.u..."
71 patch -p0 < ../stuff/sounds.u || return 1
72 ln -s . zaptel/zaptel
73 ln -s . zaptel/linux
74 mkdir -p _pkg/etc/init.d _pkg/usr/include/zaptel
75 [ -f done.uname ] ||
76 grep -rsl "uname -r" . | xargs sed -i -e "s/uname -r/echo $KVERS/g"
77 touch done.uname
78 export BRISTUFF_ZAP_PARAMS="KBUILD_NOPEDANTIC=1"
79 sed -i 's/^NO_H323=.*/NO_H323="--with-gsm=internal --without-pwlib --without-h323"/' ./compile.sh
80 sh ./compile.sh -d $(cd _pkg; pwd) -i
81 cp asterisk/configs/* _pkg/etc/asterisk/
82 cp asterisk-addons/configs/* _pkg/etc/asterisk/
83 cd agx-ast-addons
84 cmake "." -DCMAKE_INSTALL_PREFIX=../_pkg/usr
85 make install
86 cd ..
87 ln -s libgsmat.so.1.0 _pkg/usr/lib/libgsmat.so.1
88 cp ../stuff/*.files-list .
89 }
92 # Rules to gen a SliTaz package suitable for Tazpkg.
93 genpkg_rules()
94 {
95 # Just to have a dir.
96 mkdir -p $fs/var/lib/asterisk
97 # Cook all packages based on bristuff
98 for i in $(cd $WOK; grep -l '^WANTED="bristuff"$' */receipt)
99 do
100 tazwok cook ${i%/receipt}
101 done
102 }