wok view bristuff/receipt @ rev 1583

php: fix post_install
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Oct 16 08:07:14 2008 +0000 (2008-10-16)
parents d659eda8a095
children ec591a67c200
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 for i in CMakeLists.u bristuff.u; do
62 [ -f done.$i ] && continue
63 patch -p0 < ../stuff/$i || return 1
64 touch done.$i
65 done
66 chmod +x apply-patches.sh
67 sh ./download.sh
68 for i in sounds.u; do
69 [ -f done.$i ] && continue
70 patch -p0 < ../stuff/$i || return 1
71 touch done.$i
72 done
73 ln -s . zaptel/zaptel
74 ln -s . zaptel/linux
75 mkdir -p _pkg/etc/init.d _pkg/usr/include/zaptel
76 [ -f done.uname ] ||
77 grep -rsl "uname -r" . | xargs sed -i -e "s/uname -r/echo $KVERS/g"
78 touch done.uname
79 export BRISTUFF_ZAP_PARAMS="KBUILD_NOPEDANTIC=1"
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 }