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