wok-current annotate bristuff/receipt @ rev 1295

Up: ntfs-3g (1.2812)
author Christophe Lincoln <pankso@slitaz.org>
date Thu Aug 21 15:40:29 2008 +0200 (2008-08-21)
parents
children 6fd8242e9be0
rev   line source
pascal@1187 1 #!/bin/sh
pascal@1187 2 # SliTaz package receipt.
pascal@1187 3
pascal@1187 4 PACKAGE="bristuff"
pascal@1187 5 VERSION="0.4.0-test6-xr1"
pascal@1187 6 CATEGORY="meta"
pascal@1187 7 SHORT_DESC="ISDN patches for Asterisk/Zaptel."
pascal@1187 8 MAINTAINER="pascal.bellard@slitaz.org"
pascal@1187 9 TARBALL="$PACKAGE-$VERSION.tar.gz"
pascal@1187 10 WEB_SITE="http://www.junghanns.net/"
pascal@1187 11 WGET_URL="http://updates.xorcom.com/astribank/bristuff/1.4/$TARBALL"
pascal@1187 12 BUILD_DEPENDS="openssl-dev ncurses-dev zlib-dev patch libogg-dev libvorbis-dev \
pascal@1187 13 curl-dev newt-dev libusb-dev sqlite-dev alsa-lib-dev fxload speex-dev \
pascal@1187 14 iksemel-dev mysql-dev glibc-dev spandsp-dev tiff-dev radiusclient-ng-dev \
pascal@1187 15 mysql libmysqlclient cmake postgresql postgresql-dev libpostgresqlclient \
pascal@1187 16 libtool unixODBC-dev libunixODBC"
pascal@1187 17 DEPENDS="asterisk asterisk-sound zaptel mISDNuser"
pascal@1187 18
pascal@1187 19 #TODO: net-snmp(-dev) vpb-driver(-dev)
pascal@1187 20 #Asterisk: libopenh323-dev (Not so nice addon), libsnmp-dev (Asterisk 1.4)
pascal@1187 21 #Asterisk+=app_ivrdemo? app_osplookup app_rpt? app_skel?
pascal@1187 22 #Asterisk+=cdr_sqlite(sqlite) res_snmp(netsnmp)
pascal@1187 23 #Asterisk+=chan_features? chan_h323(openh323) chan_vpb(vpbapi)
pascal@1187 24 #Asterisk+=pbx_gtkconsole(gtk) pbx_kdeconsole(qt)
pascal@1187 25 #Asterisk+=IMAP_STORAGE(imap_tk,ssl) CORE-SOUNDS-ES-GSM CORE-SOUNDS-FR-GSM
pascal@1187 26 #Asterisk+=MOH-FREEPLAY-GSM EXTRA-SOUNDS-EN-GSM
pascal@1187 27
pascal@1187 28 # Download a source tarball
pascal@1187 29 . /etc/tazwok.conf
pascal@1187 30 slitaz_wget()
pascal@1187 31 {
pascal@1187 32 if [ ! -f $SOURCES_REPOSITORY/$(basename $2) ]; then
pascal@1187 33 local here=$(pwd)
pascal@1187 34 cd $SOURCES_REPOSITORY
pascal@1187 35 wget $1 $2
pascal@1187 36 cd $here
pascal@1187 37 fi
pascal@1187 38 cp $SOURCES_REPOSITORY/$(basename $2) .
pascal@1187 39 }
pascal@1187 40
pascal@1187 41 # Rules to configure and make the package.
pascal@1187 42 compile_rules()
pascal@1187 43 {
pascal@1187 44 if [ ! -d ../linux/taz ]; then
pascal@1187 45 tazwok cook linux
pascal@1187 46 fi
pascal@1187 47 KVERS=$(grep "kernel version" ../linux/linux-*/.config)
pascal@1187 48 KVERS=${KVERS##* }
pascal@1187 49 KSRC=$(cd ../linux/linux-* ; pwd)
pascal@1187 50 export KVERS
pascal@1187 51 export KSRC
pascal@1187 52 cd $src
pascal@1187 53 eval $(grep ^ADD_VER= download.sh)
pascal@1187 54 slitaz_wget -c $SF_MIRROR/agx-ast-addons/agx-ast-addons-$ADD_VER.tar.bz2
pascal@1187 55 #bluetooth:
pascal@1187 56 #slitaz_wget -c http://svn.digium.com/view/asterisk-addons/trunk/channels/chan_mobile.c?view=co
pascal@1187 57 #slitaz_wget -c http://www.chan-mobile.org/downloads/chan_mobile-1.4.x.patch
pascal@1187 58 # cd asterisk-addons
pascal@1187 59 # patch -p0 < chan_mobile-1.4.x.patch
pascal@1187 60 tar xjf agx-ast-addons-$ADD_VER.tar.bz2
pascal@1187 61 patch -p0 < ../stuff/CMakeLists.u || return 1
pascal@1187 62 patch -p0 < ../stuff/bristuff.u || return 1
pascal@1187 63 chmod +x apply-patches.sh
pascal@1187 64 sh ./download.sh
pascal@1187 65 patch -p0 < ../stuff/sounds.u || return 1
pascal@1187 66 ln -s . zaptel/zaptel
pascal@1187 67 ln -s . zaptel/linux
pascal@1187 68 mkdir -p _pkg/etc/init.d _pkg/usr/include/zaptel
pascal@1187 69 grep -rsl "uname -r" . | xargs sed -i -e "s/uname -r/echo $KVERS/g"
pascal@1187 70 export BRISTUFF_ZAP_PARAMS="KBUILD_NOPEDANTIC=1"
pascal@1187 71 sh ./compile.sh -d $(cd _pkg; pwd) -i
pascal@1187 72 cp asterisk/configs/* _pkg/etc/asterisk/
pascal@1187 73 cd agx-ast-addons
pascal@1187 74 cmake "." -DCMAKE_INSTALL_PREFIX=../_pkg/usr
pascal@1187 75 make install
pascal@1187 76 cd ..
pascal@1187 77 ln -s libgsmat.so.1.0 _pkg/usr/lib/libgsmat.so.1
pascal@1187 78 cp ../stuff/*.files-list .
pascal@1187 79 }
pascal@1187 80
pascal@1187 81
pascal@1187 82 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@1187 83 genpkg_rules()
pascal@1187 84 {
pascal@1187 85 # Just to have a dir.
pascal@1187 86 mkdir -p $fs/var/lib/asterisk
pascal@1187 87 # Cook all packages based on bristuff
pascal@1187 88 for i in $(cd $WOK; grep -l '^WANTED="bristuff"$' */receipt)
pascal@1187 89 do
pascal@1187 90 tazwok cook ${i%/receipt}
pascal@1187 91 done
pascal@1187 92 }
pascal@1187 93