summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root@ruto.localdomain>2012-11-27 18:46:03 +0100
committerroot <root@ruto.localdomain>2012-11-27 18:46:03 +0100
commitdd952c2c643205f6f34e6f020ec62976c4c54355 (patch)
treece2264b8194f43106f0977e0085c8a5eec84774a
parentff4634384e8e7ed5831bbbf9eda0fb670a2404a4 (diff)
Try to use the example from module-assistant
-rw-r--r--debian/README.Debian30
-rw-r--r--debian/changelog8
-rw-r--r--debian/compat2
-rw-r--r--debian/control25
-rw-r--r--debian/control.modules.in21
-rw-r--r--debian/copyright18
-rwxr-xr-xdebian/rules128
7 files changed, 181 insertions, 51 deletions
diff --git a/debian/README.Debian b/debian/README.Debian
index 071a7f7..0bf2d3d 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -1,6 +1,28 @@
-xivo-e1000 for Debian
----------------------
+someproject for Debian
+------------------
-<possible notes regarding this package - if none, delete this file>
+o How do i build this module the debian way?
+
+- Building with module-assistant
+
+$ m-a a-i someproject
+
+(for kernel source or headers in non-standard directory, add the option
+-k /path/to/kernel/source with the correct path)
+
+- Building with make-kpkg
+
+$ cd /usr/src/
+$ ta jxvf someproject.tar.bz2
+$ cd /usr/src/kernel-source-2.6.9
+$ make-kpkg --added-modules=someproject modules
+
+- Building without make-kpkg
+
+$ cd /usr/src/
+$ tar jxvf someproject.tar.bz2
+$ cd modules/someproject
+$ fakeroot debian/rules kdist_image
+
+(no fakeroot needed if you run this as root)
- -- Noé Rubinstein <nrubinstein@avencall.com> Fri, 14 Sep 2012 08:07:33 +0200
diff --git a/debian/changelog b/debian/changelog
index d2d4e58..ab19183 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,7 @@
-xivo-e1000 (0.1) squeeze-xivo-skaro-dev; urgency=low
+xivo-e1000 (0.1) UNRELEASED; urgency=low
- * Initial Release.
+ * NOT RELEASED YET
+ * Initial release
+
+ -- Noé Rubinstein <nrubinstein@avencall.com> Tue, 27 Nov 2012 18:14:44 +0100
- -- Noé Rubinstein <nrubinstein@avencall.com> Mon, 26 Nov 2012 16:31:52 +0100
diff --git a/debian/compat b/debian/compat
index 7f8f011..b8626c4 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-7
+4
diff --git a/debian/control b/debian/control
index 555d765..f62bc28 100644
--- a/debian/control
+++ b/debian/control
@@ -1,15 +1,18 @@
Source: xivo-e1000
Section: kernel
-Priority: extra
+Priority: optional
Maintainer: Noé Rubinstein <nrubinstein@avencall.com>
-Build-Depends: debhelper (>= 7.0.50~), dkms, linux-headers-2.6-686 | linux-headers-2.6-amd64 | linux-headers-generic | linux-headers
-Standards-Version: 3.8.4
-Homepage: http://wiki.xivo.fr
-#Vcs-Git: git://git.debian.org/collab-maint/xivo-e1000.git
-#Vcs-Browser: http://git.debian.org/?p=collab-maint/xivo-e1000.git;a=summary
+Build-Depends: debhelper (>= 4.0.0), bzip2
+Standards-Version: 3.6.1
+
+Package: xivo-e1000-source
+Architecture: all
+Depends: module-assistant, bzip2, debhelper (>= 5.0.37)
+Description: source for the e1000 driver with support for Intel EP80579
+ This package provides the e1000 driver with added support for Intel EP80579
+ (a.k.a. Tolapai) GbE MAC. It also supports several OEM PHYs and the XiVO IPBX
+ Open Hardware platform.
+ .
+ This package contains the module source. The kernel driver can be built from
+ it using module-assistant or make-kpkg.
-Package: xivo-e1000
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: e1000 driver with support for Intel EP80579
- e1000 driver with support for Intel EP80579
diff --git a/debian/control.modules.in b/debian/control.modules.in
new file mode 100644
index 0000000..1d617af
--- /dev/null
+++ b/debian/control.modules.in
@@ -0,0 +1,21 @@
+Source: xivo-e1000
+Section: kernel
+Priority: optional
+Maintainer: Noé Rubinstein <nrubinstein@avencall.com>
+Build-Depends: debhelper (>= 4.0.0), bzip2
+
+Package: xivo-e1000-modules-_KVERS_
+Architecture: i386
+Recommends: kernel-image-_KVERS_
+Provides: xivo-e1000-modules
+Description: e1000 Linux kernel module with support for Intel EP805879
+ This package provides the e1000 driver with added support for Intel EP80579
+ (a.k.a. Tolapai) GbE MAC. It also supports several OEM PHYs and the XiVO IPBX
+ Open Hardware platform.
+ .
+ This package contains modules for the
+ kernel-image-_KVERS_ package.
+ .
+ If you compiled a custom kernel, you will most likely need to compile a
+ custom version of this module as well. The someproject-source
+ package has been provided for this purpose.
diff --git a/debian/copyright b/debian/copyright
index cbd2dfb..5926d63 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -2,10 +2,6 @@ This work was packaged for Debian by:
Noé Rubinstein <nrubinstein@avencall.com> on Fri, 14 Sep 2012 08:07:33 +0200
-It was downloaded from:
-
- <url://example.com>
-
Upstream Author(s):
<put author's name and email here>
@@ -18,16 +14,9 @@ Copyright:
License:
-### SELECT: ###
- 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; either version 2 of the License, or
- (at your option) any later version.
-### OR ###
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
-##########
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -42,12 +31,13 @@ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
The Debian packaging is:
- Copyright (C) 2012 Noé Rubinstein <nrubinstein@avencall.com>
+ Copyright (C) 2012 Noé Rubinstein <nrubinstein@avencall.com>,
+ Nicolas Hicher <nhicher@avencall.com>
you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
-# Please also look if there are files or directories which have a
-# different copyright/license attached and list them here.
+module-assistant is released under the GPL (see the COPYING file in the
+distribution for details, or /usr/share/common-licenses/GPL on Debian systems)
diff --git a/debian/rules b/debian/rules
index f4ac636..d8c1f3c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,19 +1,111 @@
#!/usr/bin/make -f
-# -*- makefile -*-
-# Sample debian/rules that uses debhelper.
-# This file was originally written by Joey Hess and Craig Small.
-# As a special exception, when this file is copied by dh-make into a
-# dh-make output file, you may use that output file without restriction.
-# 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 KSRC="/usr/src/linux-headers-2.6.32-5-686"
-
-DESTDIR=$(CURDIR)/debian/tmp
-
-override_dh_auto_install:
- mkdir -p debian/xivo-e1000/lib/modules/`uname -r`/extra
- cp $(CURDIR)/e1000.ko debian/xivo-e1000/lib/modules/
-%:
- dh $@
+
+#export DH_VERBOSE=1
+
+PACKAGE_NAME = xivo-e1000
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp:
+ dh_testdir
+ touch configure-stamp
+
+build-arch: configure-stamp build-arch-stamp
+build-arch-stamp:
+ dh_testdir
+ $(MAKE) unionctl uniondbg LINUXSRC=/usr/include
+ touch build-arch-stamp
+
+build-indep: configure-stamp build-indep-stamp
+build-indep-stamp:
+ dh_testdir
+ touch build-indep-stamp
+
+build: build-arch build-indep
+
+clean:
+ dh_testdir
+ rm -f build-arch-stamp build-indep-stamp configure-stamp
+ -$(MAKE) clean
+ dh_clean
+
+install: DH_OPTIONS=
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs -i usr/src/modules/$(PACKAGE_NAME)/debian
+ dh_installdirs -a usr/sbin
+
+ # $(MAKE) installbins PREFIX=debian/$(PACKAGE_NAME)-utils/usr
+ tar -v -c --exclude ".svn" --exclude "CVS" --exclude "debian" . | tar x -C debian/$(PACKAGE_NAME)-source/usr/src/modules/$(PACKAGE_NAME)
+ cp -a debian/compat debian/*modules.in debian/rules debian/copyright debian/changelog debian/$(PACKAGE_NAME)-source/usr/src/modules/$(PACKAGE_NAME)/debian
+ cd debian/$(PACKAGE_NAME)-source/usr/src && tar c modules | bzip2 -9 > $(PACKAGE_NAME).tar.bz2 && rm -rf modules
+
+ dh_install
+
+binary-indep: build install
+ dh_testdir -i
+ dh_testroot -i
+ dh_installchangelogs ChangeLog -i
+ dh_installdocs -i
+ dh_link -i
+ dh_compress -i
+ dh_fixperms -i
+ dh_installdeb -i
+ dh_shlibdeps -i
+ dh_gencontrol -i
+ dh_md5sums -i
+ dh_builddeb -i
+
+binary-arch: build install
+ dh_testdir -s
+ dh_testroot -s
+ dh_installdocs -s
+ dh_installchangelogs ChangeLog -s
+ dh_strip -s
+ dh_link -s
+ dh_compress -s
+ dh_fixperms -s
+ dh_installdeb -s
+ dh_shlibdeps -s
+ dh_gencontrol -s
+ dh_md5sums -s
+ dh_builddeb -s
+
+# module-assistant stuff
+PACKAGE = $(PACKAGE_NAME)-modules
+MA_DIR ?= /usr/share/modass
+-include $(MA_DIR)/include/generic.make
+-include $(MA_DIR)/include/common-rules.make
+
+kdist_clean: prep-deb-files
+ dh_clean
+ $(MAKE) clean
+
+kdist_config: prep-deb-files
+binary-modules: kdist_config
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+# build and install the module
+ $(MAKE) KVERS=$(KVERS) LINUXSRC=$(KSRC) MODPREFIX=$(CURDIR)/debian/$(PKGNAME)/ installmod
+ dh_installdocs
+ dh_installchangelogs
+ dh_compress
+ dh_fixperms
+ dh_installmodules
+ dh_installdeb
+ dh_gencontrol -- -v$(VERSION)
+ dh_md5sums
+ dh_builddeb --destdir=$(DEB_DESTDIR)
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure binary-modules kdist kdist_config kdist_image kdist_clean