bristuff 0.3.0-PRE1d

Tzafrir Cohen tzafrir.cohen at xorcom.com
Thu Dec 22 18:35:31 UTC 2005


Still want bristuff?

I put some work into it last night. Attached are the results:

Zaptel: 
""""""
part the changes here remove unnecessary bits from the patch
Makefile_targets.patch. It has practically reverted the other patches.
Now the patches are indeed independent.

/me will try to get them accepted upstream again :-(

I also remove makefw (totally unnecessary) torisatool and sethdlc-new
(unnecessary until proven otherwise. Should I fie a bug report before
doing so? They are removed in Makefile_deps_utils in the line that sets
BINS. You can easily hand-edit that patch now.

Bristuff support can be removed by removing the bristuff patch from the
list of patches, and setting USE_BRISTUFF=0 in debian/rules . I have not
tested it, though.


Libpri:
""""""
After my previous suggestion for separate libpri*-bristuffed packages, I
thought a bit about that and decided that they belong in the same
package. I thus wrote a patch to allow building libpri with a different
name.

Thus I build in the root build dir the default library from Digium and
in the subdirectory bristuffed the patched copy from bristuff with the
soname libpri-bristuffed.so.1

All changes are conditioned on setting USE_BRISTUFF=1 in debian/rules .

As I am totally unable to communicate with Kapejod I have not bothered
this time to trim the unnecessary stuff and use asterisk 1.2 string
functions. I won't waste more time on that. I have just trimmed out a
number of obvious cases of copyright files destructions (diff my dpatch
to the original for details: it is only hand-edited).


Asterisk
""""""""
Didn't get to that one yet. I'll just note that this patch has inflated
in size. I'll also note that the bristuff patch now includes the code
for chan_capi .

-- 
Tzafrir Cohen     icq#16849755  +972-50-7952406
tzafrir.cohen at xorcom.com  http://www.xorcom.com
-------------- next part --------------
Index: debian/control
===================================================================
--- debian/control	(revision 1083)
+++ debian/control	(working copy)
@@ -43,3 +43,5 @@
  This package contains the source code for zaptel kernel module providing
  device drivers for various telephony hardware, including the Wildcard 
  series of interface cards (X100P, T400P, E400P, S100P, S100U).
+ .
+ It is normally used to build kernel modules package: m-a a-i zaptel
Index: debian/patches/Makefile_targets.dpatch
===================================================================
--- debian/patches/Makefile_targets.dpatch	(revision 1083)
+++ debian/patches/Makefile_targets.dpatch	(working copy)
@@ -6,94 +6,11 @@
 ## DP: allow separate installation of the programs and the modules
 
 @DPATCH@
-diff -urNad zaptel-1.2.0~/Makefile zaptel-1.2.0/Makefile
---- zaptel-1.2.0~/Makefile	2005-11-30 16:24:28.000000000 +0000
-+++ zaptel-1.2.0/Makefile	2005-11-30 16:24:29.000000000 +0000
-@@ -7,11 +7,6 @@
- BASEADDR=0xd0000
- 
- HOSTCC=gcc
--ifeq ($(DEB_HOST_GNU_TYPE),)
--UNAME_M:=$(shell uname -m)
--else
--UNAME_M:=$(DEB_HOST_GNU_TYPE)
--endif
- # If you want to build for a kernel other than the current kernel, set KVERS
- ifndef KVERS
- KVERS:=$(shell uname -r)
-@@ -24,16 +19,11 @@
-     KSRC:=$(shell for dir in $(KSRC_SEARCH_PATH); do if [ -d $$dir ]; then echo $dir; break; fi; done)
-   endif
+diff -urNad zaptel-1.2.1/Makefile /tmp/dpep.hnX6Yg/zaptel-1.2.1/Makefile
+--- zaptel-1.2.1/Makefile	2005-12-22 00:01:06.000000000 +0200
++++ /tmp/dpep.hnX6Yg/zaptel-1.2.1/Makefile	2005-12-22 00:09:25.000000000 +0200
+@@ -122,6 +122,16 @@
  endif
--KVERS_MAJ:=$(shell echo $(KVERS) | cut -d. -f1-2)
- KINCLUDES:=$(KSRC)/include
- 
- CFLAGS+=-I. -O4 -g -Wall -DBUILDING_TONEZONE #-DTONEZONE_DRIVER
--ifneq (,$(findstring ppc,$(UNAME_M)))
--CFLAGS_PPC:=-fsigned-char
--endif
--ifneq (,$(findstring x86_64,$(UNAME_M)))
--CFLAGS_X86-64:=-m64
--endif
-+CFLAGS_PPC:=$(shell if uname -m | grep -q ppc; then echo "-fsigned-char"; fi)
-+CFLAGS_X86-64:=$(shell if uname -m | grep -q x86_64; then echo "-m64"; fi)
- CFLAGS+=$(CFLAGS_PPC) $(CFLAGS_X86-64)
- LCFLAGS=-fPIC $(CFLAGS) -DBUILDING_TONEZONE
- KFLAGS=-I$(KINCLUDES) -O6
-@@ -42,15 +32,9 @@
- ifneq (,$(wildcard $(KINCLUDES)/linux/modversions.h))
-   KFLAGS+=-DMODVERSIONS -include $(KINCLUDES)/linux/modversions.h
- endif
--ifneq (,$(findstring ppc,$(UNAME_M)))
--KFLAGS_PPC:=-msoft-float -fsigned-char
--endif
-+KFLAGS_PPC:=$(shell if uname -m | grep -q ppc; then echo "-msoft-float -fsigned-char"; fi)
- KFLAGS+=$(KFLAGS_PPC)
--ifeq ($(KVERS_MAJ),2.4)
--  ifneq (,$(findstring x86_64,$(UNAME_M)))
--    KFLAGS+=-mcmodel=kernel
--  endif
--endif
-+KFLAGS+=$(shell if uname -r | grep -q 2.4; then if uname -m | grep -q x86_64; then echo "-mcmodel=kernel"; fi; fi)
- 
- #
- # Features are now configured in zconfig.h
-@@ -65,10 +49,10 @@
- CONFIG_FILE=$(INSTALL_PREFIX)/etc/zaptel.conf
- CFLAGS+=-DZAPTEL_CONFIG=\"$(CONFIG_FILE)\"
- 
--ifeq ($(KVERS_MAJ),2.4)
--  BUILDVER:=linux24
--else
-+ifeq (2.6,$(shell echo $(KVERS) | cut -d. -f1-2))
-   BUILDVER:=linux26
-+else
-+  BUILDVER:=linux24
- endif
- 
- ifeq ($(BUILDVER),linux26)
-@@ -93,11 +77,14 @@
-   endif
- endif
- 
--# This is not related to the version that we build. Rather, to the 
--# version that we runs. If we build for 2.4 using 2.4 headers on a 2.6
--# system with udev mounted on /dev , no point in installing files to /dev
--# because they'll be wiped at next reboot.
--DYNFS=$(shell ps ax | grep -v grep | grep -qw 'devfsd\|udevd' && echo "yes")
-+ifeq (${BUILDVER},linux24)
-+#We only support DEVFS in linux 2.4 kernels, since its considered obsolete post 2.4
-+DYNFS:=$(shell ps ax | grep -v grep | grep -q devfsd && echo "yes")
-+endif
-+ifeq (${BUILDVER},linux26)
-+#Tests for newer linux-2.6 udev support
-+DYNFS:=$(shell ps ax | grep -v grep | grep udevd && echo "yes")
-+endif
- 
- CHKCONFIG:=$(shell sh -c 'type -p chkconfig' 2> /dev/null)
- ifndef CHKCONFIG
-@@ -118,21 +105,32 @@
- endif
  MODULESO:=$(MODULES:%=%.o)
  MODULESKO:=$(MODULES:%=%.ko)
 +ifeq ($(BUILDVER),linux26)
@@ -109,15 +26,7 @@
  
  ifneq (,$(wildcard /usr/include/newt.h))
  ZTTOOL:=zttool
- endif
--BINS:=ztcfg sethdlc-new ztmonitor ztspeed $(ZTTOOL) zttest fxotune
--UTILS:=tor2ee ztspeed zttool ztmonitor sethdlc-new \
--  usbfxstest fxstest fxotune fxsdump ztdiag
--UTILSO:=$(UTILS:%=%.o)
-+BINS=ztcfg torisatool makefw ztmonitor ztspeed $(ZTTOOL) zttest fxotune
- 
- #PRIMARY=wcfxsusb
- PRIMARY=torisa
+@@ -136,7 +146,11 @@
  #PRIMARY=wcfxo
  PWD:=$(shell pwd)
  
@@ -130,140 +39,8 @@
  
  linux24: $(MODULESO) $(BINS)
  
-@@ -153,30 +151,47 @@
- 
- tests: patgen pattest patlooptest hdlcstress hdlctest hdlcgen hdlcverify timertest
- 
--tor2.o: tor2-hw.h tor2fw.h
-+tor2.o: tor2-hw.h tor2fw.h zaptel.h
- 
--zaptel.o: digits.h arith.h sec.h mec.h sec-2.h mec2.h mec3.h zconfig.h
-+zaptel.o: zaptel.h digits.h arith.h sec.h mec.h sec-2.h mec2.h mec3.h zconfig.h
- 
--torisa.o: torisa.h
-+torisa.o: zaptel.h torisa.h
- 
--wcusb.o: wcusb.h
-+wcusb.o: wcusb.h zaptel.h
- 
--wcfxsusb.o: wcfxsusb.h
-+wcfxsusb.o: wcfxsusb.h zaptel.h
- 
--wctdm.o: wctdm.h
-+wcfxo.o: zaptel.h
- 
--wctdm24xxp.o: wctdm.h
-+wct1xxp.o: zaptel.h
- 
--pciradio.o: radfw.h
-+wcte11xp.o: zaptel.h
-+
-+ztd-loc.o: zaptel.h
-+
-+wct4xxp.o: zaptel.h
-+
-+wctdm.o: zaptel.h wctdm.h
-+
-+wctdm24xxp.o: zaptel.h wctdm.h
-+
-+pciradio.o: zaptel.h radfw.h
-+
-+wcs3200p.o: zaptel.h
- 
- ztdummy.o: ztdummy.h
- 
-+ztdynamic.o: zaptel.h
-+
-+ztd-eth.o: zaptel.h
-+
- $(MODULESO): %.o: %.c zaptel.h
- 	$(HOSTCC) $(KFLAGS) -o $@ -c $<
- 
- tor2ee.o: tor2-hw.h
- 
--tor2ee: LDFLAGS+=-lpci
-+tor2ee: tor2ee.o
-+	$(CC) $(CFLAGS) -o $@ $^ -lpci
- 
- zonedata.lo: zonedata.c
- 	$(CC) -c $(LCFLAGS) -o $@ $^
-@@ -196,7 +211,8 @@
- radfw.h: makefw pciradio.rbt
- 	./makefw pciradio.rbt radfw > radfw.h
- 
--gendigits: LDFLAGS+=-lm
-+gendigits: gendigits.o
-+	$(CC) -o $@ $^ -lm
- 
- zaptel.c: tones.h 
- 
-@@ -208,10 +224,23 @@
- 
- ztmonitor.o: ztmonitor.c zaptel.h
- 
--ztspeed: CFLAGS=
--ztspeed.o: CFLAGS=
--zttool: LDFLAGS+=-lnewt
--sethdlc-new.o: CFLAGS+=-I$(KINCLUDES)
-+ztspeed.o: ztspeed.c
-+	$(CC) -o $@ -c $^
-+
-+zttool: zttool.o
-+	$(CC) -o $@ $^ -lnewt
-+
-+ztmonitor: ztmonitor.o
-+	$(CC) -o $@ $^
-+
-+ztspeed: ztspeed.o
-+	$(CC) -o $@ $^
-+
-+sethdlc-new: sethdlc-new.o
-+	$(CC) -o $@ $^
-+
-+sethdlc-new.o: sethdlc-new.c
-+	$(CC) -o $@ -c $(CFLAGS) -I$(KINCLUDES) $^
- 
- libtonezone.a: $(TZOBJS)
- 	ar rcs libtonezone.a $^
-@@ -236,20 +265,26 @@
- complex.o: complex.cc
- 	$(CC) -o $@ -c $^
- 
--usbfxstest: LDFLAGS+=-lzap
--fxstest: $(LIBTONEZONE_SO)
--fxstest: LDFLAGS+=-lm
--fxotune: LDFLAGS+=-lm
--fxsdump: LDFLAGS+=-lm
-+usbfxstest.o: usbfxstest.c
-+	$(CC) -o $@ -g -c $^
-+
-+usbfxstest: usbfxstest.o 
-+	$(CC) -o $@ $^ -lzap
-+
-+fxstest: fxstest.o $(LIBTONEZONE_SO)
-+	$(CC) -o $@ $^ -lm
-+
-+fxotune: fxotune.o
-+	$(CC) -o $@ $^ -lm
-+
-+fxsdump: fxsdump.o
-+	$(CC) -o $@ $^ -lm
- 
- stackcheck: checkstack $(BUILDVER)
- 	./checkstack *.o
- 
--$(UTILS): %: %.o
--	$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
--
--$(UTILSO): %.o: %.c
--	$(CC) $(CFLAGS) -o $@ -c $<
-+ztdiag: ztdiag.o 
-+	$(CC) -o $@ $^
- 
- devices:
- ifndef DYNFS
-@@ -380,6 +415,21 @@
- 		echo "Not CVS";  \
+@@ -387,6 +401,21 @@
+ 		echo "Not under version control"; \
  	fi
  
 +# make should *fail* and not silently succeed if a program did not build
Index: debian/patches/Makefile_deps_utils.dpatch
===================================================================
--- debian/patches/Makefile_deps_utils.dpatch	(revision 1083)
+++ debian/patches/Makefile_deps_utils.dpatch	(working copy)
@@ -13,7 +13,7 @@
  ZTTOOL:=zttool
  endif
 -BINS=ztcfg torisatool makefw ztmonitor ztspeed $(ZTTOOL) zttest fxotune
-+BINS:=ztcfg sethdlc-new ztmonitor ztspeed $(ZTTOOL) zttest fxotune
++BINS:=ztcfg ztmonitor ztspeed $(ZTTOOL) zttest fxotune
 +UTILS:=tor2ee ztspeed zttool ztmonitor sethdlc-new \
 +  usbfxstest fxstest fxotune fxsdump ztdiag
 +UTILSO:=$(UTILS:%=%.o)
Index: debian/patches/00list
===================================================================
--- debian/patches/00list	(revision 1083)
+++ debian/patches/00list	(working copy)
@@ -8,4 +8,4 @@
 # touches the Makefile as well:
 echocan_env
 xpp
-#bristuff-0.3.0-PRE1
+bristuff-0.3.0-PRE1d
Index: debian/zaptel.init
===================================================================
--- debian/zaptel.init	(revision 1083)
+++ debian/zaptel.init	(working copy)
@@ -39,8 +39,8 @@
 		# if no zaptel module loaded: load ztdummy. other modules should have
 		# been loaded by now
 		# The first holds if zaptel is not loaded at all. The second: if 
-		# zaptel is loaded but no other module is.
-		if [ ! -d /proc/zaptel ] || ! echo /proc/zaptel/* | grep -v '\*'| grep -q .
+		# If there is no zaptel timing source:
+		if head -c 0 /dev/zap/pseudo 2>/dev/null
 		then modprobe ztdummy || true # will fail if there is no module package
 		fi
                 if [ -r /etc/fxotune.conf ] && [ -x fxotune ]; then
Index: debian/changelog
===================================================================
--- debian/changelog	(revision 1083)
+++ debian/changelog	(working copy)
@@ -1,3 +1,12 @@
+zaptel (1:1.2.1-2) unstable; urgency=low
+
+  * Added bristuff 0.3.0-PRE1d patch. bristuff re-enabled.
+  * Documentation fixes
+  * Makefile_targets.dpatch is ba its small self
+  * readded bristuff examples. with cwain this time
+
+ -- Tzafrir Cohen <tzafrir.cohen at xorcom.com>  Wed, 21 Dec 2005 23:02:06 +0200
+
 zaptel (1:1.2.1-1) unstable; urgency=low
 
   * New upstream release
Index: debian/rules
===================================================================
--- debian/rules	(revision 1083)
+++ debian/rules	(working copy)
@@ -7,7 +7,7 @@
 
 # This is the debhelper compatibility version to use.
 export DH_COMPAT=4
-USE_BRISTUFF=0
+USE_BRISTUFF=1
 
 -include /usr/share/dpatch/dpatch.make
 
@@ -28,6 +28,9 @@
 -include $(MA_DIR)/include/common-rules.make
 
 MOD_EXAMPLES_DIR:=modexamples
+ifeq (1,$(USE_BRISTUFF))
+  BRISTUFF_EXAMPLES:=$(MOD_EXAMPLES_DIR)/*
+endif
 
 kdist_clean: clean-unpatched
 
@@ -137,7 +140,7 @@
 	tar cjf debian/$(PREFIX)-source/usr/src/$(PREFIX).tar.bz2 \
 	  -C $(TARPARDIR) modules
 ifeq (1,$(USE_BRISTUFF))
-	set -e; for module in qozap zaphfc; do \
+	set -e; for module in cwain qozap zaphfc; do \
 		mkdir -p $(MOD_EXAMPLES_DIR)/$$module; \
 		cp -a $$module/*.conf* $(MOD_EXAMPLES_DIR)/$$module; \
 	done
@@ -180,7 +183,8 @@
 	
 	# should be removed, eventually. Still left for compatibility
 	dh_installinit --update-rcd-params="defaults 15 30"
-	dh_installexamples -a zaptel.conf.sample
+	dh_installexamples -a zaptel.conf.sample $(BRISTUFF_EXAMPLES)
+	
 	dh_installmodules -a
 	dh_installchangelogs -a ChangeLog
 	dh_link -a
Index: debian/README.Debian
===================================================================
--- debian/README.Debian	(revision 1083)
+++ debian/README.Debian	(working copy)
@@ -7,7 +7,15 @@
 following command:
 # module-assistant a-i zaptel
 
+It may be handy (for e.g., testing purposes) to build the module packages
+for all of the kernel-header packages installed on your system. Something 
+in the lines of:
 
+  m-a -u . -t -i -f -k "`echo usr/src/kernel-headers-*`" build zaptel
+
+You can also use the environment variable TARBALL to build the modules 
+with a custom zaptel.tar.bz2 tarball with some local modifications.
+
 Using udev
 ----------
 
@@ -20,17 +28,27 @@
 # zaptel devices -- asterisk is expected to be part of 'dialout' group
 zap/*:root:dialout:660
 
-Please, read README.udev for more info about this topic.
+Note, however, that sarting from Sarge, the defualt udev settings should 
+include those lines.
 
 
 Bristuff
 --------
-Currently disabled until we have a version for HEAD.
+This version has the bristuff (0.3.0-PRE1d) of the bristuff patch and 
+kernel modules. The bristuffed modules require a bristuffed Asterisk
+to work.
+(TODO: what about standard Digium cards? can they work with a non-bristuffed 
+chn_zap?)
 
-
 fxotune
 -------
-See README.fxotune. Still needs to be integrated into the init.d script.
+fxotune is a utulity provided by Digium for fine-tuning parameters of the 
+FXO modules of their TDM cards.
 
+This package includes the fxotune binary. It will also load configuration
+from /etc/fxotune.conf if fxotune was used to tune the FXO modules. Note
+that fxotune onlt works with the newer wctdm driver of zaptel 1.2 and will
+not work ith X100P and clones.
+
 -- Debian VoIP Team <pkg-voip-maintainers at lists.alioth.debian.org>
--- 13th September 2005
+-- 21th December 2005
-------------- next part --------------
Index: debian/patches/libname.dpatch
===================================================================
--- debian/patches/libname.dpatch	(revision 0)
+++ debian/patches/libname.dpatch	(revision 0)
@@ -0,0 +1,78 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## libname.dpatch by  <tzafrir@>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: allows using a different name for the library rather than libpri
+
+ at DPATCH@
+diff -urNad libpri-1.2.1/Makefile /tmp/dpep.yR8qEb/libpri-1.2.1/Makefile
+--- libpri-1.2.1/Makefile	2005-12-22 01:45:04.000000000 +0200
++++ /tmp/dpep.yR8qEb/libpri-1.2.1/Makefile	2005-12-22 01:48:36.000000000 +0200
+@@ -32,16 +32,17 @@
+ OSARCH=$(shell uname -s)
+ PROC?=$(shell uname -m)
+ 
++LIBNAME=pri
+ TOBJS=testpri.o
+ T2OBJS=testprilib.o
+-STATIC_LIBRARY=libpri.a
+-DYNAMIC_LIBRARY=libpri.so.1.0
++STATIC_LIBRARY=lib$(LIBNAME).a
++DYNAMIC_LIBRARY=lib$(LIBNAME).so.1.0
+ STATIC_OBJS=copy_string.o pri.o q921.o prisched.o q931.o pri_facility.o
+ DYNAMIC_OBJS=copy_string.lo pri.lo q921.lo prisched.lo q931.lo pri_facility.lo
+ CFLAGS=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g $(ALERTING) $(LIBPRI_COUNTERS)
+ INSTALL_PREFIX?=
+ INSTALL_BASE=/usr
+-SOFLAGS = -Wl,-hlibpri.so.1
++SOFLAGS = -Wl,-hlib$(LIBNAME).so.1
+ LDCONFIG = /sbin/ldconfig
+ ifeq (${OSARCH},Linux)
+ LDCONFIG_FLAGS=-n
+@@ -55,7 +56,7 @@
+ CFLAGS += -DSOLARIS -I../zaptel-solaris
+ LDCONFIG = 
+ LDCONFIG_FLAGS = \# # Trick to comment out the period in the command below
+-SOSLINK = ln -sf libpri.so.1.0 libpri.so.1
++SOSLINK = ln -sf lib$(LIBNAME).so.1.0 lib$(LIBNAME).so.1
+ #INSTALL_PREFIX = /opt/asterisk  # Uncomment out to install in standard Solaris location for 3rd party code
+ endif
+ 
+@@ -87,22 +88,22 @@
+ 	install -m 644 libpri.h $(INSTALL_PREFIX)$(INSTALL_BASE)/include
+ 	install -m 755 $(DYNAMIC_LIBRARY) $(INSTALL_PREFIX)$(INSTALL_BASE)/lib
+ 	if [ -x /usr/sbin/sestatus ] && ( /usr/sbin/sestatus | grep "SELinux status:" | grep -q "enabled"); then  restorecon -v $(INSTALL_PREFIX)$(INSTALL_BASE)/lib/$(DYNAMIC_LIBRARY); fi
+-	( cd $(INSTALL_PREFIX)$(INSTALL_BASE)/lib ; ln -sf libpri.so.1 libpri.so )
++	( cd $(INSTALL_PREFIX)$(INSTALL_BASE)/lib ; ln -sf lib$(LIBNAME).so.1 lib$(LIBNAME).so )
+ 	install -m 644 $(STATIC_LIBRARY) $(INSTALL_PREFIX)$(INSTALL_BASE)/lib
+ 	if test $$(id -u) = 0; then $(LDCONFIG) $(LDCONFIG_FLAGS); fi
+ else
+ 	install -f $(INSTALL_PREFIX)$(INSTALL_BASE)/include -m 644 libpri.h
+ 	install -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib -m 755 $(DYNAMIC_LIBRARY)
+-	( cd $(INSTALL_PREFIX)$(INSTALL_BASE)/lib ; ln -sf libpri.so.1 libpri.so ; $(SOSLINK) )
++	( cd $(INSTALL_PREFIX)$(INSTALL_BASE)/lib ; ln -sf lib$(LIBNAME).so.1 lib$(LIBNAME).so ; $(SOSLINK) )
+ 	install -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib -m 644 $(STATIC_LIBRARY)
+ endif
+ 
+ uninstall:
+ 	@echo "Removing Libpri"
+-	rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib/libpri.so.1.0
+-	rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib/libpri.so.1
+-	rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib/libpri.so
+-	rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib/libpri.a
++	rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib/lib$(LIBNAME).so.1.0
++	rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib/lib$(LIBNAME).so.1
++	rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib/lib$(LIBNAME).so
++	rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib/lib$(LIBNAME).a
+ 	rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/include/libpri.h
+ 
+ pritest: pritest.o
+@@ -131,7 +132,7 @@
+ $(DYNAMIC_LIBRARY): $(DYNAMIC_OBJS)
+ 	$(CC) -shared $(SOFLAGS) -o $@ $(DYNAMIC_OBJS)
+ 	$(LDCONFIG) $(LDCONFIG_FLAGS) .
+-	ln -sf libpri.so.1 libpri.so
++	ln -sf lib$(LIBNAME).so.1 lib$(LIBNAME).so
+ 	$(SOSLINK)
+ 
+ clean:

Property changes on: debian/patches/libname.dpatch
___________________________________________________________________
Name: svn:executable
   + *

Index: debian/rules
===================================================================
--- debian/rules	(revision 1083)
+++ debian/rules	(working copy)
@@ -10,6 +10,8 @@
 
 CFLAGS = -Wall -g
 
+USE_BRISTUFF=1
+
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 	CFLAGS += -O0
 else
@@ -29,12 +31,21 @@
  awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
 
 configure: configure-stamp
-configure-stamp: patch-stamp
+configure-stamp: patch-stamp bristuff-stamp
 	dh_testdir
 	# Add here commands to configure the package.
 
 	touch configure-stamp
 
+BRISTUFF_DIR=bristuffed
+bristuff-stamp: patch-stamp
+ifeq ($(USE_BRISTUFF),1)
+	mkdir -p $(BRISTUFF_DIR)
+	tar cf - . --exclude=./debian/ --exclude=./$(BRISTUFF_DIR)/ \
+	| tar xf - -C $(BRISTUFF_DIR)
+	cd $(BRISTUFF_DIR); patch <$(PWD)/debian/patches/bristuff.dpatch -p1
+endif
+	touch $@
 
 build: build-stamp
 build-stamp: configure-stamp 
@@ -42,6 +53,9 @@
 
 	# Add here commands to compile the package.
 	$(MAKE)
+ifeq ($(USE_BRISTUFF),1)
+	cd $(BRISTUFF_DIR); make LIBNAME=pri-bristuffed
+endif
 
 	touch build-stamp
 
@@ -53,6 +67,7 @@
 
 	# Add here commands to clean up after the build process.
 	-$(MAKE) clean
+	rm -rf $(BRISTUFF_DIR)
 
 	dh_clean 
 
@@ -64,6 +79,10 @@
 
 	# Add here commands to install the package into debian/tmp
 	$(MAKE) install INSTALL_PREFIX=$(CURDIR)/debian/tmp
+ifeq ($(USE_BRISTUFF),1)
+	cd $(BRISTUFF_DIR); make install INSTALL_PREFIX=$(CURDIR)/debian/tmp \
+	  LIBNAME=pri-bristuffed
+endif
 
 
 # Build architecture-independent files here.
@@ -81,6 +100,9 @@
 	dh_installexamples
 	dh_installman
 	ln -s libpri.so.1.0 debian/libpri1/usr/lib/libpri.so.1
+ifeq ($(USE_BRISTUFF),1)
+	ln -s libpri-bristuffed.so.1.0 debian/libpri1/usr/lib/libpri-bristuffed.so.1
+endif
 	dh_strip
 	dh_compress
 	dh_fixperms


More information about the Pkg-voip-maintainers mailing list