diff options
author | Noé Rubinstein <nrubinstein@avencall.com> | 2012-12-03 18:08:38 +0100 |
---|---|---|
committer | Noé Rubinstein <nrubinstein@avencall.com> | 2012-12-03 18:14:18 +0100 |
commit | ae6aedd584a01066812f719acb1aca1aa365d3e0 (patch) | |
tree | 46545a8c86d425b75486e6daa0fb95c47166106c | |
parent | d9a28c1dacbaedfa7289b86a493997f1b27cec87 (diff) |
Build a package with m-a
-rw-r--r-- | debian/README | 6 | ||||
-rw-r--r-- | debian/README.Debian | 23 | ||||
-rw-r--r-- | debian/README.source | 9 | ||||
-rw-r--r-- | debian/changelog | 5 | ||||
-rw-r--r-- | debian/compat | 1 | ||||
-rw-r--r-- | debian/control | 26 | ||||
-rw-r--r-- | debian/control.modules.in | 21 | ||||
-rw-r--r-- | debian/copyright | 53 | ||||
-rw-r--r-- | debian/docs | 0 | ||||
-rw-r--r-- | debian/files | 1 | ||||
-rwxr-xr-x | debian/rules | 221 | ||||
-rw-r--r-- | debian/source/format | 1 | ||||
-rw-r--r-- | debian/xivo-e1000-source.substvars | 1 |
13 files changed, 368 insertions, 0 deletions
diff --git a/debian/README b/debian/README new file mode 100644 index 0000000..58d275c --- /dev/null +++ b/debian/README @@ -0,0 +1,6 @@ +The Debian Package xivo-e1000 +---------------------------- + +Comments regarding the Package + + -- Noé Rubinstein <nrubinstein@avencall.com> Mon, 03 Dec 2012 11:37:26 +0100 diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 0000000..6d95938 --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,23 @@ +xivo-e1000 for Debian +--------------------- + +Please see ./README for a description of the xivo-e1000 software. + +The Debian xivo-e1000 source package provides two packages, + + 1) xivo-e1000, which the provides the userspace daemon + 2) xivo-e1000-source, which provides the source for the kernel modules + +The xivo-e1000-source package can be used in several ways, + + - Using the make-kpkg(1) command provided by the kernel-package Debian + package. This will produce a corresponding xivo-e1000-modules package for + the Debian kernel-image package that you are using. This is "the Debian + way". See the "modules_image" section of the make-kpkg(1) man page. + + - Changing to the /usr/src/modules/xivo-e1000/ directory and building as + the README file instructs using "make; make install". This will build + and install a module specific to the system you are building on and is + not under control of the packaging system. + + -- Noé Rubinstein <nrubinstein@avencall.com> Mon, 03 Dec 2012 11:37:26 +0100 diff --git a/debian/README.source b/debian/README.source new file mode 100644 index 0000000..cbd09f3 --- /dev/null +++ b/debian/README.source @@ -0,0 +1,9 @@ +xivo-e1000 for Debian +--------------------- + +<this file describes information about the source package, see Debian policy +manual section 4.14. You WILL either need to modify or delete this file> + + + + diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..cca1851 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +xivo-e1000 (0.1) unstable; urgency=low + + * Initial Release. + + -- Noé Rubinstein <nrubinstein@avencall.com> Mon, 03 Dec 2012 11:37:26 +0100 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7f8f011 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +7 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..5038316 --- /dev/null +++ b/debian/control @@ -0,0 +1,26 @@ +Source: xivo-e1000 +Section: unknown +Priority: extra +Maintainer: Noé Rubinstein <nrubinstein@avencall.com> +Build-Depends: debhelper (>= 7.0.50~), bzip2 +Standards-Version: 3.8.4 +Homepage: <insert the upstream URL, if relevant> +#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 + +#Package: xivo-e1000-utils +#Architecture: any +#Depends: ${shlibs:Depends}, ${misc:Depends} +#Description: <insert up to 60 chars description> <insert long description, indented with spaces> + +Package: xivo-e1000-source +Architecture: all +Depends: module-assistant, debhelper (>= 7), make, bzip2 +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. + diff --git a/debian/control.modules.in b/debian/control.modules.in new file mode 100644 index 0000000..67ae539 --- /dev/null +++ b/debian/control.modules.in @@ -0,0 +1,21 @@ +Source: xivo-e1000 +Section: unknown +Priority: optional +Maintainer: Noé Rubinstein <nrubinstein@avencall.com> +Build-Depends: debhelper (>= 7) +Standards-Version: 3.8.4 + +Package: xivo-e1000-modules-_KVERS_ +Architecture: any +Provides: xivo-e1000-modules +Description: e1000 with support for Intel EP8057, modules for Linux (kernel _KVERS_) + This package contains the set of loadable kernel modules for 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 compiled kernel modules for _KVERS_ + . + If you have compiled your own kernel, you will most likely need to build + your own xivo-e1000-modules. The xivo-e1000-source package has been + provided for use with the Debian's module-assistant or kernel-package + utilities to produce a version of xivo-e1000-modules for your kernel. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..b6fa394 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,53 @@ +This work was packaged for Debian by: + + Noé Rubinstein <nrubinstein@avencall.com> on Mon, 03 Dec 2012 11:37:26 +0100 + +It was downloaded from: + + <url://example.com> + +Upstream Author(s): + + <put author's name and email here> + <likewise for another author> + +Copyright: + + <Copyright (C) YYYY Firstname Lastname> + <likewise for another author> + +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 + 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, see <http://www.gnu.org/licenses/> + +On Debian systems, the complete text of the GNU General +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> + +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. diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/debian/docs diff --git a/debian/files b/debian/files new file mode 100644 index 0000000..f0b1d75 --- /dev/null +++ b/debian/files @@ -0,0 +1 @@ +xivo-e1000-source_0.1_all.deb unknown extra diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..0c1a003 --- /dev/null +++ b/debian/rules @@ -0,0 +1,221 @@ +#!/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. +# +# This version is for a hypothetical package that can build a kernel modules +# architecture-dependant package via make-kpkg, as well as an +# architecture-independent module source package, and other packages +# either dep/indep for things like common files or userspace components +# needed for the kernel modules. + +# Uncomment this to turn on verbose mode. +export DH_VERBOSE=1 + + + + +# some default definitions, important! +# +# Name of the source package +psource:=xivo-e1000-source + +# The short upstream name, used for the module source directory +sname:=xivo-e1000 + +### 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=xivo-e1000-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 + +MFLAGS = KSRC=$(KSRC) M=$(shell pwd) + +# 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_config 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_config: 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 + dh_testdir + dh_clean + $(MAKE) $(MFLAGS) clean +# rm -f driver/*.o driver/*.ko +# +### end KERNEL SETUP + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + + touch configure-stamp + + +build-arch: configure-stamp build-arch-stamp +build-arch-stamp: + dh_testdir + + # Add here command to compile/build the package. + $(MAKE) $(MFLAGS) modules + + touch $@ + +#k = $(shell echo $(KVERS) | grep -q ^2.6 && echo k) + +# 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: + dh_testroot + dh_prep + dh_installdirs lib/modules/$(KVERS)/misc + + # Build the module + $(MAKE) KSRC=$(KSRC) + + # Install the module + cp e1000.ko gcu.ko debian/$(PKGNAME)/lib/modules/$(KVERS)/misc + + dh_installdocs + dh_installchangelogs + dh_compress + dh_fixperms + dh_installdeb + dh_gencontrol -- -v$(VERSION) + dh_md5sums + dh_builddeb --destdir=$(DEB_DESTDIR) + dh_prep + +build-indep: configure-stamp build-indep-stamp +build-indep-stamp: + dh_testdir + + # Add here command to compile/build the arch indep package. + # It's ok not to do anything here, if you don't need to build + # anything for this package. + #docbook-to-man debian/xivo-e1000.sgml > xivo-e1000.1 + + touch $@ + +build: build-arch build-indep + +clean: + dh_testdir + #dh_testroot + rm -f build-arch-stamp build-indep-stamp configure-stamp + + # Add here commands to clean up after the build process. + $(MAKE) $(MFLAGS) clean + + dh_clean + +SRCFILES = $(shell git ls-files '*.c' '*.h' Makefile) +install: DH_OPTIONS= +install: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs + + # Create the directories to install the source into + dh_installdirs -p$(psource) usr/src/modules/$(sname)/debian + + # Copy only the driver source to the proper location + cp $(SRCFILES) debian/$(psource)/usr/src/modules/$(sname) + # Copy the needed debian/ pieces to the proper location + cp debian/*modules.in* \ + debian/$(psource)/usr/src/modules/$(sname)/debian + #cp debian/*_KVERS_* debian/rules debian/changelog debian/copyright \ + cp debian/rules debian/changelog debian/copyright \ + debian/compat debian/$(psource)/usr/src/modules/$(sname)/debian/ + cd debian/$(psource)/usr/src && tar c modules | bzip2 -9 > $(sname).tar.bz2 && rm -rf modules + + # Add here commands to install the package into debian/xivo-e1000. + # XXX $(MAKE) DESTDIR=$(CURDIR)/debian/xivo-e1000 install + + dh_install + +# Build architecture-independent files here. +# Pass -i to all debhelper commands in this target to reduce clutter. +binary-indep: build install + dh_testdir -i + dh_testroot -i + dh_installchangelogs -i + dh_installdocs -i + dh_installexamples -i +# dh_install -i +# dh_installmenu -i +# dh_installdebconf -i +# dh_installlogrotate -i +# dh_installemacsen -i +# dh_installpam -i +# dh_installmime -i +# dh_installinit -i +# dh_installcron -i +# dh_installinfo -i + dh_installman -i + dh_link -i + dh_compress -i + dh_fixperms -i + dh_installdeb -i +# dh_perl -i +# dh_makeshlibs -i + dh_installdeb -i + dh_shlibdeps -i + dh_gencontrol -i + dh_md5sums -i + dh_builddeb -i + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir -s + dh_testroot -s +# dh_installdebconf -s + dh_installdocs -s + dh_installexamples -s + dh_installmenu -s +# dh_installlogrotate -s +# dh_installemacsen -s +# dh_installpam -s +# dh_installmime -s +# dh_installinit -s + dh_installcron -s +# dh_installman -s + dh_installinfo -s + dh_installchangelogs -s + dh_strip -s + dh_link -s + dh_compress -s + dh_fixperms -s +# dh_makeshlibs -s + dh_installdeb -s +# dh_perl -s + dh_shlibdeps -s + dh_gencontrol -s + dh_md5sums -s + dh_builddeb -s + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure binary-modules kdist kdist_configure kdist_image kdist_clean diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) diff --git a/debian/xivo-e1000-source.substvars b/debian/xivo-e1000-source.substvars new file mode 100644 index 0000000..abd3ebe --- /dev/null +++ b/debian/xivo-e1000-source.substvars @@ -0,0 +1 @@ +misc:Depends= |