[Pkg-voip-commits] r2493 - asterisk/branches/experimental/debian

Tzafrir Cohen tzafrir-guest at costa.debian.org
Fri Oct 6 21:51:23 UTC 2006


Author: tzafrir-guest
Date: 2006-10-06 21:51:22 +0000 (Fri, 06 Oct 2006)
New Revision: 2493

Added:
   asterisk/branches/experimental/debian/asterisk.install
   asterisk/branches/experimental/debian/asterisk.links
Removed:
   asterisk/branches/experimental/debian/asterisk-classic.install
   asterisk/branches/experimental/debian/asterisk-classic.links
Modified:
   asterisk/branches/experimental/debian/changelog
   asterisk/branches/experimental/debian/control
   asterisk/branches/experimental/debian/rules
Log:
Basically builds, problems at the install phase.
* Ugly hack in version number.
* get-orig-source now works, though.
* No maore asterisk-classic and asterisk-bristuff
* FreePlay Music files location changed
* Disabling h323 build for now, until I figure what's wrong.


Deleted: asterisk/branches/experimental/debian/asterisk-classic.install
===================================================================
--- asterisk/branches/experimental/debian/asterisk-classic.install	2006-10-06 16:43:15 UTC (rev 2492)
+++ asterisk/branches/experimental/debian/asterisk-classic.install	2006-10-06 21:51:22 UTC (rev 2493)
@@ -1,4 +0,0 @@
-usr/lib/asterisk
-usr/sbin
-var/lib/asterisk
-usr/share/asterisk/firmware/iax

Deleted: asterisk/branches/experimental/debian/asterisk-classic.links
===================================================================
--- asterisk/branches/experimental/debian/asterisk-classic.links	2006-10-06 16:43:15 UTC (rev 2492)
+++ asterisk/branches/experimental/debian/asterisk-classic.links	2006-10-06 21:51:22 UTC (rev 2493)
@@ -1 +0,0 @@
-usr/share/man/man8/asterisk.8 usr/share/man/man8/rasterisk.8

Copied: asterisk/branches/experimental/debian/asterisk.install (from rev 2487, asterisk/branches/experimental/debian/asterisk-classic.install)
===================================================================
--- asterisk/branches/experimental/debian/asterisk.install	                        (rev 0)
+++ asterisk/branches/experimental/debian/asterisk.install	2006-10-06 21:51:22 UTC (rev 2493)
@@ -0,0 +1,4 @@
+usr/lib/asterisk
+usr/sbin
+var/lib/asterisk
+usr/share/asterisk/firmware/iax

Copied: asterisk/branches/experimental/debian/asterisk.links (from rev 2487, asterisk/branches/experimental/debian/asterisk-classic.links)
===================================================================
--- asterisk/branches/experimental/debian/asterisk.links	                        (rev 0)
+++ asterisk/branches/experimental/debian/asterisk.links	2006-10-06 21:51:22 UTC (rev 2493)
@@ -0,0 +1 @@
+usr/share/man/man8/asterisk.8 usr/share/man/man8/rasterisk.8

Modified: asterisk/branches/experimental/debian/changelog
===================================================================
--- asterisk/branches/experimental/debian/changelog	2006-10-06 16:43:15 UTC (rev 2492)
+++ asterisk/branches/experimental/debian/changelog	2006-10-06 21:51:22 UTC (rev 2493)
@@ -5,6 +5,11 @@
     it also uses ASTDATADIR :-) :-)
   * need to understand this menuselect and how to encorporate into debian.
   * need to discuss with upstream iLBC conflict with GPL
+  * Ugly hack in version number.
+  * get-orig-source now works, though.
+  * No maore asterisk-classic and asterisk-bristuff
+  * FreePlay Music files location changed
+  * Disabling h323 build for now, until I figure what's wrong.
 
  -- Mark Purcell <msp at debian.org>  Mon, 25 Sep 2006 08:46:16 +0100
 

