wok-next view bristuff/receipt @ rev 2658

Add libmodplug
author Rohit Joshi <jozee@slitaz.org>
date Sat Apr 18 17:49:27 2009 +0000 (2009-04-18)
parents c1610baa4cf4
children f9e78593eb58
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 [ -L $(which patch) ]; then
46 echo "Please reinstall patch !"
47 return 1
48 fi
49 if [ ! -d ../linux/taz ]; then
50 tazwok cook linux
51 fi
52 KVERS=$(grep "kernel version" ../linux/$(ls ../linux/taz)/.config)
53 KVERS=${KVERS##* }
54 KSRC=$(cd ../linux/$(ls ../linux/taz) ; pwd)
55 export KVERS
56 export KSRC
57 cd $src
58 eval $(grep ^ADD_VER= download.sh)
59 slitaz_wget -c $SF_MIRROR/agx-ast-addons/agx-ast-addons-$ADD_VER.tar.bz2
60 #bluetooth:
61 #slitaz_wget -c http://svn.digium.com/view/asterisk-addons/trunk/channels/chan_mobile.c?view=co
62 #slitaz_wget -c http://www.chan-mobile.org/downloads/chan_mobile-1.4.x.patch
63 # cd asterisk-addons
64 # patch -p0 < chan_mobile-1.4.x.patch
65 tar xjf agx-ast-addons-$ADD_VER.tar.bz2
66 for i in CMakeLists.u bristuff.u; do
67 [ -f done.$i ] && continue
68 echo "Apply $i..."
69 patch -p0 < ../stuff/$i || return 1
70 touch done.$i
71 done
72 chmod +x apply-patches.sh
73 sh ./download.sh
74 echo "Apply sounds.u..."
75 patch -p0 < ../stuff/sounds.u || return 1
76 ln -s . zaptel/zaptel
77 ln -s . zaptel/linux
78 mkdir -p _pkg/etc/init.d _pkg/usr/include/zaptel
79 [ -f done.uname ] ||
80 grep -rsl "uname -r" . | xargs sed -i -e "s/uname -r/echo $KVERS/g"
81 touch done.uname
82 export BRISTUFF_ZAP_PARAMS="KBUILD_NOPEDANTIC=1"
83 sed -i 's/^NO_H323=.*/NO_H323="--with-gsm=internal --without-pwlib --without-h323"/' ./compile.sh
84 sh ./compile.sh -d $(cd _pkg; pwd) -i
85 cp asterisk/configs/* _pkg/etc/asterisk/
86 cp asterisk-addons/configs/* _pkg/etc/asterisk/
87 cd agx-ast-addons
88 cmake "." -DCMAKE_INSTALL_PREFIX=../_pkg/usr
89 make install
90 cd ..
91 ln -s libgsmat.so.1.0 _pkg/usr/lib/libgsmat.so.1
92 cp ../stuff/*.files-list .
93 }
96 # Rules to gen a SliTaz package suitable for Tazpkg.
97 genpkg_rules()
98 {
99 # Just to have a dir.
100 mkdir -p $fs/var/lib/asterisk
101 # Cook all packages based on bristuff
102 for i in $(cd $WOK; grep -l '^WANTED="bristuff"$' */receipt)
103 do
104 tazwok cook ${i%/receipt}
105 done
106 }