wok-4.x rev 1187

Add bristuff
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Aug 04 13:34:35 2008 +0000 (2008-08-04)
parents cf7ebadbfe65
children c3908f5b155d
files asterisk-dev/receipt asterisk-sound-fr/receipt asterisk-sound/receipt asterisk/receipt bristuff/receipt bristuff/stuff/CMakeLists.u bristuff/stuff/asterisk-dev.files-list bristuff/stuff/asterisk-sound-fr.files-list bristuff/stuff/asterisk-sound.files-list bristuff/stuff/asterisk.files-list bristuff/stuff/bristuff.u bristuff/stuff/sounds.u bristuff/stuff/zaptel-dev.files-list bristuff/stuff/zaptel-perl.files-list bristuff/stuff/zaptel.files-list zaptel-dev/receipt zaptel-perl/receipt zaptel/receipt
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/asterisk-dev/receipt	Mon Aug 04 13:34:35 2008 +0000
     1.3 @@ -0,0 +1,32 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="asterisk-dev"
     1.7 +VERSION=
     1.8 +CATEGORY="system"
     1.9 +SHORT_DESC="Open Source PBX and telephony toolkit development files."
    1.10 +MAINTAINER="pascal.bellard@slitaz.org"
    1.11 +WEB_SITE="http://www.digium.com/"
    1.12 +WANTED="bristuff"
    1.13 +
    1.14 +# Extract VERSION from WANTED package source
    1.15 +get_version()
    1.16 +{
    1.17 +	eval $(grep ^AST_VER= $WOK/$WANTED/$WANTED-*/download.sh)
    1.18 +	VERSION=$AST_VER
    1.19 +}
    1.20 +
    1.21 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.22 +genpkg_rules()
    1.23 +{
    1.24 +	if [ -d taz/$PACKAGE-/fs ]; then
    1.25 +		get_version
    1.26 +		sed -i "s/^VERSION=.*/VERSION=\"$VERSION\"/" receipt
    1.27 +		mv taz/$PACKAGE- taz/$PACKAGE-$VERSION
    1.28 +	fi
    1.29 +	_pkg=$(cd $(dirname $src)/$WANTED-*/_pkg ; pwd)
    1.30 +	while read file; do
    1.31 +		dir=$(dirname $file)
    1.32 +		[ -d $fs$dir ] || mkdir -p $fs$dir
    1.33 +		eval cp -a "$_pkg$file" $fs$dir
    1.34 +	done < $_pkg/../$PACKAGE.files-list
    1.35 +}
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/asterisk-sound-fr/receipt	Mon Aug 04 13:34:35 2008 +0000
     2.3 @@ -0,0 +1,33 @@
     2.4 +# SliTaz package receipt.
     2.5 +
     2.6 +PACKAGE="asterisk-sound-fr"
     2.7 +VERSION=
     2.8 +CATEGORY="system"
     2.9 +SHORT_DESC="Open Source PBX and telephony toolkit sound files (fr)."
    2.10 +MAINTAINER="pascal.bellard@slitaz.org"
    2.11 +WEB_SITE="http://www.digium.com/"
    2.12 +WANTED="bristuff"
    2.13 +DEPENDS="asterisk asterisk-sound"
    2.14 +
    2.15 +# Extract VERSION from WANTED package source
    2.16 +get_version()
    2.17 +{
    2.18 +	eval $(grep ^AST_VER= $WOK/$WANTED/$WANTED-*/download.sh)
    2.19 +	VERSION=$AST_VER
    2.20 +}
    2.21 +
    2.22 +# Rules to gen a SliTaz package suitable for Tazpkg.
    2.23 +genpkg_rules()
    2.24 +{
    2.25 +	if [ -d taz/$PACKAGE-/fs ]; then
    2.26 +		get_version
    2.27 +		sed -i "s/^VERSION=.*/VERSION=\"$VERSION\"/" receipt
    2.28 +		mv taz/$PACKAGE- taz/$PACKAGE-$VERSION
    2.29 +	fi
    2.30 +	_pkg=$(cd $(dirname $src)/$WANTED-*/_pkg ; pwd)
    2.31 +	while read file; do
    2.32 +		dir=$(dirname $file)
    2.33 +		[ -d $fs$dir ] || mkdir -p $fs$dir
    2.34 +		eval cp -a "$_pkg$file" $fs$dir
    2.35 +	done < $_pkg/../$PACKAGE.files-list
    2.36 +}
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/asterisk-sound/receipt	Mon Aug 04 13:34:35 2008 +0000
     3.3 @@ -0,0 +1,34 @@
     3.4 +# SliTaz package receipt.
     3.5 +
     3.6 +PACKAGE="asterisk-sound"
     3.7 +VERSION=
     3.8 +CATEGORY="system"
     3.9 +SHORT_DESC="Open Source PBX and telephony toolkit sound files (en)."
    3.10 +MAINTAINER="pascal.bellard@slitaz.org"
    3.11 +WEB_SITE="http://www.digium.com/"
    3.12 +WANTED="bristuff"
    3.13 +DEPENDS="asterisk"
    3.14 +
    3.15 +# Extract VERSION from WANTED package source
    3.16 +get_version()
    3.17 +{
    3.18 +	eval $(grep ^AST_VER= $WOK/$WANTED/$WANTED-*/download.sh)
    3.19 +	VERSION=$AST_VER
    3.20 +}
    3.21 +
    3.22 +# Rules to gen a SliTaz package suitable for Tazpkg.
    3.23 +genpkg_rules()
    3.24 +{
    3.25 +	if [ -d taz/$PACKAGE-/fs ]; then
    3.26 +		get_version
    3.27 +		sed -i "s/^VERSION=.*/VERSION=\"$VERSION\"/" receipt
    3.28 +		mv taz/$PACKAGE- taz/$PACKAGE-$VERSION
    3.29 +	fi
    3.30 +	_pkg=$(cd $(dirname $src)/$WANTED-*/_pkg ; pwd)
    3.31 +	while read file; do
    3.32 +		dir=$(dirname $file)
    3.33 +		[ -d $fs$dir ] || mkdir -p $fs$dir
    3.34 +		eval cp -a "$_pkg$file" $fs$dir
    3.35 +	done < $_pkg/../$PACKAGE.files-list
    3.36 +	rm -rf $fs/var/lib/asterisk/sounds/??/
    3.37 +}
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/asterisk/receipt	Mon Aug 04 13:34:35 2008 +0000
     4.3 @@ -0,0 +1,39 @@
     4.4 +# SliTaz package receipt.
     4.5 +
     4.6 +PACKAGE="asterisk"
     4.7 +VERSION=
     4.8 +CATEGORY="system"
     4.9 +SHORT_DESC="Open Source PBX and telephony toolkit."
    4.10 +MAINTAINER="pascal.bellard@slitaz.org"
    4.11 +WEB_SITE="http://www.digium.com/"
    4.12 +WANTED="bristuff"
    4.13 +DEPENDS="openssl ncurses zlib libogg libvorbis curl newt libusb alsa-lib \
    4.14 +speex iksemel spandsp tiff radiusclient-ng nbs freetds libpostgresqlclient \
    4.15 +libmysqlclient"
    4.16 +CONFIG_FILES="/etc/asterisk"
    4.17 +
    4.18 +# Extract VERSION from WANTED package source
    4.19 +get_version()
    4.20 +{
    4.21 +	eval $(grep ^AST_VER= $WOK/$WANTED/$WANTED-*/download.sh)
    4.22 +	VERSION=$AST_VER
    4.23 +}
    4.24 +
    4.25 +# Rules to gen a SliTaz package suitable for Tazpkg.
    4.26 +genpkg_rules()
    4.27 +{
    4.28 +	if [ -d taz/$PACKAGE-/fs ]; then
    4.29 +		get_version
    4.30 +		sed -i "s/^VERSION=.*/VERSION=\"$VERSION\"/" receipt
    4.31 +		mv taz/$PACKAGE- taz/$PACKAGE-$VERSION
    4.32 +	fi
    4.33 +	_pkg=$(cd $(dirname $src)/$WANTED-*/_pkg ; pwd)
    4.34 +	while read file; do
    4.35 +		dir=$(dirname $file)
    4.36 +		[ -d $fs$dir ] || mkdir -p $fs$dir
    4.37 +		eval cp -a "$_pkg$file" $fs$dir
    4.38 +	done < $_pkg/../$PACKAGE.files-list
    4.39 +	for i in $fs/etc/asterisk/*.sample; do
    4.40 +		mv $i ${i%.sample}
    4.41 +	done
    4.42 +}
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/bristuff/receipt	Mon Aug 04 13:34:35 2008 +0000
     5.3 @@ -0,0 +1,93 @@
     5.4 +#!/bin/sh
     5.5 +# SliTaz package receipt.
     5.6 +
     5.7 +PACKAGE="bristuff"
     5.8 +VERSION="0.4.0-test6-xr1"
     5.9 +CATEGORY="meta"
    5.10 +SHORT_DESC="ISDN patches for Asterisk/Zaptel."
    5.11 +MAINTAINER="pascal.bellard@slitaz.org"
    5.12 +TARBALL="$PACKAGE-$VERSION.tar.gz"
    5.13 +WEB_SITE="http://www.junghanns.net/"
    5.14 +WGET_URL="http://updates.xorcom.com/astribank/bristuff/1.4/$TARBALL"
    5.15 +BUILD_DEPENDS="openssl-dev ncurses-dev zlib-dev patch libogg-dev libvorbis-dev \
    5.16 +curl-dev newt-dev libusb-dev sqlite-dev alsa-lib-dev fxload speex-dev \
    5.17 +iksemel-dev mysql-dev glibc-dev spandsp-dev tiff-dev radiusclient-ng-dev \
    5.18 +mysql libmysqlclient cmake postgresql postgresql-dev libpostgresqlclient \
    5.19 +libtool unixODBC-dev libunixODBC"
    5.20 +DEPENDS="asterisk asterisk-sound zaptel mISDNuser"
    5.21 +
    5.22 +#TODO: net-snmp(-dev) vpb-driver(-dev)
    5.23 +#Asterisk: libopenh323-dev (Not so nice addon), libsnmp-dev (Asterisk 1.4)
    5.24 +#Asterisk+=app_ivrdemo? app_osplookup app_rpt? app_skel?
    5.25 +#Asterisk+=cdr_sqlite(sqlite) res_snmp(netsnmp)
    5.26 +#Asterisk+=chan_features? chan_h323(openh323) chan_vpb(vpbapi)
    5.27 +#Asterisk+=pbx_gtkconsole(gtk) pbx_kdeconsole(qt)
    5.28 +#Asterisk+=IMAP_STORAGE(imap_tk,ssl) CORE-SOUNDS-ES-GSM CORE-SOUNDS-FR-GSM
    5.29 +#Asterisk+=MOH-FREEPLAY-GSM EXTRA-SOUNDS-EN-GSM
    5.30 +
    5.31 +# Download a source tarball
    5.32 +. /etc/tazwok.conf
    5.33 +slitaz_wget()
    5.34 +{
    5.35 +	if [ ! -f $SOURCES_REPOSITORY/$(basename $2) ]; then
    5.36 +		local here=$(pwd)
    5.37 +		cd $SOURCES_REPOSITORY
    5.38 +		wget $1 $2
    5.39 +		cd $here
    5.40 +	fi
    5.41 +	cp $SOURCES_REPOSITORY/$(basename $2) .
    5.42 +}
    5.43 +
    5.44 +# Rules to configure and make the package.
    5.45 +compile_rules()
    5.46 +{
    5.47 +	if [ ! -d ../linux/taz ]; then
    5.48 +		tazwok cook linux
    5.49 +	fi
    5.50 +	KVERS=$(grep "kernel version" ../linux/linux-*/.config)
    5.51 +	KVERS=${KVERS##* }
    5.52 +	KSRC=$(cd ../linux/linux-* ; pwd)
    5.53 +	export KVERS
    5.54 +	export KSRC
    5.55 +	cd $src
    5.56 +	eval $(grep ^ADD_VER= download.sh)
    5.57 +	slitaz_wget -c $SF_MIRROR/agx-ast-addons/agx-ast-addons-$ADD_VER.tar.bz2
    5.58 +	#bluetooth:
    5.59 +	#slitaz_wget -c http://svn.digium.com/view/asterisk-addons/trunk/channels/chan_mobile.c?view=co
    5.60 +	#slitaz_wget -c http://www.chan-mobile.org/downloads/chan_mobile-1.4.x.patch
    5.61 +	# cd asterisk-addons
    5.62 +	# patch -p0 < chan_mobile-1.4.x.patch
    5.63 +	tar xjf agx-ast-addons-$ADD_VER.tar.bz2
    5.64 +	patch -p0 < ../stuff/CMakeLists.u || return 1
    5.65 +	patch -p0 < ../stuff/bristuff.u || return 1
    5.66 +	chmod +x apply-patches.sh
    5.67 +	sh ./download.sh
    5.68 +	patch -p0 < ../stuff/sounds.u || return 1
    5.69 +	ln -s . zaptel/zaptel
    5.70 +	ln -s . zaptel/linux
    5.71 +	mkdir -p _pkg/etc/init.d _pkg/usr/include/zaptel
    5.72 +	grep -rsl "uname -r" . | xargs sed -i -e "s/uname -r/echo $KVERS/g"
    5.73 +	export BRISTUFF_ZAP_PARAMS="KBUILD_NOPEDANTIC=1"
    5.74 +	sh ./compile.sh -d $(cd _pkg; pwd) -i
    5.75 +	cp asterisk/configs/* _pkg/etc/asterisk/
    5.76 +	cd agx-ast-addons
    5.77 +	cmake "." -DCMAKE_INSTALL_PREFIX=../_pkg/usr
    5.78 +	make install
    5.79 +	cd ..
    5.80 +	ln -s libgsmat.so.1.0 _pkg/usr/lib/libgsmat.so.1
    5.81 +	cp ../stuff/*.files-list .
    5.82 +}
    5.83 +
    5.84 +
    5.85 +# Rules to gen a SliTaz package suitable for Tazpkg.
    5.86 +genpkg_rules()
    5.87 +{
    5.88 +	# Just to have a dir.
    5.89 +	mkdir -p $fs/var/lib/asterisk
    5.90 +	# Cook all packages based on bristuff
    5.91 +	for i in $(cd $WOK; grep -l '^WANTED="bristuff"$' */receipt)
    5.92 +	do
    5.93 +		tazwok cook ${i%/receipt}
    5.94 +	done
    5.95 +}
    5.96 +
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/bristuff/stuff/CMakeLists.u	Mon Aug 04 13:34:35 2008 +0000
     6.3 @@ -0,0 +1,11 @@
     6.4 +--- agx-ast-addons/CMakeLists.txt.org	Wed Apr 30 13:41:43 2008
     6.5 ++++ agx-ast-addons/CMakeLists.txt	Wed Apr 30 13:47:46 2008
     6.6 +@@ -14,7 +14,7 @@
     6.7 + # Asterisk is required
     6.8 + #--------------------------------------------------
     6.9 + 
    6.10 +-FIND_PATH(ASTERISK_INCLUDE_DIR asterisk.h /usr/include /usr/local/include)
    6.11 ++FIND_PATH(ASTERISK_INCLUDE_DIR asterisk.h ../asterisk/include)
    6.12 + IF(NOT ASTERISK_INCLUDE_DIR)
    6.13 + MESSAGE(FATAL_ERROR "MISSING HEADER: asterisk.h")
    6.14 + ENDIF(NOT ASTERISK_INCLUDE_DIR)
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/bristuff/stuff/asterisk-dev.files-list	Mon Aug 04 13:34:35 2008 +0000
     7.3 @@ -0,0 +1,1 @@
     7.4 +/usr/include/asterisk*
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/bristuff/stuff/asterisk-sound-fr.files-list	Mon Aug 04 13:34:35 2008 +0000
     8.3 @@ -0,0 +1,2 @@
     8.4 +/var/lib/asterisk/sounds/fr
     8.5 +/var/lib/asterisk/sounds/.asterisk-core-sounds-fr-*
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/bristuff/stuff/asterisk-sound.files-list	Mon Aug 04 13:34:35 2008 +0000
     9.3 @@ -0,0 +1,2 @@
     9.4 +/var/lib/asterisk/sounds/*
     9.5 +/var/lib/asterisk/sounds/.asterisk-core-sounds-en-*
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/bristuff/stuff/asterisk.files-list	Mon Aug 04 13:34:35 2008 +0000
    10.3 @@ -0,0 +1,21 @@
    10.4 +/usr/lib/asterisk
    10.5 +/etc/asterisk
    10.6 +/usr/sbin/asterisk
    10.7 +/usr/sbin/rasterisk
    10.8 +/usr/sbin/astgenkey
    10.9 +/usr/sbin/autosupport
   10.10 +/usr/sbin/safe_asterisk
   10.11 +/usr/sbin/astman
   10.12 +/usr/sbin/stereorize
   10.13 +/usr/sbin/streamplayer
   10.14 +/usr/sbin/aelparse
   10.15 +/usr/sbin/muted
   10.16 +/var/lib/asterisk/static-http
   10.17 +/var/lib/asterisk/images
   10.18 +/var/lib/asterisk/agi-bin
   10.19 +/var/lib/asterisk/moh
   10.20 +/var/lib/asterisk/keys
   10.21 +/var/lib/asterisk/firmware
   10.22 +/var/run
   10.23 +/var/spool
   10.24 +/var/log
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/bristuff/stuff/bristuff.u	Mon Aug 04 13:34:35 2008 +0000
    11.3 @@ -0,0 +1,192 @@
    11.4 +--- apply-patches.sh	
    11.5 ++++ apply-patches.sh	
    11.6 +@@ -12,6 +12,2 @@
    11.7 + 	patch_file="$patches_dir/$patch_name"
    11.8 +-	if ! patch -p1 < "$patch_file" --quiet --dry-run; then
    11.9 +-		echo "Failed applying $patch_file (directory: $2).  Aborting."
   11.10 +-		exit 1
   11.11 +-	fi
   11.12 + 	patch -p1 < "$patch_file"
   11.13 +
   11.14 +--- download.sh	
   11.15 ++++ download.sh	
   11.16 +@@ -44,3 +44,3 @@
   11.17 + 	url="$1"
   11.18 +-	file=`echo $url | rev | cut -d/ -f1 | rev`
   11.19 ++	file=${url##*/}
   11.20 + 	wget -c $url.sha1
   11.21 +@@ -51,3 +51,3 @@
   11.22 + 	# we have a file. Let's check if it is valid
   11.23 +-	if sha1sum -c --status $file.sha1; then return; fi
   11.24 ++	if sha1sum -c -s $file.sha1; then return; fi
   11.25 + 
   11.26 +--- download.sh	Tue Apr 29 09:43:48 2008
   11.27 ++++ download.sh	Tue Apr 29 09:48:51 2008
   11.28 +@@ -36,6 +36,18 @@
   11.29 +   fi
   11.30 + }
   11.31 + 
   11.32 ++. /etc/tazwok.conf 
   11.33 ++slitaz_wget()
   11.34 ++{
   11.35 ++	if [ ! -f $SOURCES_REPOSITORY/$(basename $2) ]; then
   11.36 ++		local here=$(pwd)
   11.37 ++		cd $SOURCES_REPOSITORY
   11.38 ++		wget $1 $2
   11.39 ++		cd $here
   11.40 ++	fi
   11.41 ++	cp $SOURCES_REPOSITORY/$(basename $2) .
   11.42 ++}
   11.43 ++
   11.44 + # A simple 'wget -c' won't work with Digium, as they keep providing a
   11.45 + # newer timestamp on files.
   11.46 + # 
   11.47 +@@ -43,26 +54,26 @@
   11.48 + digium_download() {
   11.49 + 	url="$1"
   11.50 + 	file=${url##*/}
   11.51 +-	wget -c $url.sha1
   11.52 ++	slitaz_wget -c $url.sha1
   11.53 + 	if [ ! -f "$file" ]; then
   11.54 +-		wget -c "$url"
   11.55 ++		slitaz_wget -c "$url"
   11.56 + 	fi
   11.57 + 
   11.58 + 	# we have a file. Let's check if it is valid
   11.59 + 	if sha1sum -c -s $file.sha1; then return; fi
   11.60 + 
   11.61 + 	# If we're still here: bad download
   11.62 +-	wget -c "$url"
   11.63 ++	slitaz_wget -c "$url"
   11.64 + }
   11.65 + 
   11.66 +-#wget -c http://updates.xorcom.com/astribank/src/zaptel-${ZAP_VER}.tar.gz
   11.67 +-#wget -c http://astimax.de/mirror/zaptel/zaptel-${ZAP_VER}.tar.gz
   11.68 ++#slitaz_wget -c http://updates.xorcom.com/astribank/src/zaptel-${ZAP_VER}.tar.gz
   11.69 ++#slitaz_wget -c http://astimax.de/mirror/zaptel/zaptel-${ZAP_VER}.tar.gz
   11.70 + digium_download http://downloads.digium.com/pub/zaptel/releases/zaptel-${ZAP_VER}.tar.gz
   11.71 +-#wget -c http://astimax.de/mirror/libpri/libpri-${PRI_VER}.tar.gz
   11.72 ++#slitaz_wget -c http://astimax.de/mirror/libpri/libpri-${PRI_VER}.tar.gz
   11.73 + digium_download http://downloads.digium.com/pub/libpri/releases/libpri-${PRI_VER}.tar.gz
   11.74 +-#wget -c http://astimax.de/mirror/asterisk-1.4/asterisk-${AST_VER}.tar.gz
   11.75 ++#slitaz_wget -c http://astimax.de/mirror/asterisk-1.4/asterisk-${AST_VER}.tar.gz
   11.76 + digium_download http://downloads.digium.com/pub/asterisk/releases/asterisk-${AST_VER}.tar.gz
   11.77 +-wget -c http://astimax.de/mirror/asterisk-addons/asterisk-addons-${ADD_VER}.tar.gz
   11.78 ++slitaz_wget -c http://astimax.de/mirror/asterisk-addons/asterisk-addons-${ADD_VER}.tar.gz
   11.79 + #digium_download  http://downloads.digium.com/pub/asterisk/releases/asterisk-addons-${ADD_VER}.tar.gz
   11.80 + 
   11.81 + move_dir zaptel-${ZAP_VER}
   11.82 +--- patches/zaptel/series	
   11.83 ++++ patches/zaptel/series	
   11.84 +@@ -3,3 +3,4 @@
   11.85 + zt_alarm_notify_no_master_change
   11.86 + ztcfg-start_stop
   11.87 + ztpty
   11.88 ++slitaz
   11.89 +--- patches/zaptel/slitaz	
   11.90 ++++ patches/zaptel/slitaz	
   11.91 +@@ -0,0 +1,73 @@
   11.92 ++--- zaptel-1.4.8/zaptel-base.c	2008-04-29 11:04:40.000000000 +0200
   11.93 +++++ zaptel-1.4.8/zaptel-base.c	2008-04-29 11:05:16.000000000 +0200
   11.94 ++@@ -4432,3 +4432,3 @@
   11.95 ++ 	void *rxgain=NULL;
   11.96 ++-	struct echo_can_state *ec;
   11.97 +++	struct echo_can_state *ec, *tec;
   11.98 ++ 	struct zt_echocanparams ecp;
   11.99 ++--- zaptel-1.4.8/Makefile.org	2008-04-29 13:07:17.000000000 +0200
  11.100 +++++ zaptel-1.4.8/Makefile	2008-04-29 13:08:20.000000000 +0200
  11.101 ++@@ -205,14 +205,14 @@
  11.102 ++ INITRD_DIR	:= $(firstword $(wildcard /etc/rc.d/init.d /etc/init.d))
  11.103 ++ ifneq (,$(INITRD_DIR))
  11.104 ++   INIT_TARGET	:= $(DESTDIR)$(INITRD_DIR)/zaptel
  11.105 ++-  COPY_INITD	:= install -D zaptel.init $(INIT_TARGET)
  11.106 +++  COPY_INITD	:= cp zaptel.init $(INIT_TARGET)
  11.107 ++ endif
  11.108 ++ RCCONF_DIR	:= $(firstword $(wildcard /etc/sysconfig /etc/default))
  11.109 ++ 
  11.110 ++ NETSCR_DIR	:= $(firstword $(wildcard /etc/sysconfig/network-scripts ))
  11.111 ++ ifneq (,$(NETSCR_DIR))
  11.112 ++   NETSCR_TARGET	:= $(DESTDIR)$(NETSCR_DIR)/ifup-hdlc
  11.113 ++-  COPY_NETSCR	:= install -D ifup-hdlc $(NETSCR_TARGET)
  11.114 +++  COPY_NETSCR	:= cp ifup-hdlc $(NETSCR_TARGET)
  11.115 ++ endif
  11.116 ++ 
  11.117 ++ ifneq ($(wildcard .version),)
  11.118 ++@@ -466,7 +466,7 @@
  11.119 ++ 	install -m 644 $(MAN_PAGES) $(DESTDIR)$(MAN_DIR)/
  11.120 ++ endif
  11.121 ++ ifeq (,$(wildcard $(DESTDIR)$(CONFIG_FILE)))
  11.122 ++-	$(INSTALL) -D -m 644 zaptel.conf.sample $(DESTDIR)$(CONFIG_FILE)
  11.123 +++	cp zaptel.conf.sample $(DESTDIR)$(CONFIG_FILE)
  11.124 ++ endif
  11.125 ++ 
  11.126 ++ # Pushing those two to a separate target that is not used by default:
  11.127 ++@@ -482,8 +482,8 @@
  11.128 ++ endif
  11.129 ++ 
  11.130 ++ install-libs: libs
  11.131 ++-	$(INSTALL) -D -m 755 $(LTZ_A) $(DESTDIR)$(LIB_DIR)/$(LTZ_A)
  11.132 ++-	$(INSTALL) -D -m 755 $(LTZ_SO) $(DESTDIR)$(LIB_DIR)/$(LTZ_SO).$(LTZ_SO_MAJOR_VER).$(LTZ_SO_MINOR_VER)
  11.133 +++	cp $(LTZ_A) $(DESTDIR)$(LIB_DIR)/$(LTZ_A)
  11.134 +++	cp $(LTZ_SO) $(DESTDIR)$(LIB_DIR)/$(LTZ_SO).$(LTZ_SO_MAJOR_VER).$(LTZ_SO_MINOR_VER)
  11.135 ++ ifeq (,$(DESTDIR))
  11.136 ++ 	if [ `id -u` = 0 ]; then \
  11.137 ++ 		/sbin/ldconfig || : ;\
  11.138 ++@@ -499,7 +499,7 @@
  11.139 ++ 	/sbin/restorecon -v $(DESTDIR)$(LIB_DIR)/$(LTZ_SO)
  11.140 ++   endif
  11.141 ++ endif
  11.142 ++-	$(INSTALL) -D -m 644 tonezone.h $(DESTDIR)$(INC_DIR)/tonezone.h
  11.143 +++	cp tonezone.h $(DESTDIR)$(INC_DIR)/tonezone.h
  11.144 ++ 
  11.145 ++ install-utils-subdirs:
  11.146 ++ 	@for dir in $(SUBDIRS_UTILS); do \
  11.147 ++@@ -507,7 +507,7 @@
  11.148 ++ 	done
  11.149 ++ 
  11.150 ++ install-include:
  11.151 ++-	$(INSTALL) -D -m 644 zaptel.h $(DESTDIR)$(INC_DIR)/zaptel.h
  11.152 +++	cp zaptel.h $(DESTDIR)$(INC_DIR)/zaptel.h
  11.153 ++ 
  11.154 ++ devices:
  11.155 ++ ifndef DYNFS
  11.156 ++@@ -578,7 +578,7 @@
  11.157 ++ endif
  11.158 ++ ifneq (,$(RCCONF_DIR))
  11.159 ++   ifeq (,$(wildcard $(DESTDIR)$(RCCONF_DIR)/zaptel))
  11.160 ++-	$(INSTALL) -D -m 644 zaptel.sysconfig $(DESTDIR)$(RCCONF_DIR)/zaptel
  11.161 +++	cp zaptel.sysconfig $(DESTDIR)$(RCCONF_DIR)/zaptel
  11.162 ++   endif
  11.163 ++ endif
  11.164 ++ ifneq (,$(COPY_NETSCR))
  11.165 +--- patches/zaphfc/series	
  11.166 ++++ patches/zaphfc/series	
  11.167 +@@ -1,3 +1,4 @@
  11.168 + local_zap
  11.169 + newzaptel
  11.170 + florz.diff
  11.171 ++slitaz
  11.172 +--- /dev/null	
  11.173 ++++ patches/zaphfc/slitaz	
  11.174 +@@ -0,0 +1,13 @@
  11.175 ++--- zaphfc/Makefile.org	2008-04-29 13:07:25.000000000 +0200
  11.176 +++++ zaphfc/Makefile	2008-04-29 13:08:38.000000000 +0200
  11.177 ++@@ -111,8 +111,8 @@
  11.178 ++ install:	install$(BUILDVER)
  11.179 ++ 
  11.180 ++ installlinux26:
  11.181 ++-	install -D -m 644 zaphfc.ko $(INSTALL_PREFIX)/lib/modules/`uname -r`/misc/zaphfc.ko
  11.182 +++	cp zaphfc.ko $(INSTALL_PREFIX)/lib/modules/`uname -r`/misc/
  11.183 ++ 
  11.184 ++ installlinux24:
  11.185 ++-	install -D -m 644 zaphfc.o $(INSTALL_PREFIX)/lib/modules/`uname -r`/misc/zaphfc.o
  11.186 +++	cp zaphfc.o $(INSTALL_PREFIX)/lib/modules/*/misc/
  11.187 ++ 
  11.188 +
  11.189 +--- patches/cwain/series	
  11.190 ++++ patches/cwain/series	
  11.191 +@@ -1,3 +1,2 @@
  11.192 +-# Does not seem to apply cleanly. Testing needed:
  11.193 +-#beronet.diff
  11.194 ++beronet.diff
  11.195 + local_zap
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/bristuff/stuff/sounds.u	Mon Aug 04 13:34:35 2008 +0000
    12.3 @@ -0,0 +1,25 @@
    12.4 +--- asterisk/sounds/sounds.xml	
    12.5 ++++ asterisk/sounds/sounds.xml	
    12.6 +@@ -31,6 +31,7 @@
    12.7 + 		<member name="CORE-SOUNDS-FR-ALAW" displayname="French, a-Law format">
    12.8 + 		</member>
    12.9 + 		<member name="CORE-SOUNDS-FR-GSM" displayname="French, GSM format">
   12.10 ++			<defaultenabled>yes</defaultenabled>
   12.11 + 		</member>
   12.12 + 		<member name="CORE-SOUNDS-FR-G729" displayname="French, G.729 format">
   12.13 + 		</member>
   12.14 +@@ -39,13 +40,13 @@
   12.15 + 	</category>
   12.16 + 	<category name="MENUSELECT_MOH" displayname="Music On Hold File Packages" positive_output="yes">
   12.17 + 		<member name="MOH-FREEPLAY-WAV" displayname="FreePlay Music On Hold Files, WAV format" >
   12.18 +-			<defaultenabled>yes</defaultenabled>
   12.19 + 		</member>
   12.20 + 		<member name="MOH-FREEPLAY-ULAW" displayname="FreePlay Music On Hold Files, mu-Law format" >
   12.21 + 		</member>
   12.22 + 		<member name="MOH-FREEPLAY-ALAW" displayname="FreePlay Music On Hold Files, a-Law format" >
   12.23 + 		</member>
   12.24 + 		<member name="MOH-FREEPLAY-GSM" displayname="FreePlay Music On Hold Files, GSM format" >
   12.25 ++			<defaultenabled>yes</defaultenabled>
   12.26 + 		</member>
   12.27 + 		<member name="MOH-FREEPLAY-G729" displayname="FreePlay Music On Hold Files, G.729 format" >
   12.28 + 		</member>
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/bristuff/stuff/zaptel-dev.files-list	Mon Aug 04 13:34:35 2008 +0000
    13.3 @@ -0,0 +1,6 @@
    13.4 +/usr/include/zaptel
    13.5 +/usr/include/libpri.h
    13.6 +/usr/include/libgsmat.h
    13.7 +/usr/lib/libtonezone.a
    13.8 +/usr/lib/libpri.a
    13.9 +/usr/lib/libgsmat.a
    14.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.2 +++ b/bristuff/stuff/zaptel-perl.files-list	Mon Aug 04 13:34:35 2008 +0000
    14.3 @@ -0,0 +1,1 @@
    14.4 +/usr/lib/perl5
    15.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.2 +++ b/bristuff/stuff/zaptel.files-list	Mon Aug 04 13:34:35 2008 +0000
    15.3 @@ -0,0 +1,17 @@
    15.4 +/etc/udev
    15.5 +/etc/zaptel.conf
    15.6 +/lib/modules
    15.7 +/sbin/zt*
    15.8 +/sbin/fxotune
    15.9 +/usr/sbin/genzaptelconf
   15.10 +/usr/sbin/fpga_load
   15.11 +/usr/sbin/zt_registration
   15.12 +/usr/sbin/xpp_sync
   15.13 +/usr/sbin/lszaptel
   15.14 +/usr/sbin/xpp_blink
   15.15 +/usr/sbin/zapconf
   15.16 +/usr/sbin/zaptel_hardware
   15.17 +/usr/share/zaptel
   15.18 +/usr/lib/libtonezone.so*
   15.19 +/usr/lib/libpri.so*
   15.20 +/usr/lib/libgsmat.so*
    16.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.2 +++ b/zaptel-dev/receipt	Mon Aug 04 13:34:35 2008 +0000
    16.3 @@ -0,0 +1,32 @@
    16.4 +# SliTaz package receipt.
    16.5 +
    16.6 +PACKAGE="zaptel-dev"
    16.7 +VERSION=
    16.8 +CATEGORY="system"
    16.9 +SHORT_DESC="Zapata Telephony Interface Driver devel files."
   16.10 +MAINTAINER="pascal.bellard@slitaz.org"
   16.11 +WEB_SITE="http://www.digium.com/"
   16.12 +WANTED="bristuff"
   16.13 +
   16.14 +# Extract VERSION from WANTED package source
   16.15 +get_version()
   16.16 +{
   16.17 +        eval $(grep ^ZAP_VER= $WOK/$WANTED/$WANTED-*/download.sh)
   16.18 +	VERSION=$ZAP_VER
   16.19 +}
   16.20 +
   16.21 +# Rules to gen a SliTaz package suitable for Tazpkg.
   16.22 +genpkg_rules()
   16.23 +{
   16.24 +	if [ -d taz/$PACKAGE-/fs ]; then
   16.25 +		get_version
   16.26 +		sed -i "s/^VERSION=.*/VERSION=\"$VERSION\"/" receipt
   16.27 +		mv taz/$PACKAGE- taz/$PACKAGE-$VERSION
   16.28 +	fi
   16.29 +	_pkg=$(cd $(dirname $src)/$WANTED-*/_pkg ; pwd)
   16.30 +	while read file; do
   16.31 +		dir=$(dirname $file)
   16.32 +		[ -d $fs$dir ] || mkdir -p $fs$dir
   16.33 +		eval cp -a "$_pkg$file" $fs$dir
   16.34 +	done < $_pkg/../$PACKAGE.files-list
   16.35 +}
    17.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.2 +++ b/zaptel-perl/receipt	Mon Aug 04 13:34:35 2008 +0000
    17.3 @@ -0,0 +1,33 @@
    17.4 +# SliTaz package receipt.
    17.5 +
    17.6 +PACKAGE="zaptel-perl"
    17.7 +VERSION=
    17.8 +CATEGORY="system"
    17.9 +SHORT_DESC="Zapata Telephony Interface Driver, PERL modules."
   17.10 +MAINTAINER="pascal.bellard@slitaz.org"
   17.11 +WEB_SITE="http://www.digium.com/"
   17.12 +DEPENDS="zaptel"
   17.13 +WANTED="bristuff"
   17.14 +
   17.15 +# Extract VERSION from WANTED package source
   17.16 +get_version()
   17.17 +{
   17.18 +        eval $(grep ^ZAP_VER= $WOK/$WANTED/$WANTED-*/download.sh)
   17.19 +	VERSION=$ZAP_VER
   17.20 +}
   17.21 +
   17.22 +# Rules to gen a SliTaz package suitable for Tazpkg.
   17.23 +genpkg_rules()
   17.24 +{
   17.25 +	if [ -d taz/$PACKAGE-/fs ]; then
   17.26 +		get_version
   17.27 +		sed -i "s/^VERSION=.*/VERSION=\"$VERSION\"/" receipt
   17.28 +		mv taz/$PACKAGE- taz/$PACKAGE-$VERSION
   17.29 +	fi
   17.30 +	_pkg=$(cd $(dirname $src)/$WANTED-*/_pkg ; pwd)
   17.31 +	while read file; do
   17.32 +		dir=$(dirname $file)
   17.33 +		[ -d $fs$dir ] || mkdir -p $fs$dir
   17.34 +		eval cp -a "$_pkg$file" $fs$dir
   17.35 +	done < $_pkg/../$PACKAGE.files-list
   17.36 +}
    18.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.2 +++ b/zaptel/receipt	Mon Aug 04 13:34:35 2008 +0000
    18.3 @@ -0,0 +1,49 @@
    18.4 +# SliTaz package receipt.
    18.5 +
    18.6 +PACKAGE="zaptel"
    18.7 +VERSION=
    18.8 +CATEGORY="system"
    18.9 +SHORT_DESC="Zapata Telephony Interface Driver."
   18.10 +MAINTAINER="pascal.bellard@slitaz.org"
   18.11 +WEB_SITE="http://www.digium.com/"
   18.12 +WANTED="bristuff"
   18.13 +CONFIG_FILES="/etc/zaptel.conf"
   18.14 +
   18.15 +# Extract VERSION from WANTED package source
   18.16 +get_version()
   18.17 +{
   18.18 +        eval $(grep ^ZAP_VER= $WOK/$WANTED/$WANTED-*/download.sh)
   18.19 +	VERSION=$ZAP_VER
   18.20 +}
   18.21 +
   18.22 +# Rules to gen a SliTaz package suitable for Tazpkg.
   18.23 +genpkg_rules()
   18.24 +{
   18.25 +	if [ -d taz/$PACKAGE-/fs ]; then
   18.26 +		get_version
   18.27 +		sed -i "s/^VERSION=.*/VERSION=\"$VERSION\"/" receipt
   18.28 +		mv taz/$PACKAGE- taz/$PACKAGE-$VERSION
   18.29 +	fi
   18.30 +	kver=$(grep "kernel version" ../linux/linux-*/.config)
   18.31 +	kver=${kver##* }
   18.32 +	EXTRAVERSION=_$kver
   18.33 +	_pkg=$(cd $(dirname $src)/$WANTED-*/_pkg ; pwd)
   18.34 +	while read file; do
   18.35 +		dir=$(dirname $file)
   18.36 +		[ -d $fs$dir ] || mkdir -p $fs$dir
   18.37 +		eval cp -a "$_pkg$file" $fs$dir
   18.38 +	done < $_pkg/../$PACKAGE.files-list
   18.39 +	rm -f $fs/lib/modules/*/modules.*
   18.40 +}
   18.41 +
   18.42 +# Post install/remove commands for Tazpkg.
   18.43 +post_install()
   18.44 +{
   18.45 +	depmod -a -b "$1/"
   18.46 +}
   18.47 +
   18.48 +post_remove()
   18.49 +{
   18.50 +	depmod -a
   18.51 +}
   18.52 +