More hacking.
authorDavid Schleef <ds@schleef.org>
Tue, 12 Feb 2002 01:34:36 +0000 (01:34 +0000)
committerDavid Schleef <ds@schleef.org>
Tue, 12 Feb 2002 01:34:36 +0000 (01:34 +0000)
debian/comedi-modules.control [new file with mode: 0644]
debian/comedi-modules.postinst [new file with mode: 0644]
debian/comedi-modules.prerm [new file with mode: 0644]
debian/comedi.templates [new file with mode: 0644]
debian/control
debian/files [new file with mode: 0644]
debian/rules

diff --git a/debian/comedi-modules.control b/debian/comedi-modules.control
new file mode 100644 (file)
index 0000000..e2d924d
--- /dev/null
@@ -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 (file)
index 0000000..381726a
--- /dev/null
@@ -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 (file)
index 0000000..d8a2e18
--- /dev/null
@@ -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 (file)
index 0000000..8b13789
--- /dev/null
@@ -0,0 +1 @@
+
index 5990d168c95e375d1842c06f495adcee9b7bf27d..7ffbeb391cc006109cc51a0323ddfe8643899ff2 100644 (file)
@@ -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 (file)
index 0000000..60f5fe1
--- /dev/null
@@ -0,0 +1 @@
+comedi-modules_0.7.63-cvs20020210-1_i386.deb admin optional
index 0419eaf3040a72d06955b20e0e30dffb32b8f86b..0dd338b802aabd922248d00ab9bb56aae060f0d6 100755 (executable)
@@ -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