wok-6.x view bristuff/receipt @ rev 1629
bristuff: fix compile.sh for asterisk
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Oct 23 20:29:00 2008 +0000 (2008-10-23) |
parents | 6fd8242e9be0 |
children | 14119a3f80ea |
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 cd agx-ast-addons
83 cmake "." -DCMAKE_INSTALL_PREFIX=../_pkg/usr
84 make install
85 cd ..
86 ln -s libgsmat.so.1.0 _pkg/usr/lib/libgsmat.so.1
87 cp ../stuff/*.files-list .
88 }
91 # Rules to gen a SliTaz package suitable for Tazpkg.
92 genpkg_rules()
93 {
94 # Just to have a dir.
95 mkdir -p $fs/var/lib/asterisk
96 # Cook all packages based on bristuff
97 for i in $(cd $WOK; grep -l '^WANTED="bristuff"$' */receipt)
98 do
99 tazwok cook ${i%/receipt}
100 done
101 }