Modified: asterisk/branches/experimental/debian/control
===================================================================
--- asterisk/branches/experimental/debian/control	2006-10-06 16:43:15 UTC (rev 2492)
+++ asterisk/branches/experimental/debian/control	2006-10-06 21:51:22 UTC (rev 2493)
@@ -4,12 +4,12 @@
 Maintainer: Debian VoIP Team <pkg-voip-maintainers at lists.alioth.debian.org>
 Uploaders: Mark Purcell <msp at debian.org>, Kilian Krause <kilian at debian.org>, Jose Carlos Garcia Sogo <jsogo at debian.org>, Santiago Garcia Mantinan <manty at debian.org>, Simon Richter <sjr at debian.org>, Tzafrir Cohen <tzafrir.cohen at xorcom.com>
 Standards-Version: 3.6.1
-Build-Depends: debhelper (>= 4.0.4), sed (>= 3.95), zlib1g-dev, libreadline5-dev, libgsm1-dev, libssl-dev, libzap-dev, libtonezone-dev (>= 1:1.2.3-1), bison, libasound2-dev, postgresql-dev, unixodbc-dev, libpri-dev (>= 1.2.3-1), dpatch (>= 2.0.10), zaptel-source (>= 1:1.2.3-1), autotools-dev, libnewt-dev, libsqlite-dev, libspeex-dev, graphviz, libcurl3-dev, doxygen, gsfonts, libpopt-dev, libopenh323-dev (>= 1.17.4-1)
+Build-Depends: debhelper (>= 4.0.4), sed (>= 3.95), zlib1g-dev, libreadline5-dev, libgsm1-dev, libssl-dev, libzap-dev, libtonezone-dev (>= 1:1.2.3-1), bison, libasound2-dev, postgresql-dev, unixodbc-dev, libpri-dev (>= 1.2.3-1), dpatch (>= 2.0.10), zaptel-source (>= 1:1.2.3-1), autotools-dev, libnewt-dev, libsqlite-dev, libspeex-dev, graphviz, libcurl3-dev, doxygen, gsfonts, libpopt-dev, libopenh323-dev (>= 1.17.4-1), libiksemel-dev
 
 Package: asterisk
-Architecture: all
+Architecture: any
 Section: comm
-Depends: asterisk-classic (>= ${source:Version}) | asterisk-bristuff (>= ${source:Version}), adduser (>= 3.63)
+Depends: asterisk-config (= ${source:Version}) | asterisk-config-custom, adduser (>= 3.63), asterisk-sounds-main (>= 1:1.0.2)
 Conflicts: asterisk-oh323 (<= 0.6.6pre3-3)
 Suggests: gnomemeeting, ekiga, ohphone, kphone, asterisk-doc, asterisk-dev, asterisk-rate-engine
 Description: Open Source Private Branch Exchange (PBX)
