From: Michael Prokop <mprokop@sipwise.com>git.mgm/mediaproxy-ng/2.0
| @ -1 +1,11 @@ | |||
| obj-m += ipt_MEDIAPROXY.o | |||
| PWD := $(shell pwd) | |||
| KSRC ?= /lib/modules/$(shell uname -r)/build | |||
| KBUILD := $(KSRC) | |||
| obj-m += ipt_MEDIAPROXY.o | |||
| modules: | |||
| make -C $(KBUILD) M=$(PWD) O=$(KBUILD) modules | |||
| clean: | |||
| make -C $(KBUILD) M=$(PWD) clean | |||
| @ -0,0 +1,25 @@ | |||
| mediaproxy-ng-kernel for Debian | |||
| ------------------------------- | |||
| This package only works with kernels >= 2.6.32. | |||
| Instructions for usage | |||
| ~~~~~~~~~~~~~~~~~~~~~~ | |||
| 1) module-assistant: | |||
| % sudo apt-get install linux-headers-$(uname -r) | |||
| % sudo apt-get install 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 | |||
| 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 | |||
| 2) DKMS: | |||
| % sudo apt-get install mediaproxy-ng-kernel-dkms | |||
| % sudo dkms add -m mediaproxy-ng-kernel -v 0.0.1 | |||
| % sudo dkms build --kernelsourcedir /usr/src/linux-headers-$(uname -r) -m mediaproxy-ng-kernel -v 0.0.1 | |||
| % sudo dkms install -m mediaproxy-ng-kernel -v 0.0.1 | |||
| @ -0,0 +1,6 @@ | |||
| mediaproxy-ng-kernel (0.0.1) unstable; urgency=low | |||
| * Initial release. | |||
| -- Michael Prokop <mprokop@sipwise.com> Tue, 19 Apr 2011 13:14:51 +0200 | |||
| @ -0,0 +1 @@ | |||
| 5 | |||
| @ -0,0 +1,24 @@ | |||
| Source: mediaproxy-ng-kernel | |||
| Section: kernel | |||
| Priority: optional | |||
| Maintainer: Richard Fuchs <rfuchs@sipwise.com> | |||
| Build-Depends: debhelper (>= 5), quilt (>= 0.40) | |||
| Build-Depends-Indep: bzip2 | |||
| Standards-Version: 3.9.1 | |||
| Homepage: http://sipwise.com/ | |||
| Package: mediaproxy-ng-kernel-source | |||
| Architecture: all | |||
| Depends: debhelper (>= 5), module-assistant, ${misc:Depends} | |||
| Description: TODO | |||
| TODO | |||
| This package contains the source to be built with module-assistant or | |||
| kernel-package. | |||
| Package: mediaproxy-ng-kernel-dkms | |||
| Architecture: all | |||
| Depends: dkms (>= 1.95), ${misc:Depends} | |||
| Description: TODO | |||
| TODO | |||
| This package contains the source to be built with dkms. | |||
| @ -0,0 +1,15 @@ | |||
| Source: mediaproxy-ng-kernel | |||
| Section: kernel | |||
| Priority: optional | |||
| Maintainer: Richard Fuchs <rfuchs@sipwise.com> | |||
| Build-Depends: debhelper (>= 5) | |||
| Standards-Version: 3.9.1 | |||
| Homepage: http://sipwise.com/ | |||
| Package: mediaproxy-ng-kernel-modules-_KVERS_ | |||
| Architecture: any | |||
| Depends: linux-modules-_KVERS_ | linux-image-_KVERS_ | |||
| Provides: mediaproxy-ng-kernel | |||
| Description: TODO | |||
| This package provides the mediaproxy-ng module for | |||
| the Linux kernel version _KVERS_. | |||
| @ -0,0 +1,8 @@ | |||
| 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. | |||
| @ -0,0 +1,7 @@ | |||
| PACKAGE_NAME="mediaproxy-ng-kernel" | |||
| 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" | |||
| AUTOINSTALL=yes | |||
| BUILT_MODULE_NAME[0]="ipt_MEDIAPROXY" | |||
| DEST_MODULE_LOCATION[0]=/extra | |||
| @ -0,0 +1,3 @@ | |||
| [DEFAULT] | |||
| pristine-tar = True | |||
| builder=debuild -i\.git -I.git | |||
| @ -0,0 +1,24 @@ | |||
| #!/bin/sh | |||
| set -e | |||
| package=mediaproxy-ng-kernel-dkms | |||
| name=mediaproxy-ng-kernel | |||
| version=`dpkg-query -W -f='${Version}' "$package" \ | |||
| |rev|cut -d- -f2-|rev|cut -d':' -f2|tr -d "\n"` | |||
| isadded=`dkms status -m "$name" -v "$version"` | |||
| if [ "x${isadded}" = "x" ] ; then | |||
| dkms add -m "$name" -v "$version" | |||
| fi | |||
| if [ "$1" = 'configure' ] ; then | |||
| dkms build -m "$name" -v "$version" && dkms install -m "$name" -v "$version" || true | |||
| fi | |||
| #DEBHELPER# | |||
| exit 0 | |||
| @ -0,0 +1,15 @@ | |||
| #!/bin/sh | |||
| set -e | |||
| package=mediaproxy-ng-kernel-dkms | |||
| name=mediaproxy-ng-kernel | |||
| version=`dpkg-query -W -f='${Version}' "$package" \ | |||
| |rev|cut -d- -f2-|rev|cut -d':' -f2|tr -d "\n"` | |||
| dkms remove -m "$name" -v "$version" --all || true | |||
| #DEBHELPER# | |||
| exit 0 | |||
| @ -0,0 +1 @@ | |||
| /usr/share/modass/packages/default.sh /usr/share/modass/overrides/mediaproxy-ng-kernel-source | |||
| @ -0,0 +1,104 @@ | |||
| #!/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 | |||
| @ -0,0 +1,83 @@ | |||
| #!/usr/bin/make -f | |||
| # Uncomment this to turn on verbose mode. | |||
| #export DH_VERBOSE=1 | |||
| CFLAGS ?= -Wall -g | |||
| ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) | |||
| CFLAGS += -O0 | |||
| else | |||
| CFLAGS += -O2 | |||
| endif | |||
| # Name of the source package | |||
| psource:=mediaproxy-ng-kernel-source | |||
| # The short upstream name, used for the module source directory | |||
| sname:=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 | |||
| # 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 | |||
| # the binary-modules rule is invoked by module-assistant while processing the | |||
| # kdist* targets. It is called by module-assistant or make-kpkg and *not* | |||
| # during a normal build | |||
| binary-modules: prep-deb-files | |||
| dh_testroot | |||
| dh_clean -k | |||
| # Build the module | |||
| $(MAKE) modules KSRC=$(KSRC) KVER=$(KVERS) | |||
| # Install the module | |||
| install -D -m 0644 ipt_MEDIAPROXY.ko debian/$(PACKAGE)-$(KVERS)/lib/modules/$(KVERS)/extra/ipt_MEDIAPROXY.ko | |||
| dh_installdocs | |||
| dh_installchangelogs | |||
| dh_compress | |||
| dh_fixperms | |||
| dh_installmodules | |||
| dh_installdeb | |||
| dh_gencontrol -- -v$(VERSION) | |||
| dh_md5sums | |||
| dh_builddeb --destdir=$(DEB_DESTDIR) | |||
| dh_clean -k | |||
| clean: | |||
| dh_testdir | |||
| $(MAKE) clean | |||
| dh_clean | |||
| .PHONY: clean binary-modules kdist kdist_configure kdist_image kdist_clean | |||
| @ -0,0 +1 @@ | |||
| 1.0 | |||