From b946848fdb9fcbb1e9f9ff09a011fa43e11a3061 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Tue, 12 Feb 2002 01:34:36 +0000 Subject: [PATCH] More hacking. --- debian/comedi-modules.control | 7 +++++ debian/comedi-modules.postinst | 7 +++++ debian/comedi-modules.prerm | 5 ++++ debian/comedi.templates | 1 + debian/control | 7 +++++ debian/files | 1 + debian/rules | 53 ++++++++++++++-------------------- 7 files changed, 50 insertions(+), 31 deletions(-) create mode 100644 debian/comedi-modules.control create mode 100644 debian/comedi-modules.postinst create mode 100644 debian/comedi-modules.prerm create mode 100644 debian/comedi.templates create mode 100644 debian/files diff --git a/debian/comedi-modules.control b/debian/comedi-modules.control new file mode 100644 index 00000000..e2d924d9 --- /dev/null +++ b/debian/comedi-modules.control @@ -0,0 +1,7 @@ +Package: comedi-modules-${kvers} +Section: admin +Architecture: any +Description: Comedi modules + This package provides the source code for Comedi. The kernel source + is required to compile these modules. + diff --git a/debian/comedi-modules.postinst b/debian/comedi-modules.postinst new file mode 100644 index 00000000..381726af --- /dev/null +++ b/debian/comedi-modules.postinst @@ -0,0 +1,7 @@ +#!/bin/sh + +if [ "$1" = "configure" ]; then + if [ -d /usr/doc -a ! -e /usr/doc/comedi-modules -a -d /usr/share/doc/comedi-modules ]; then + ln -sf ../share/doc/comedi-modules /usr/doc/comedi-modules + fi +fi diff --git a/debian/comedi-modules.prerm b/debian/comedi-modules.prerm new file mode 100644 index 00000000..d8a2e18a --- /dev/null +++ b/debian/comedi-modules.prerm @@ -0,0 +1,5 @@ +#!/bin/sh + +if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/comedi-modules ]; then + rm -f /usr/doc/comedi-modules +fi diff --git a/debian/comedi.templates b/debian/comedi.templates new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/debian/comedi.templates @@ -0,0 +1 @@ + diff --git a/debian/control b/debian/control index 5990d168..7ffbeb39 100644 --- a/debian/control +++ b/debian/control @@ -13,3 +13,10 @@ Description: Comedi source This package provides the source code for Comedi. The kernel source is required to compile these modules. +Package: comedi-modules +Section: admin +Architecture: any +Description: Comedi modules + This package provides the source code for Comedi. The kernel source + is required to compile these modules. + diff --git a/debian/files b/debian/files new file mode 100644 index 00000000..60f5fe18 --- /dev/null +++ b/debian/files @@ -0,0 +1 @@ +comedi-modules_0.7.63-cvs20020210-1_i386.deb admin optional diff --git a/debian/rules b/debian/rules index 0419eaf3..0dd338b8 100755 --- a/debian/rules +++ b/debian/rules @@ -6,27 +6,40 @@ # architecture-dependant package, as well as an architecture-independent # package. +#p_mod=comedi-modules-$(KVERS) +p_mod=comedi-modules +d_mod=debian/$(p_mod) kdist_image: checkroot $(RM) debian/files - for CONFLOC in ~/.kernel-pkg.conf /etc/kernel-pkg.conf; \ - do test -f $$CONFLOC && break; done; \ - $(MAKE) -f debian/rules \ - MOD_DIR=$(KSRC) CONFLOC=$$CONFLOC \ - clean-modules binary-modules + yes "" | ./configure --linuxdir $(KSRC) --non-interactive --reconf + $(MAKE) + $(RM) -rf $(d_mod) + install -d $(d_mod) $(d_mod)/DEBIAN + install -d "$(d_mod)/usr/share/doc/$(p_mod)" + install debian/comedi-modules.postinst $(d_mod)/DEBIAN/postinst + install debian/comedi-modules.prerm $(d_mod)/DEBIAN/prerm + $(MAKE) INSTALL_MOD_PATH=`pwd`/$(d_mod) install + install -m644 debian/changelog \ + $(d_mod)/usr/share/doc/$(p_mod)/changelog.Debian + gzip -9v $(d_mod)/usr/share/doc/$(p_mod)/* + install -m644 debian/copyright \ + $(d_mod)/usr/share/doc/$(p_mod)/copyright + chown -R root.root $(d_mod) + chmod -R g-ws $(d_mod) + dpkg-gencontrol -p$(p_mod) -P$(d_mod) -isp + dpkg-deb --build $(d_mod) $(KSRC)/.. kdist_changes: kdist_configure: - ./configure --linuxdir $(KSRC) kdist: kdist_image - KSRC="$(KSRC)" KMAINT="$(KMAINT)" KEMAIL="$(KEMAIL)" \ - sh -v debian/genchanges.sh + #$(RM) -r $(d_mod) kdist_clean clean: $(MAKE) distclean - $(RM) -r debian/tmp debian/src debian/*~ \ + $(RM) -r debian/tmp $(d_mod) debian/src debian/*~ \ debian/files debian/control.tmp debian/substvars build: @@ -35,28 +48,6 @@ clean-modules: -umask 022; $(MAKE) DEB_MOD=yes clean $(RM) build-modules -binary-modules: - $(RM) -r debian/tmp-modules - install -d debian/tmp-modules debian/tmp-modules/DEBIAN - KSRC="$(KSRC)" KVERS="$(KVERS)" KDREV="$(KDREV)" \ - sh -v debian/setvers.sh - cat debian/comedi.templates >>debian/tmp-modules/DEBIAN/templates - install -d "debian/tmp-modules/usr/share/doc/comedi-modules-$(kvers)" - install debian/comedi-modules.postrm debian/tmp-modules/DEBIAN/postrm - umask 022; $(MAKE) \ - DEB_MOD=yes PREFIX=`pwd`/debian/tmp-modules install - install -m644 debian/changelog \ - debian/tmp-modules/usr/share/doc/comedi-modules-$(kvers)/changelog.Debian - gzip -9v debian/tmp-modules/usr/share/doc/comedi-modules-*/* - install -m644 debian/copyright \ - debian/tmp-modules/usr/share/doc/comedi-modules-$(kvers)/copyright - cat COPYING \ - >> debian/tmp-modules/usr/share/doc/comedi-modules-$(kvers)/copyright - chown -R root.root debian/tmp-modules - chmod -R g-ws debian/tmp-modules - if test -d debian/tmp-modules/lib/modules; then \ - dpkg-deb --build debian/tmp-modules $(MOD_DIR)/..; fi - binary-source: checkroot $(RM) -r debian/src install -d debian/src debian/src/DEBIAN -- 2.26.2