@@ -30,70 +30,11 @@
   * Tormenta Dual T1 card (http://www.bsdtelephony.com.mx)
   * CAPI compatible ISDN cards can be run using the add-on package chan-capi
  .
- This Debian package includes the sample configuration, with demonstration
+ This is the main package that includes the asterisk daemon.
  extensions, etc
  .
  Website: http://www.asterisk.org.
 
-Package: asterisk-classic
-Architecture: any
-Section: comm
-Depends: ${shlibs:Depends}, asterisk (= ${source:Version}), asterisk-config (= ${source:Version}) | asterisk-config-custom, adduser (>= 3.63), asterisk-sounds-main (>= 1:1.0.2)
-Conflicts: asterisk-bristuff
-Description: Open Source Private Branch Exchange (PBX) - original Digium version
- Asterisk is an Open Source PBX and telephony toolkit.  It is, in a
- sense, middleware between Internet and telephony channels on the bottom,
- and Internet and telephony applications at the top.
- .
- Asterisk can be used with Voice over IP (SIP, H.323, IAX) standards, or the 
- Public Switched Telephone Network (PSTN) through Supported Hardware.
- .
- Supported hardware:
- .
-  * All Wildcard (tm) products from Digium (http://www.digium.com)
-  * QuickNet Internet PhoneJack and LineJack (http://www.quicknet.net)
-  * Full Duplex Sound Card supported by Linux
-  * Adtran Atlas 800 Plus
-  * ISDN4Linux compatible ISDN card
-  * Tormenta Dual T1 card (http://www.bsdtelephony.com.mx)
-  * CAPI compatible ISDN cards can be run using the add-on package chan-capi
- .
- This Debian package includes the sample configuration, with demonstration
- extensions, etc
- .
- Website: http://www.asterisk.org.
-
-Package: asterisk-bristuff
-Architecture: any
-Section: comm
-Depends: ${shlibs:Depends}, asterisk (= ${source:Version}), asterisk-config (= ${source:Version}) | asterisk-config-custom, adduser (>= 3.63), asterisk-sounds-main (>= 1:1.0.2)
-Conflicts: asterisk-classic
-Description: Open Source Private Branch Exchange (PBX) - BRIstuff-enabled version
- Asterisk is an Open Source PBX and telephony toolkit.  It is, in a
- sense, middleware between Internet and telephony channels on the bottom,
- and Internet and telephony applications at the top.
- .
- The BRIstuff patch from www.junghanns.net enables support from certain
- hardware like HFC ISDN cards which are mainly consumer hardware.
- .
- Asterisk can be used with Voice over IP (SIP, H.323, IAX) standards, or the 
- Public Switched Telephone Network (PSTN) through Supported Hardware.
- .
- Supported hardware:
- .
-  * All Wildcard (tm) products from Digium (http://www.digium.com)
-  * QuickNet Internet PhoneJack and LineJack (http://www.quicknet.net)
-  * Full Duplex Sound Card supported by Linux
-  * Adtran Atlas 800 Plus
-  * ISDN4Linux compatible ISDN card
-  * Tormenta Dual T1 card (http://www.bsdtelephony.com.mx)
-  * CAPI compatible ISDN cards can be run using the add-on package chan-capi
- .
- This Debian package includes the sample configuration, with demonstration
- extensions, etc
- .
- Website: http://www.asterisk.org.
-
 Package: asterisk-h323
 Architecture: any
 Recommends: asterisk, asterisk-oh323

Modified: asterisk/branches/experimental/debian/rules
===================================================================
--- asterisk/branches/experimental/debian/rules	2006-10-06 16:43:15 UTC (rev 2492)
+++ asterisk/branches/experimental/debian/rules	2006-10-06 21:51:22 UTC (rev 2493)
@@ -1,32 +1,209 @@
 #!/usr/bin/make -f
-# Sample debian/rules that uses cdbs.  Originaly written by Robert Millan.
-# This file is public domain.
+# Sample debian/rules that uses debhelper.
+# This file is public domain software, originally written by Joey Hess. 
 
-# Add here any variable or target overrides you need
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
 
--include /usr/share/cdbs/1/class/autotools.mk
--include /usr/share/cdbs/1/rules/debhelper.mk
-#-include /usr/share/cdbs/1/rules/simple-patchsys.mk
+# This is the debhelper compatibility version to use.
+export DH_COMPAT=4
 
-DEB_DH_INSTALL_ARGS := --sourcedir=debian/tmp
-COMMON_CONFIGURE_FLAGS = --data-dir=/usr/share/asterisk
-# DEB_CONFIGURE_EXTRA_FLAGS = 
+export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
+ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
+  confflags += --build $(DEB_HOST_GNU_TYPE)
+else
+  confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
+endif
+
+export PROC := $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU)
+
+MAKEFLAGS = OPTIMIZE=-O2 MAKECMDGOALS=dont-optimize
+
+ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -g
+endif
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+	INSTALL_PROGRAM += -s
+endif
+
+export OPENH323DIR=/usr/share/openh323
+export PWLIBDIR=/usr/share/pwlib
+
+include /usr/share/dpatch/dpatch.make
+
 DEBVERSION:=$(shell head -n 1 debian/changelog \
 		    | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
-# For the moment, don't trust UPVERSION parsing from the changelog.
-# Sanity is to return on 1.4.0 .
-#UPVERSION:=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/.dfsg$$//')
-UPVERSION=1.4.0-beta2
+UPVERSION:=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/.dfsg$$//')
+# TODO: ditch this variable:
+UPVERSION_REAL:=1.4.0-beta2
 
 FILENAME := asterisk_$(UPVERSION).dfsg.orig.tar.gz
-UPFILENAME := asterisk_$(UPVERSION).orig.tar.gz
-URL := http://ftp2.digium.com/pub/asterisk/releases/asterisk-$(UPVERSION).tar.gz
+UPFILENAME := asterisk_$(UPVERSION_REAL).orig.tar.gz
+URL := http://ftp2.digium.com/pub/asterisk/releases/asterisk-$(UPVERSION_REAL).tar.gz
 
+
+check-sounds:
+	( [ ! -f sounds/asterisk-moh-freeplay-wav.tar.gz ] && \
+	  [ ! -f sounds/fpm-calm-river.mp3 ] && \
+	  [ ! -f sounds/fpm-sunshine.mp3 ]   && \
+	  [ ! -f sounds/fpm-world-mix.mp3 ] ) || \
+		(echo "WARNING: fpm sounds must to be removed from sources before packaging." ; false )
+	touch $@
+	
+BRISTUFF_DIR=debian/build/asterisk-bristuff
+config.status: check-sounds patch-stamp
+	dh_testdir
+	# Add here commands to configure the package.
+	touch .cleancount
+	- (cd editline ; \
+	if [ -f config.sub.old ]; then \
+	  rm -f config.sub; \
+	else \
+	  mv config.sub config.sub.old; \
+	fi; \
+	if [ -f config.guess.old ]; then \
+	  rm -f config.guess; \
+	else \
+	  mv config.guess config.guess.old; \
+	fi; \
+	ln -s /usr/share/misc/config.sub config.sub; \
+	ln -s /usr/share/misc/config.guess config.guess; \
+	cd ..)
+
+	cd editline;./configure $(confflags)
+	touch $@
+
+build-arch: build-arch-stamp
+build-arch-stamp: config.status
+	dh_testdir
+
+	# Add here command to compile/build the package.
+	$(MAKE) $(MAKEFLAGS)
+	#$(MAKE) $(MAKEFLAGS) -C channels/h323 opt
+
+	touch $@
+
+build-indep: build-indep-stamp
+build-indep-stamp: config.status 
+	dh_testdir
+
+	# Add here command to compile/build the arch indep package.
+	# It's ok not to do anything here, if you don't need to build
+	#  anything for this package.
+	#/usr/bin/docbook-to-man debian/asterisk.sgml > asterisk.1
+ifndef ASTERISK_NO_DOCS
+	$(MAKE) progdocs
+endif
+
+	touch $@
+
+
+build: build-arch build-indep
+
+clean: cleaned unpatch 
+cleaned:
+	dh_testdir
+	dh_testroot
+	
+	# Add here commands to clean up after the build process.
+	-test -d channels/h323 && $(MAKE) -C channels/h323 clean
+	-$(RM) -f channels/h323/libchanh323.a
+	-$(MAKE) clean
+	-$(RM) -rf debian/build
+	-$(RM) utils/streamplayer
+	#-$(RM) -f fxstest ztmonitor ztspeed zttest
+	-$(RM) -fR doc/api agi/eagi-test agi/eagi-sphinx-test
+	-$(RM) debian/asterisk.8.gz
+	-(test -d editline &&cd editline; \
+	if [ -f config.sub.old ]; then \
+	   mv config.sub.old config.sub; \
+	fi; \
+	if [ -f config.guess.old ]; then \
+	   mv config.guess.old config.guess; \
+	fi; \
+	cd ..)
+	-test -d configs && chmod -x configs/*.sample
+	-$(RM) -f build-arch-stamp build-indep-stamp config.status check-sounds
+
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs var/run/asterisk
+	
+	# Add here commands to install the package into debian/<packagename>
+	$(MAKE) DESTDIR=$(CURDIR)/debian/tmp install samples
+	cp channels/h323/h323.conf.sample $(CURDIR)/debian/tmp/etc/asterisk/h323.conf
+	mkdir -p $(CURDIR)/debian/tmp/etc/default/
+	cp debian/asterisk.default $(CURDIR)/debian/tmp/etc/default/asterisk
+	mkdir -p $(CURDIR)/debian/tmp/usr/lib/cgi-bin/asterisk/
+	cp contrib/scripts/vmail.cgi $(CURDIR)/debian/tmp/usr/lib/cgi-bin/asterisk/
+	chmod +x $(CURDIR)/debian/tmp/usr/lib/cgi-bin/asterisk/vmail.cgi
+	$(RM) -f $(CURDIR)/debian/tmp/usr/sbin/{stereorize,streamplayer}
+	# override some default configurations. Leave the original ones
+	# in the sample configs:
+	cp -a debian/ast_config/* $(CURDIR)/debian/tmp/etc/asterisk
+	
+	mkdir -p $(CURDIR)/debian/asterisk/usr/share/asterisk/bin
+	cp debian/asterisk_fix $(CURDIR)/debian/asterisk/usr/share/asterisk/bin
+	chmod +x $(CURDIR)/debian/asterisk/usr/share/asterisk/bin/asterisk_fix
+	
+	mkdir -p $(CURDIR)/debian/tmp/usr/share/asterisk/firmware/iax
+	
+	dh_install --sourcedir=debian/tmp
+	
+	install -m 644 include/asterisk.h $(CURDIR)/debian/asterisk-dev/usr/include/asterisk.h
+
+# Build architecture-independent files here.
+binary-indep: build install
+	dh_testdir -i
+	dh_testroot -i
+	dh_installlogrotate -i 
+	dh_installinit -i -- defaults 21
+	dh_installdocs -i -XREADME.cygwin
+	dh_installexamples -i -XCVS
+	dh_installcron -i
+	dh_installchangelogs ChangeLog -i
+	dh_link -i 
+	dh_compress -i
+	dh_fixperms -i
+	dh_installdeb -i
+	dh_gencontrol -i
+	dh_md5sums -i
+	dh_builddeb -i
+
+
+# Build architecture-dependent files here.
+binary-arch: build install
+	dh_testdir -a
+	dh_testroot -a
+	dh_installdocs -a
+	dh_installman *.[1-8] debian/*.1 debian/*.8
+	dh_installexamples -a -XCVS
+	dh_installchangelogs ChangeLog -a
+	dh_strip -a
+	dh_link -a
+	dh_compress -a
+	dh_fixperms -a
+	dh_installdeb -a
+	#rm debian/asterisk/usr/lib/asterisk/modules/pbx_gtkconsole.so
+	rm -f debian/asterisk/usr/lib/asterisk/modules/chan_h323.so
+	dh_makeshlibs -a 
+	dh_shlibdeps -a
+	dh_gencontrol -a
+	dh_md5sums -a
+	dh_builddeb -a
+
 print-version:
 	@@echo "Debian version:          $(DEBVERSION)"
 	@@echo "Upstream version:        $(UPVERSION)"
 
+#TMP_TARBALL_TOP=../tarballs/asterisk-$(UPVERSION).tmp/asterisk-$(UPVERSION)
+TMP_TARBALL_TOP=../tarballs/asterisk-$(UPVERSION).tmp/asterisk-$(UPVERSION_REAL)
 get-orig-source:
 	@@dh_testdir
 	@@[ -d ../tarballs/. ]||mkdir -p ../tarballs
@@ -36,11 +213,15 @@
 	@@mkdir -p ../tarballs/asterisk-$(UPVERSION).tmp/
 	@@cd ../tarballs/asterisk-$(UPVERSION).tmp ; \
 	tar xfz ../$(UPFILENAME) 
-	@@find ../tarballs/asterisk-$(UPVERSION).tmp -type f -name 'fpm-*.mp3'|xargs -r rm 
-	@@rm -rf ../tarballs/asterisk-$(UPVERSION).tmp/asterisk-$(UPVERSION)/codecs/ilbc 
-	@@rm -rf ../tarballs/asterisk-$(UPVERSION).tmp/asterisk-$(UPVERSION)/contrib/firmware/
+	@@rm -f  $(TMP_TARBALL_TOP)/sounds/fpm-*.mp3
+	@@rm -f  $(TMP_TARBALL_TOP)/sounds/asterisk-moh-freeplay-wav.tar.gz
+	@@rm -rf $(TMP_TARBALL_TOP)/codecs/ilbc 
+	@@rm -f  $(TMP_TARBALL_TOP)/codecs/codec_ilbc.c
+	@@rm -rf $(TMP_TARBALL_TOP)/contrib/firmware/
 	@@cd ../tarballs/asterisk-$(UPVERSION).tmp ; \
 	tar cfz ../$(FILENAME) *
 	@@echo Cleaning up...
 	@@$(RM) -rf ../tarballs/asterisk-$(UPVERSION).tmp/
 
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install clean patch unpatch




More information about the Pkg-voip-commits mailing list