--- misdn-user-1.1.9.1.orig/debian/control
+++ misdn-user-1.1.9.1/debian/control
@@ -0,0 +1,43 @@
+Source: misdn-user
+Section: comm
+Priority: extra
+Maintainer: Simon Richter <sjr@debian.org>
+Build-Depends: linux-headers-misdn (>= 1.1.9.1), debhelper (>= 4.0.0),  quilt, flex, libncurses5-dev
+Standards-Version: 3.7.2
+Vcs-Svn: svn://svn.debian.org/pkg-voip/misdn-user/trunk/
+Vcs-Browser: http://svn.debian.org/wsvn/pkg-voip/misdn-user/?op=log
+Homepage: http://www.misdn.org
+
+Package: misdn-utils
+Section: comm
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: mISDN userspace utilities
+ This package contains the userspace binaries that come with mISDN. At
+ present, the only probably sensible tool is the "loadfirm" utility.
+ .
+ It is highly unlikely that you need this package, but it is included
+ for completeness.
+
+Package: libmisdn-dev
+Section: libdevel
+Architecture: any
+Depends: linux-headers-misdn (>= ${binary:Version})
+Description: mISDN interface library
+ This is the mISDN TE mode library, used by applications that want to call
+ out into an ISDN network while not going through a higher-level stack like
+ CAPI.
+ .
+ As the API/ABI have not stabilized yet, the library is only available as a
+ static build.
+
+Package: libisdnnet-dev
+Section: libdevel
+Architecture: any
+Depends: libmisdn-dev (= ${binary:Version})
+Description: ISDN networking library
+ This is the mISDN NT mode library, used by applications that want to emulate
+ an ISDN network.
+ .
+ As the API/ABI have not stabilized yet, the library is only available as a
+ static build.
--- misdn-user-1.1.9.1.orig/debian/compat
+++ misdn-user-1.1.9.1/debian/compat
@@ -0,0 +1 @@
+4
--- misdn-user-1.1.9.1.orig/debian/watch
+++ misdn-user-1.1.9.1/debian/watch
@@ -0,0 +1,3 @@
+version=3
+opts="uversionmangle=s/_/./g" \
+http://www.misdn.org/downloads/releases/mISDNuser-([\d\._]+)\.tar\.gz
--- misdn-user-1.1.9.1.orig/debian/libmisdn-dev.install
+++ misdn-user-1.1.9.1/debian/libmisdn-dev.install
@@ -0,0 +1,4 @@
+lib/libmISDN.a usr/lib
+suppserv/libsuppserv.a usr/lib
+include/*.h usr/include/mISDNuser
+suppserv/*.h usr/include/mISDNuser
--- misdn-user-1.1.9.1.orig/debian/changelog
+++ misdn-user-1.1.9.1/debian/changelog
@@ -0,0 +1,95 @@
+misdn-user (1.1.9.1-1) UNRELEASED; urgency=low
+
+  [ Victor Seva ]
+  * New upstream release
+  * debian/control: remove old depends version to ${binary:Version}.
+  * debian/rules: remove commented dh_ lines.
+
+  [ Kilian Krause ]
+  * Fix debian/watch
+
+ -- Victor Seva <linuxmaniac@torreviejawireless.org>  Thu, 26 Mar 2009 16:35:15 +0100
+
+misdn-user (1.1.8-1) UNRELEASED; urgency=low
+
+  * New upstream release
+  * Move to quilt. Patches from previous version.
+    Not applied:
+    - subdirs ( no build for some subdirs, clean on example )
+    - testlog ( more verbose ? )
+    Applied:
+    - static ( library static built with pic )
+  * Added watch file.
+  * Added Vcs-Svn and Vcs-Browser stanzas.
+    with those fields "xcontrol test" fails.
+    I temporally comment that line. I need to see if
+    xcontrol could be patched to solve this. 
+    BugReport with my patch: 479235.
+  * Added get-orig-source and print-version rules. 
+  * Removed debian-xcontrol to Build-Depends.
+
+ -- Victor Seva <linuxmaniac@torreviejawireless.org>  Fri, 25 Jul 2008 10:45:13 +0200
+
+misdn-user (1.1.6-1) experimental; urgency=low
+
+  * New upstream release
+
+ -- Simon Richter <sjr@debian.org>  Sun, 04 Nov 2007 02:05:07 +0100
+
+misdn-user (1.1.5-2) experimental; urgency=low
+
+  * Added missing dependency misdn-dev -> linux-headers-misdn
+
+ -- Simon Richter <sjr@debian.org>  Thu, 27 Sep 2007 14:02:18 +0200
+
+misdn-user (1.1.5-1) experimental; urgency=low
+
+  * New upstream release, in experimental due to popular demand.
+
+ -- Simon Richter <sjr@debian.org>  Fri, 17 Aug 2007 01:53:00 +0200
+
+misdn-user (0.0.0+cvs20060214-2) unstable; urgency=low
+
+  * Fix a few instances of broken bitops
+
+ -- Simon Richter <sjr@debian.org>  Wed,  5 Jul 2006 12:50:20 +0200
+
+misdn-user (0.0.0+cvs20060214-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Simon Richter <sjr@debian.org>  Thu, 16 Feb 2006 14:33:07 +0100
+
+misdn-user (0.0.0+cvs20041018-5) unstable; urgency=low
+
+  * Added forceful usage of -fPIC.
+  * Removed duplicate definition of strL2Status (Closes: #287655).
+
+ -- Simon Richter <sjr@debian.org>  Fri, 11 Mar 2005 02:35:28 +0100
+
+misdn-user (0.0.0+cvs20041018-4) unstable; urgency=low
+
+  * Added missing header file bitops.h
+
+ -- Simon Richter <sjr@debian.org>  Tue,  7 Dec 2004 12:23:23 +0100
+
+misdn-user (0.0.0+cvs20041018-3) unstable; urgency=low
+
+  * Removed dependency on kernel headers, fixing HPPA and possibly
+    others (Closes: #283046)
+
+ -- Simon Richter <sjr@debian.org>  Fri, 26 Nov 2004 15:13:52 +0000
+
+misdn-user (0.0.0+cvs20041018-2) unstable; urgency=low
+
+  * Fixed descriptions (Closes: #281177, #281178)
+  * Fixed build-dependencies (Closes: #281272)
+
+ -- Simon Richter <sjr@debian.org>  Tue, 16 Nov 2004 15:46:20 +0100
+
+misdn-user (0.0.0+cvs20041018-1) unstable; urgency=low
+
+  * Initial Release (Closes: #263096).
+
+ -- Simon Richter <sjr@debian.org>  Mon, 18 Oct 2004 16:25:38 +0200
+
--- misdn-user-1.1.9.1.orig/debian/copyright
+++ misdn-user-1.1.9.1/debian/copyright
@@ -0,0 +1,25 @@
+This package was debianized by Simon Richter <sjr@debian.org> on
+Tue,  3 Aug 2004 11:11:56 +0200.
+
+It was downloaded from http://www.isdn4linux.de
+
+Upstream Author: Karsten Keil <kkeil@suse.de>
+
+Copyright:
+
+   This package is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; version 2 dated June, 1991.
+
+   This package is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+
+On Debian systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL'.
+
--- misdn-user-1.1.9.1.orig/debian/misdn-utils.links
+++ misdn-user-1.1.9.1/debian/misdn-utils.links
@@ -0,0 +1 @@
+usr/share/man/man7/undocumented.7.gz usr/share/man/man8/loadfirm.8.gz
--- misdn-user-1.1.9.1.orig/debian/xcontrol
+++ misdn-user-1.1.9.1/debian/xcontrol
@@ -0,0 +1,44 @@
+Source: misdn-user
+Section: comm
+Priority: extra
+Maintainer: Simon Richter <sjr@debian.org>
+Build-Depends-Tools: debhelper (>= 4.0.0), debian-xcontrol (>= 0.0.2~pre1), quilt
+Build-Depends: linux-headers-misdn (>= 1.1.5)
+Standards-Version: 3.7.2
+Vcs-Svn: svn://svn.debian.org/pkg-voip/misdn-user/trunk/
+Vcs-Browser: http://svn.debian.org/wsvn/pkg-voip/misdn-user/?op=log
+Homepage: http://www.misdn.org
+
+Package: misdn-utils
+Section: comm
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: mISDN userspace utilities
+ This package contains the userspace binaries that come with mISDN. At
+ present, the only probably sensible tool is the "loadfirm" utility.
+ .
+ It is highly unlikely that you need this package, but it is included
+ for completeness.
+
+Package: libmisdn-dev
+Section: libdevel
+Architecture: any
+Depends: linux-headers-misdn (>= 1.1.5)
+Description: mISDN interface library
+ This is the mISDN TE mode library, used by applications that want to call
+ out into an ISDN network while not going through a higher-level stack like
+ CAPI.
+ .
+ As the API/ABI have not stabilized yet, the library is only available as a
+ static build.
+
+Package: libisdnnet-dev
+Section: libdevel
+Architecture: any
+Depends: libmisdn-dev (= ${binary:Version})
+Description: ISDN networking library
+ This is the mISDN NT mode library, used by applications that want to emulate
+ an ISDN network.
+ .
+ As the API/ABI have not stabilized yet, the library is only available as a
+ static build.
--- misdn-user-1.1.9.1.orig/debian/rules
+++ misdn-user-1.1.9.1/debian/rules
@@ -0,0 +1,80 @@
+#!/usr/bin/make -f
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+include /usr/share/quilt/quilt.make
+
+DEBVERSION:=$(shell head -n 1 debian/changelog \
+	| sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION:=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//')
+URLVERSION:=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/\./_/g')
+URLVERSION=1_1_9.1
+
+UPFILENAME := mISDNuser-$(URLVERSION).tar.gz
+FILENAME := misdn-user_$(UPVERSION).orig.tar.gz
+URL := http://www.misdn.org/downloads/releases/$(UPFILENAME)
+
+CFLAGS = -Wall -Werror -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -O0
+else
+	CFLAGS += -O2
+endif
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+	INSTALL_PROGRAM += -s
+endif
+
+build: build-stamp
+build-stamp: patch
+	dh_testdir
+	# TODO: xcontol fails with Vcs-* fields
+	#xcontrol check
+	$(MAKE)
+	touch build-stamp
+
+clean: clean-stamp unpatch
+clean-stamp: patch
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp configure-stamp
+	$(MAKE) clean
+	dh_clean 
+
+install: build
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs 
+	dh_installdocs
+	dh_installexamples
+	dh_install
+	dh_installman
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+print-version:
+	@@echo "Debian version:          $(DEBVERSION)"
+	@@echo "Upstream version:        $(UPVERSION)"
+
+get-orig-source:
+	@@dh_testdir
+	@@mkdir -p ../tarballs
+	@@wget -nv -T10 -t3 --verbose -O ../tarballs/$(FILENAME) $(URL)
+
+.PHONY: build clean binary-indep binary-arch binary install configure
--- misdn-user-1.1.9.1.orig/debian/libisdnnet-dev.install
+++ misdn-user-1.1.9.1/debian/libisdnnet-dev.install
@@ -0,0 +1,2 @@
+i4lnet/libisdnnet.a usr/lib
+i4lnet/*.h usr/include/mISDNuser
--- misdn-user-1.1.9.1.orig/debian/misdn-utils.install
+++ misdn-user-1.1.9.1/debian/misdn-utils.install
@@ -0,0 +1 @@
+example/loadfirm usr/sbin
--- misdn-user-1.1.9.1.orig/debian/patches/testlog
+++ misdn-user-1.1.9.1/debian/patches/testlog
@@ -0,0 +1,12 @@
+--- a/voip/testlog
++++ b/voip/testlog
+@@ -1,3 +1,9 @@
+ debug_init: debug_mask = 0
+ debug_init: debug_mask = 0
+ debug_close: debug channel now closed
++debug_init: debug_mask = 0
++debug_init: debug_mask = 0
++debug_init: debug_mask = 0
++debug_init: debug_mask = 0
++debug_init: debug_mask = 0
++debug_init: debug_mask = 0
--- misdn-user-1.1.9.1.orig/debian/patches/static
+++ misdn-user-1.1.9.1/debian/patches/static
@@ -0,0 +1,158 @@
+--- a/i4lnet/Makefile
++++ b/i4lnet/Makefile
+@@ -2,38 +2,20 @@ CC = gcc
+ AR = ar
+ RANLIB = ranlib
+ 
+-all: libisdnnet.a libisdnnet_pic.a libisdnnet.so
++all: libisdnnet.a
+ 
+ install:
+ 	install -m 644 libisdnnet.a $(INSTALL_PREFIX)/usr/lib
+-	install -m 644 libisdnnet_pic.a $(INSTALL_PREFIX)/usr/lib
+-	install -m 644 libisdnnet.so $(INSTALL_PREFIX)/usr/lib
+ 	cp *.h $(INSTALL_PREFIX)/usr/include/mISDNuser/
+ 
+ ISDNNET_OBJ = net_if.o isdn_debug.o isdn_msg.o fsm.o net_l2.o tei.o net_l3.o \
+ 		manager.o tone.o bchannel.o g711.o
+-ISDNNET_PICOBJ = $(ISDNNET_OBJ:%.o=%.lo)
+-
+-ifeq ($(shell uname -m),x86_64)
+-CFLAGS         += -fPIC
+-endif
+-
+-
+-libisdnnet_pic.a: $(ISDNNET_PICOBJ)
+-	$(AR) cru $@ $^
+-	$(RANLIB) $@
+ 
+ libisdnnet.a: $(ISDNNET_OBJ)
+ 	$(AR) cru $@ $^
+ 	$(RANLIB) $@
+ 
+-libisdnnet.so: $(ISDNNET_OBJ)
+-	$(CC) $(CFLAGS) -shared -Xlinker -x -o $@ $^
+-
+ .c.o:
+-	$(CC) $(CFLAGS) -o $@ -c $<
+-
+-.c.lo:
+ 	$(CC) $(CFLAGS) -fPIC -o $@ -c $<
+ 
+ isdn_msg.o isdn_msg.lo: isdn_msg.c $(INCLUDEDIR)/isdn_msg.h $(INCLUDEDIR)/isdn_net.h
+@@ -61,10 +43,8 @@ bchannel.o bchannel.lo: bchannel.c $(INC
+ g711.o g711.lo: g711.c $(INCLUDEDIR)/g711.h
+ 
+ clean:
+-	rm -f *.o *.lo *~ DEADJOE 
+-	rm -f libisdnnet.a libisdnnet_pic.a libisdnnet.so
++	$(RM) *.o *~ DEADJOE
++	$(RM) libisdnnet.a
+ 
+ distclean: clean
+-	rm -f *.a
+-
+-.SUFFIXES: .lo
++	$(RM) *.a
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -2,35 +2,18 @@ CC = gcc
+ AR = ar
+ RANLIB = ranlib
+ 
+-all: libmISDN.a libmISDN_pic.a libmISDN.so
++all: libmISDN.a
+ 
+ install:
+-	install -m 644 libmISDN.so $(INSTALL_PREFIX)/usr/lib
+-	install -m 644 libmISDN_pic.a $(INSTALL_PREFIX)/usr/lib
+ 	install -m 644 libmISDN.a $(INSTALL_PREFIX)/usr/lib
+ 
+ LIBMISDN_OBJS = device.o layer.o stack.o status.o
+-LIBMISDN_PICOBJS = $(LIBMISDN_OBJS:%.o=%.lo)
+-
+-ifeq ($(shell uname -m),x86_64)
+-CFLAGS         += -fPIC
+-endif
+-
+-libmISDN_pic.a: $(LIBMISDN_PICOBJS)
+-	$(AR) cru $@ $^
+-	$(RANLIB) $@
+ 
+ libmISDN.a: $(LIBMISDN_OBJS)
+ 	$(AR) cru $@ $^
+ 	$(RANLIB) $@
+ 
+-libmISDN.so: $(LIBMISDN_OBJS)
+-	$(CC) $(CFLAGS) -shared -Xlinker -x -o $@ $^
+-
+ .c.o:
+-	$(CC) $(CFLAGS) -o $@ -c $<
+-
+-.c.lo:
+ 	$(CC) $(CFLAGS) -fPIC -o $@ -c $<
+ 
+ device.o device.lo: device.c ../include/mISDNlib.h
+@@ -39,10 +22,8 @@ stack.o stack.lo: stack.c ../include/mIS
+ status.o status.lo: status.c ../include/mISDNlib.h 
+ 
+ clean:
+-	rm -f libmISDN.a libMISDN_pic.a libmISDN.so
+-	rm -f *.o *.lo *~ DEADJOE
++	$(RM) libmISDN.a
++	$(RM) *.o *~ DEADJOE
+ 
+ distclean: clean
+-	rm -f *.a
+- 
+-.SUFFIXES: .lo
++	$(RM) *.a
+--- a/suppserv/Makefile
++++ b/suppserv/Makefile
+@@ -5,41 +5,25 @@ RANLIB = ranlib
+ #CFLAGS += -DASN1_DEBUG
+ 
+ SUPPSERV_OBJ = asn1.o asn1_enc.o asn1_generic.o asn1_aoc.o asn1_basic_service.o asn1_comp.o asn1_diversion.o asn1_address.o fac.o
+-SUPPSERV_PICOBJ = $(SUPPSERV_OBJ:%.o=%.lo)
+ 
+-all: libsuppserv.a libsuppserv_pic.a libsuppserv.so
++all: libsuppserv.a
+ 
+ main: $(SUPPSERVOBJ)
+ 
+ install:
+ 	install -m 644 libsuppserv.a $(INSTALL_PREFIX)/usr/lib
+-	install -m 644 libsuppserv_pic.a $(INSTALL_PREFIX)/usr/lib
+-	install -m 644 libsuppserv.so $(INSTALL_PREFIX)/usr/lib
+ 	cp *.h $(INSTALL_PREFIX)/usr/include/mISDNuser/
+ 
+-libsuppserv_pic.a: $(SUPPSERV_PICOBJ)
+-	$(AR) cru $@ $<
+-	$(RANLIB) $@
+-
+ libsuppserv.a: $(SUPPSERV_OBJ)
+-	$(AR) cru $@ $<
++	$(AR) cru $@ $^
+ 	$(RANLIB) $@
+ 
+-libsuppserv.so: $(SUPPSERV_OBJ)
+-	$(CC) -shared -Xlinker -x -o $@ $^
+-
+-
+ .c.o:
+-	$(CC) $(CFLAGS) -o $@ -c $<
+-
+-.c.lo:
+ 	$(CC) $(CFLAGS) -fPIC -o $@ -c $<
+ 
+ clean:
+-	rm -f *.o *.lo *~ DEADJOE *.so
+-	rm -f libsuppserv.a libsuppserv_pic.a
++	$(RM) *.o *~ DEADJOE *.so
++	$(RM) libsuppserv.a
+ 
+ distclean: clean
+-	rm -f *.a
+-
+-.SUFFIXES: .lo
++	$(RM) *.a
--- misdn-user-1.1.9.1.orig/debian/patches/series
+++ misdn-user-1.1.9.1/debian/patches/series
@@ -0,0 +1,3 @@
+#subdirs
+#testlog
+static
--- misdn-user-1.1.9.1.orig/debian/patches/subdirs
+++ misdn-user-1.1.9.1/debian/patches/subdirs
@@ -0,0 +1,24 @@
+--- a/Makefile
++++ b/Makefile
+@@ -46,8 +46,8 @@ export mISDNNETLIB
+ SUBDIRS := lib example
+ 
+ SUBDIRS += $(shell if test -d i4lnet ; then echo i4lnet; fi)
+-SUBDIRS += $(shell if test -d tenovis ; then echo tenovis; fi)
+-SUBDIRS += $(shell if test -d voip ; then echo voip; fi)
++#SUBDIRS += $(shell if test -d tenovis ; then echo tenovis; fi)
++#SUBDIRS += $(shell if test -d voip ; then echo voip; fi)
+ SUBDIRS += $(shell if test -d suppserv ; then echo suppserv; fi)
+ SUBDIRS += $(shell if test -d debugtool ; then echo debugtool; fi)
+ 
+--- a/example/Makefile
++++ b/example/Makefile
+@@ -46,7 +46,7 @@ logger.o: logger.c $(LIBINCL)
+ 
+ 
+ clean:
+-	rm -f *.o *~ DEADJOE
++	rm -f *.o *~ DEADJOE logger testnet $(PROGS)
+ 
+ distclean: clean
+ 	rm -f *.a $(PROGS)
