wok-current view bristuff/receipt @ rev 1203
postfix: set default localhost
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Aug 08 16:47:03 2008 +0000 (2008-08-08) |
parents | |
children | 6fd8242e9be0 |
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"
17 DEPENDS="asterisk asterisk-sound zaptel mISDNuser"
19 #TODO: net-snmp(-dev) vpb-driver(-dev)
20 #Asterisk: libopenh323-dev (Not so nice addon), libsnmp-dev (Asterisk 1.4)
21 #Asterisk+=app_ivrdemo? app_osplookup app_rpt? app_skel?
22 #Asterisk+=cdr_sqlite(sqlite) res_snmp(netsnmp)
23 #Asterisk+=chan_features? chan_h323(openh323) chan_vpb(vpbapi)
24 #Asterisk+=pbx_gtkconsole(gtk) pbx_kdeconsole(qt)
25 #Asterisk+=IMAP_STORAGE(imap_tk,ssl) CORE-SOUNDS-ES-GSM CORE-SOUNDS-FR-GSM
26 #Asterisk+=MOH-FREEPLAY-GSM EXTRA-SOUNDS-EN-GSM
28 # Download a source tarball
29 . /etc/tazwok.conf
30 slitaz_wget()
31 {
32 if [ ! -f $SOURCES_REPOSITORY/$(basename $2) ]; then
33 local here=$(pwd)
34 cd $SOURCES_REPOSITORY
35 wget $1 $2
36 cd $here
37 fi
38 cp $SOURCES_REPOSITORY/$(basename $2) .
39 }
41 # Rules to configure and make the package.
42 compile_rules()
43 {
44 if [ ! -d ../linux/taz ]; then
45 tazwok cook linux
46 fi
47 KVERS=$(grep "kernel version" ../linux/linux-*/.config)
48 KVERS=${KVERS##* }
49 KSRC=$(cd ../linux/linux-* ; pwd)
50 export KVERS
51 export KSRC
52 cd $src
53 eval $(grep ^ADD_VER= download.sh)
54 slitaz_wget -c $SF_MIRROR/agx-ast-addons/agx-ast-addons-$ADD_VER.tar.bz2
55 #bluetooth:
56 #slitaz_wget -c http://svn.digium.com/view/asterisk-addons/trunk/channels/chan_mobile.c?view=co
57 #slitaz_wget -c http://www.chan-mobile.org/downloads/chan_mobile-1.4.x.patch
58 # cd asterisk-addons
59 # patch -p0 < chan_mobile-1.4.x.patch
60 tar xjf agx-ast-addons-$ADD_VER.tar.bz2
61 patch -p0 < ../stuff/CMakeLists.u || return 1
62 patch -p0 < ../stuff/bristuff.u || return 1
63 chmod +x apply-patches.sh
64 sh ./download.sh
65 patch -p0 < ../stuff/sounds.u || return 1
66 ln -s . zaptel/zaptel
67 ln -s . zaptel/linux
68 mkdir -p _pkg/etc/init.d _pkg/usr/include/zaptel
69 grep -rsl "uname -r" . | xargs sed -i -e "s/uname -r/echo $KVERS/g"
70 export BRISTUFF_ZAP_PARAMS="KBUILD_NOPEDANTIC=1"
71 sh ./compile.sh -d $(cd _pkg; pwd) -i
72 cp asterisk/configs/* _pkg/etc/asterisk/
73 cd agx-ast-addons
74 cmake "." -DCMAKE_INSTALL_PREFIX=../_pkg/usr
75 make install
76 cd ..
77 ln -s libgsmat.so.1.0 _pkg/usr/lib/libgsmat.so.1
78 cp ../stuff/*.files-list .
79 }
82 # Rules to gen a SliTaz package suitable for Tazpkg.
83 genpkg_rules()
84 {
85 # Just to have a dir.
86 mkdir -p $fs/var/lib/asterisk
87 # Cook all packages based on bristuff
88 for i in $(cd $WOK; grep -l '^WANTED="bristuff"$' */receipt)
89 do
90 tazwok cook ${i%/receipt}
91 done
92 }