wok-6.x view bristuff/receipt @ rev 3940
add zile: a lightweight Emacs clone.
author | Dominique Corbex <domcox@users.sourceforge.net> |
---|---|
date | Sat Aug 22 12:55:55 2009 +0200 (2009-08-22) |
parents | 749730241669 |
children |
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"
19 TAGS="isdn"
21 #TODO: net-snmp(-dev) vpb-driver(-dev)
22 #Asterisk: libopenh323-dev (Not so nice addon), libsnmp-dev (Asterisk 1.4)
23 #Asterisk+=app_ivrdemo? app_osplookup app_rpt? app_skel?
24 #Asterisk+=cdr_sqlite(sqlite) res_snmp(netsnmp)
25 #Asterisk+=chan_features? chan_h323(openh323) chan_vpb(vpbapi)
26 #Asterisk+=pbx_gtkconsole(gtk) pbx_kdeconsole(qt)
27 #Asterisk+=IMAP_STORAGE(imap_tk,ssl) CORE-SOUNDS-ES-GSM CORE-SOUNDS-FR-GSM
28 #Asterisk+=MOH-FREEPLAY-GSM EXTRA-SOUNDS-EN-GSM
30 # Download a source tarball
31 . /etc/tazwok.conf
32 slitaz_wget()
33 {
34 if [ ! -f $SOURCES_REPOSITORY/$(basename $2) ]; then
35 local here=$(pwd)
36 cd $SOURCES_REPOSITORY
37 wget $1 $2
38 cd $here
39 fi
40 cp $SOURCES_REPOSITORY/$(basename $2) .
41 }
43 # Rules to configure and make the package.
44 compile_rules()
45 {
46 if [ -L $(which patch) ]; then
47 echo "Please reinstall patch !"
48 return 1
49 fi
50 if [ ! -d ../linux/taz ]; then
51 tazwok cook linux
52 fi
53 KVERS=$(grep "kernel version" ../linux/$(ls ../linux/taz)/.config)
54 KVERS=${KVERS##* }
55 KSRC=$(cd ../linux/$(ls ../linux/taz) ; pwd)
56 export KVERS
57 export KSRC
58 cd $src
59 eval $(grep ^ADD_VER= download.sh)
60 slitaz_wget -c $SF_MIRROR/agx-ast-addons/agx-ast-addons-$ADD_VER.tar.bz2
61 #bluetooth:
62 #slitaz_wget -c http://svn.digium.com/view/asterisk-addons/trunk/channels/chan_mobile.c?view=co
63 #slitaz_wget -c http://www.chan-mobile.org/downloads/chan_mobile-1.4.x.patch
64 # cd asterisk-addons
65 # patch -p0 < chan_mobile-1.4.x.patch
66 tar xjf agx-ast-addons-$ADD_VER.tar.bz2
67 for i in CMakeLists.u bristuff.u; do
68 [ -f done.$i ] && continue
69 echo "Apply $i..."
70 patch -p0 < ../stuff/$i || return 1
71 touch done.$i
72 done
73 chmod +x apply-patches.sh
74 sh ./download.sh
75 echo "Apply sounds.u..."
76 patch -p0 < ../stuff/sounds.u || return 1
77 ln -s . zaptel/zaptel
78 ln -s . zaptel/linux
79 mkdir -p _pkg/etc/init.d _pkg/usr/include/zaptel
80 [ -f done.uname ] ||
81 grep -rsl "uname -r" . | xargs sed -i -e "s/uname -r/echo $KVERS/g"
82 touch done.uname
83 export BRISTUFF_ZAP_PARAMS="KBUILD_NOPEDANTIC=1"
84 sed -i 's/^NO_H323=.*/NO_H323="--with-gsm=internal --without-pwlib --without-h323"/' ./compile.sh
85 sh ./compile.sh -d $(cd _pkg; pwd) -i
86 cp asterisk/configs/* _pkg/etc/asterisk/
87 cp asterisk-addons/configs/* _pkg/etc/asterisk/
88 cd agx-ast-addons
89 cmake "." -DCMAKE_INSTALL_PREFIX=../_pkg/usr
90 make install
91 cd ..
92 ln -s libgsmat.so.1.0 _pkg/usr/lib/libgsmat.so.1
93 cp ../stuff/*.files-list .
94 }
97 # Rules to gen a SliTaz package suitable for Tazpkg.
98 genpkg_rules()
99 {
100 # Just to have a dir.
101 mkdir -p $fs/var/lib/asterisk
102 # Cook all packages based on bristuff
103 for i in $(cd $WOK; grep -l '^WANTED="bristuff"$' */receipt)
104 do
105 tazwok cook ${i%/receipt}
106 done
107 }