diff --git a/kernel-module/debian/README.Debian b/debian/README.Debian similarity index 50% rename from kernel-module/debian/README.Debian rename to debian/README.Debian index 4f4e4bd..f25b636 100644 --- a/kernel-module/debian/README.Debian +++ b/debian/README.Debian @@ -1,5 +1,5 @@ -mediaproxy-ng-kernel for Debian -------------------------------- +ngcp-mediaproxy-ng-kernel for Debian +------------------------------------ This package only works with kernels >= 2.6.32. @@ -9,17 +9,17 @@ Instructions for usage 1) module-assistant: % sudo apt-get install linux-headers-$(uname -r) -% sudo apt-get install mediaproxy-ng-kernel-source +% sudo apt-get install ngcp-mediaproxy-ng-kernel-source % sudo m-a prepare -% sudo m-a -v -f -l $(uname -r) -k /usr/src/linux-headers-$(uname -r) a-b mediaproxy-ng-kernel +% sudo m-a -v -f -l $(uname -r) -k /usr/src/linux-headers-$(uname -r) a-b ngcp-mediaproxy-ng-kernel How to debug build process: -% sudo m-a -d -v --text-mode -l $(uname -r) -k /usr/src/linux-headers-$(uname -r) a-i mediaproxy-ng-kernel +% sudo m-a -d -v --text-mode -l $(uname -r) -k /usr/src/linux-headers-$(uname -r) a-i ngcp-mediaproxy-ng-kernel 2) DKMS: -% sudo apt-get install mediaproxy-ng-kernel-dkms -% sudo dkms add -m mediaproxy-ng -v 0.0.1 -% sudo dkms build --kernelsourcedir /usr/src/linux-headers-$(uname -r) -m mediaproxy-ng -v 0.0.1 -% sudo dkms install -m mediaproxy-ng -v 0.0.1 +% sudo apt-get install ngcp-mediaproxy-ng-kernel-dkms +% sudo dkms add -m ngcp-mediaproxy-ng -v 0.0.1 +% sudo dkms build --kernelsourcedir /usr/src/linux-headers-$(uname -r) -m ngcp-mediaproxy-ng -v 0.0.1 +% sudo dkms install -m ngcp-mediaproxy-ng -v 0.0.1 diff --git a/debian/control b/debian/control index 89bbb92..b7528ed 100644 --- a/debian/control +++ b/debian/control @@ -1,9 +1,9 @@ Source: ngcp-mediaproxy-ng Section: net Priority: extra -Maintainer: Michael Prokop +Maintainer: Richard Fuchs Build-Depends: debhelper (>= 5), iptables-dev, libglib2.0-dev, libpcre3-dev -Standards-Version: 3.8.4 +Standards-Version: 3.9.1 Homepage: http://sipwise.com/ Package: ngcp-mediaproxy-ng-daemon @@ -26,3 +26,20 @@ Description: NGCP RTP/media proxy - meta package. This is a meta package for easy installation of all three parts of the NGCP media proxy. It will install the user-space daemon, the kernel-space IPtables module, and the IPtables extension module. + +Package: ngcp-mediaproxy-ng-kernel-source +Architecture: all +Depends: debhelper (>= 5), module-assistant, ${misc:Depends} +Description: IPtables kernel module for the NGCP media proxy - source. + Provides the kernel-space part of the NGCP media proxy for high- + performance packet forwarding. + This package contains the source to be built with module-assistant or + kernel-package. + +Package: ngcp-mediaproxy-ng-kernel-dkms +Architecture: all +Depends: dkms (>= 1.95), ${misc:Depends} +Description: IPtables kernel module for the NGCP media proxy - DKMS. + Provides the kernel-space part of the NGCP media proxy for high- + performance packet forwarding. + This package contains the source to be built with dkms. diff --git a/kernel-module/debian/control.modules.in b/debian/control.modules.in similarity index 100% rename from kernel-module/debian/control.modules.in rename to debian/control.modules.in diff --git a/debian/copyright b/debian/copyright index 04f88fe..c2f3071 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,5 +1,5 @@ Upstream Author: The Sipwise Team - http://sipwise.com/ -Copyright: Copyright (c) 2007-2010 Sipwise GmbH, Austria +Copyright: Copyright (c) 2007-2011 Sipwise GmbH, Austria License: All software included in this package is Copyright (c) Sipwise GmbH, Austria. All rights reserved. You may not copy, distribute diff --git a/kernel-module/debian/dkms.conf.in b/debian/dkms.conf.in similarity index 90% rename from kernel-module/debian/dkms.conf.in rename to debian/dkms.conf.in index bb54ba1..51767d1 100644 --- a/kernel-module/debian/dkms.conf.in +++ b/debian/dkms.conf.in @@ -1,4 +1,4 @@ -PACKAGE_NAME="mediaproxy-ng" +PACKAGE_NAME="ngcp-mediaproxy-ng" PACKAGE_VERSION="__VERSION__" MAKE[0]="make -C ${kernel_source_dir} M=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build" CLEAN="make -C ${kernel_source_dir} M=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build clean" diff --git a/debian/mediaproxy-ng-daemon.install b/debian/ngcp-mediaproxy-ng-daemon.install similarity index 100% rename from debian/mediaproxy-ng-daemon.install rename to debian/ngcp-mediaproxy-ng-daemon.install diff --git a/debian/mediaproxy-ng-iptables.install b/debian/ngcp-mediaproxy-ng-iptables.install similarity index 100% rename from debian/mediaproxy-ng-iptables.install rename to debian/ngcp-mediaproxy-ng-iptables.install diff --git a/kernel-module/debian/mediaproxy-ng-kernel-dkms.postinst b/debian/ngcp-mediaproxy-ng-kernel-dkms.postinst similarity index 86% rename from kernel-module/debian/mediaproxy-ng-kernel-dkms.postinst rename to debian/ngcp-mediaproxy-ng-kernel-dkms.postinst index da7a4c2..b44342a 100644 --- a/kernel-module/debian/mediaproxy-ng-kernel-dkms.postinst +++ b/debian/ngcp-mediaproxy-ng-kernel-dkms.postinst @@ -2,8 +2,8 @@ set -e -package=mediaproxy-ng-kernel-dkms -name=mediaproxy-ng +package=ngcp-mediaproxy-ng-kernel-dkms +name=ngcp-mediaproxy-ng version=`dpkg-query -W -f='${Version}' "$package" \ |rev|cut -d- -f2-|rev|cut -d':' -f2|tr -d "\n"` diff --git a/kernel-module/debian/mediaproxy-ng-kernel-dkms.prerm b/debian/ngcp-mediaproxy-ng-kernel-dkms.prerm similarity index 76% rename from kernel-module/debian/mediaproxy-ng-kernel-dkms.prerm rename to debian/ngcp-mediaproxy-ng-kernel-dkms.prerm index 60c7629..eb3c347 100644 --- a/kernel-module/debian/mediaproxy-ng-kernel-dkms.prerm +++ b/debian/ngcp-mediaproxy-ng-kernel-dkms.prerm @@ -2,8 +2,8 @@ set -e -package=mediaproxy-ng-kernel-dkms -name=mediaproxy-ng +package=ngcp-mediaproxy-ng-kernel-dkms +name=ngcp-mediaproxy-ng version=`dpkg-query -W -f='${Version}' "$package" \ |rev|cut -d- -f2-|rev|cut -d':' -f2|tr -d "\n"` diff --git a/kernel-module/debian/mediaproxy-ng-kernel-source.links b/debian/ngcp-mediaproxy-ng-kernel-source.links similarity index 64% rename from kernel-module/debian/mediaproxy-ng-kernel-source.links rename to debian/ngcp-mediaproxy-ng-kernel-source.links index 12529b1..e246b83 100644 --- a/kernel-module/debian/mediaproxy-ng-kernel-source.links +++ b/debian/ngcp-mediaproxy-ng-kernel-source.links @@ -1 +1 @@ -/usr/share/modass/packages/default.sh /usr/share/modass/overrides/mediaproxy-ng-kernel-source +/usr/share/modass/packages/default.sh /usr/share/modass/overrides/ngcp-mediaproxy-ng-kernel-source diff --git a/debian/mediaproxy-ng.default b/debian/ngcp-mediaproxy-ng.default similarity index 100% rename from debian/mediaproxy-ng.default rename to debian/ngcp-mediaproxy-ng.default diff --git a/debian/mediaproxy-ng.init b/debian/ngcp-mediaproxy-ng.init similarity index 100% rename from debian/mediaproxy-ng.init rename to debian/ngcp-mediaproxy-ng.init diff --git a/debian/rules b/debian/rules index 38eddf6..f447767 100755 --- a/debian/rules +++ b/debian/rules @@ -7,9 +7,30 @@ # This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. -export DH_VERBOSE=1 +# export DH_VERBOSE=1 -b=$(CURDIR)/debian/build +b=$(CURDIR)/debian + +## kernel package specific stuff +# Name of the source package +psource:=ngcp-mediaproxy-ng-kernel-source +# Name of the dkms package +pdkms:=ngcp-mediaproxy-ng-kernel-dkms +# short upstream name, used for module source directory +sname:=ngcp-mediaproxy-ng +# Source version +sversion:=$(shell dpkg-parsechangelog|grep "^Version:"|cut -d" " -f2|rev|cut -d- -f2-|rev|cut -d':' -f2) + +PACKAGE=ngcp-mediaproxy-ng-kernel +MA_DIR ?= /usr/share/modass +-include $(MA_DIR)/include/generic.make +-include $(MA_DIR)/include/common-rules.make + +kdist_configure: prep-deb-files + +kdist_clean: clean + $(MAKE) $(MFLAGS) -f debian/rules clean +## end of kernel package specific stuff build: build-stamp @@ -22,6 +43,7 @@ build-stamp: clean: dh_testdir dh_testroot + cd daemon && $(MAKE) clean && cd .. rm -f build-stamp rm -f iptables-extension/libipt_MEDIAPROXY.so rm -f daemon/mediaproxy-ng daemon/build_time.h daemon/.depend kernel-module/.ipt_MEDIAPROXY.o.d @@ -35,6 +57,62 @@ install: build dh_clean -k dh_installdirs + # Create the directories to install the source into + dh_installdirs -p$(psource) usr/src/modules/$(sname)/debian + dh_installdirs -p$(pdkms) usr/src/$(sname)-$(sversion) + + # Copy only the driver source to the proper locations + cd kernel-module && cp Makefile *.c *.h ../debian/$(psource)/usr/src/modules/$(sname) + cd kernel-module && cp Makefile *.c *.h ../debian/$(pdkms)/usr/src/$(sname)-$(sversion) + + # Copy the needed debian/ pieces to the proper location + cp debian/*.modules.in* debian/$(psource)/usr/src/modules/$(sname)/debian + cp debian/control debian/changelog debian/copyright debian/README.Debian \ + debian/compat debian/$(psource)/usr/src/modules/$(sname)/debian/ + install -m 0755 debian/rules.modules debian/$(psource)/usr/src/modules/$(sname)/debian/rules + cd debian/$(psource)/usr/src && tar c modules | bzip2 -9 > $(sname).tar.bz2 && rm -rf modules + + # Prepare dkms.conf from the dkms.conf.in template + sed "s/__VERSION__/$(sversion)/g" debian/dkms.conf.in > debian/$(pdkms)/usr/src/$(sname)-$(sversion)/dkms.conf + + dh_install + +ngcp-mediaproxy-ng-kernel-source: install + @echo "--- Building: $@" + dh_installdirs -p$@ -P$(b)/$@ + dh_link -p$@ -P$(b)/$@ + dh_installdocs -p$@ -P$(b)/$@ + dh_installchangelogs -p$@ -P$(b)/$@ + dh_install -p$@ -P$(b)/$@ + dh_strip -p$@ -P$(b)/$@ + dh_compress -p$@ -P$(b)/$@ + dh_fixperms -p$@ -P$(b)/$@ + dh_makeshlibs -p$@ -P$(b)/$@ -V + dh_installdeb -p$@ -P$(b)/$@ + dh_shlibdeps -p$@ -P$(b)/$@ + dh_installdebconf -p$@ -P$(b)/$@ + dh_gencontrol -p$@ -P$(b)/$@ + dh_md5sums -p$@ -P$(b)/$@ + dh_builddeb -p$@ -P$(b)/$@ + +ngcp-mediaproxy-ng-kernel-dkms: install + @echo "--- Building: $@" + dh_installdirs -p$@ -P$(b)/$@ + dh_link -p$@ -P$(b)/$@ + dh_installdocs -p$@ -P$(b)/$@ + dh_installchangelogs -p$@ -P$(b)/$@ + dh_install -p$@ -P$(b)/$@ + dh_strip -p$@ -P$(b)/$@ + dh_compress -p$@ -P$(b)/$@ + dh_fixperms -p$@ -P$(b)/$@ + dh_makeshlibs -p$@ -P$(b)/$@ -V + dh_installdeb -p$@ -P$(b)/$@ + dh_shlibdeps -p$@ -P$(b)/$@ + dh_installdebconf -p$@ -P$(b)/$@ + dh_gencontrol -p$@ -P$(b)/$@ + dh_md5sums -p$@ -P$(b)/$@ + dh_builddeb -p$@ -P$(b)/$@ + ngcp-mediaproxy-ng-daemon: install @echo "--- Building: $@" dh_installdirs -p$@ -P$(b)/$@ @@ -93,7 +171,9 @@ ngcp-mediaproxy-ng: install binary-all: build install # Build architecture-independent files here. -binary-indep: build install ngcp-mediaproxy-ng-daemon ngcp-mediaproxy-ng-iptables ngcp-mediaproxy-ng +binary-indep: build install \ + ngcp-mediaproxy-ng-daemon ngcp-mediaproxy-ng-iptables ngcp-mediaproxy-ng \ + ngcp-mediaproxy-ng-kernel-dkms ngcp-mediaproxy-ng-kernel-source binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install +.PHONY: build clean binary-indep binary-arch binary install kdist kdist_configure kdist_image kdist_clean diff --git a/kernel-module/debian/rules.modules b/debian/rules.modules similarity index 95% rename from kernel-module/debian/rules.modules rename to debian/rules.modules index bd2269e..ce5fad0 100644 --- a/kernel-module/debian/rules.modules +++ b/debian/rules.modules @@ -12,17 +12,17 @@ else endif # Name of the source package -psource:=mediaproxy-ng-kernel-source +psource:=ngcp-mediaproxy-ng-kernel-source # The short upstream name, used for the module source directory -sname:=mediaproxy-ng +sname:=ngcp-mediaproxy-ng ### KERNEL SETUP ### Setup the stuff needed for making kernel module packages ### taken from /usr/share/kernel-package/sample.module.rules # prefix of the target package name -PACKAGE=mediaproxy-ng-kernel-modules +PACKAGE=ngcp-mediaproxy-ng-kernel-modules # modifieable for experiments or debugging m-a MA_DIR ?= /usr/share/modass # load generic variable handling diff --git a/kernel-module/debian/changelog b/kernel-module/debian/changelog deleted file mode 100644 index 865c637..0000000 --- a/kernel-module/debian/changelog +++ /dev/null @@ -1,6 +0,0 @@ -ngcp-mediaproxy-ng-kernel (0.0.1) unstable; urgency=low - - * Initial release. - - -- Andreas Granig Tue, 26 Apr 2011 20:45:24 +0200 - diff --git a/kernel-module/debian/compat b/kernel-module/debian/compat deleted file mode 100644 index 7ed6ff8..0000000 --- a/kernel-module/debian/compat +++ /dev/null @@ -1 +0,0 @@ -5 diff --git a/kernel-module/debian/control b/kernel-module/debian/control deleted file mode 100644 index f2c7419..0000000 --- a/kernel-module/debian/control +++ /dev/null @@ -1,26 +0,0 @@ -Source: ngcp-mediaproxy-ng-kernel -Section: kernel -Priority: optional -Maintainer: Richard Fuchs -Build-Depends: debhelper (>= 5), quilt (>= 0.40) -Build-Depends-Indep: bzip2 -Standards-Version: 3.9.1 -Homepage: http://sipwise.com/ - -Package: ngcp-mediaproxy-ng-kernel-source -Architecture: all -Depends: debhelper (>= 5), module-assistant, ${misc:Depends} -Description: IPtables kernel module for the NGCP media proxy - source. - Provides the kernel-space part of the NGCP media proxy for high- - performance packet forwarding. - This package contains the source to be built with module-assistant or - kernel-package. - -Package: ngcp-mediaproxy-ng-kernel-dkms -Architecture: all -Depends: dkms (>= 1.95), ${misc:Depends} -Description: IPtables kernel module for the NGCP media proxy - DKMS. - Provides the kernel-space part of the NGCP media proxy for high- - performance packet forwarding. - This package contains the source to be built with dkms. - diff --git a/kernel-module/debian/copyright b/kernel-module/debian/copyright deleted file mode 100644 index f009427..0000000 --- a/kernel-module/debian/copyright +++ /dev/null @@ -1,8 +0,0 @@ -Upstream Author: The Sipwise Team - http://sipwise.com/ -Copyright: Copyright (c) 2007-2011 Sipwise GmbH, Austria -License: All software included in this package is - Copyright (c) Sipwise GmbH, Austria. - All rights reserved. You may not copy, distribute - or modify without prior written permission from - Sipwise GmbH, Austria. - diff --git a/kernel-module/debian/gbp.conf b/kernel-module/debian/gbp.conf deleted file mode 100644 index d3316d0..0000000 --- a/kernel-module/debian/gbp.conf +++ /dev/null @@ -1,3 +0,0 @@ -[DEFAULT] -pristine-tar = True -builder=debuild -i\.git -I.git diff --git a/kernel-module/debian/rules b/kernel-module/debian/rules deleted file mode 100755 index 2ef0547..0000000 --- a/kernel-module/debian/rules +++ /dev/null @@ -1,104 +0,0 @@ -#!/usr/bin/make -f - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -# include /usr/share/quilt/quilt.make - -# Name of the source package -psource:=mediaproxy-ng-kernel-source - -# Name of the dkms package -pdkms:=mediaproxy-ng-kernel-dkms - -# The short upstream name, used for the module source directory -sname:=mediaproxy-ng - -# Source version -sversion:=$(shell dpkg-parsechangelog|grep "^Version:"|cut -d" " -f2|rev|cut -d- -f2-|rev|cut -d':' -f2) - -### KERNEL SETUP -### Setup the stuff needed for making kernel module packages -### taken from /usr/share/kernel-package/sample.module.rules - -# prefix of the target package name -PACKAGE=mediaproxy-ng-kernel -# modifieable for experiments or debugging m-a -MA_DIR ?= /usr/share/modass -# load generic variable handling --include $(MA_DIR)/include/generic.make -# load default rules, including kdist, kdist_image, ... --include $(MA_DIR)/include/common-rules.make - -# module assistant calculates all needed things for us and sets -# following variables: -# KSRC (kernel source directory), KVERS (kernel version string), KDREV -# (revision of the Debian kernel-image package), CC (the correct -# compiler), VERSION (the final package version string), PKGNAME (full -# package name with KVERS included), DEB_DESTDIR (path to store DEBs) - -# The kdist_configure target is called by make-kpkg modules_config and -# by kdist* rules by dependency. It should configure the module so it is -# ready for compilation (mostly useful for calling configure). -# prep-deb-files from module-assistant creates the neccessary debian/ files -kdist_configure: prep-deb-files - -# the kdist_clean target is called by make-kpkg modules_clean and from -# kdist* rules. It is responsible for cleaning up any changes that have -# been made by the other kdist_commands (except for the .deb files created) -kdist_clean: clean - $(MAKE) $(MFLAGS) -f debian/rules clean -# -### end KERNEL SETUP - -build: - -clean: - dh_testdir - dh_clean - -install: DH_OPTIONS= -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - # Create the directories to install the source into - dh_installdirs -p$(psource) usr/src/modules/$(sname)/debian - dh_installdirs -p$(pdkms) usr/src/$(sname)-$(sversion) - - # Copy only the driver source to the proper locations - cp -a Makefile *.c *.h debian/$(psource)/usr/src/modules/$(sname) - cp -a Makefile *.c *.h debian/$(pdkms)/usr/src/$(sname)-$(sversion) - - # Copy the needed debian/ pieces to the proper location - cp debian/*.modules.in* debian/$(psource)/usr/src/modules/$(sname)/debian - cp debian/control debian/changelog debian/copyright debian/README.Debian \ - debian/compat debian/$(psource)/usr/src/modules/$(sname)/debian/ - install -m 0755 debian/rules.modules debian/$(psource)/usr/src/modules/$(sname)/debian/rules - cd debian/$(psource)/usr/src && tar c modules | bzip2 -9 > $(sname).tar.bz2 && rm -rf modules - - # Prepare dkms.conf from the dkms.conf.in template - sed "s/__VERSION__/$(sversion)/g" debian/dkms.conf.in > debian/$(pdkms)/usr/src/$(sname)-$(sversion)/dkms.conf - - dh_install - -binary-arch: build install - -binary-indep: build install - dh_testdir - dh_testroot - dh_installdocs - dh_installchangelogs - dh_install - dh_link - dh_compress - dh_fixperms - dh_installdeb - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install kdist kdist_configure kdist_image kdist_clean diff --git a/kernel-module/debian/source/format b/kernel-module/debian/source/format deleted file mode 100644 index d3827e7..0000000 --- a/kernel-module/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -1.0