summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog1
-rw-r--r--debian/compat1
-rw-r--r--debian/control2
-rw-r--r--debian/gnumach-dbg.docs5
-rw-r--r--debian/gnumach-dev.docs3
-rw-r--r--debian/gnumach.docs5
-rw-r--r--debian/gnumach.info1
-rw-r--r--debian/postinst3
-rw-r--r--debian/prerm3
-rwxr-xr-xdebian/rules208
10 files changed, 97 insertions, 135 deletions
diff --git a/debian/changelog b/debian/changelog
index 2bf38f5..27ad97b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,7 @@ gnumach (1:20040915-1) unstable; urgency=low
* Split patches into debian/patches/.
* Allow to build natively on non GNU/Hurd systems.
* Enable i386, kfreebsd-i386 and knetbsd-i386 on all packages.
+ * Switched to debhelper.
* Update autoconf.
Based on a patch by Neal H. Walfield <neal@cs.uml.edu>, thanks.
* Update NICs from Linux.
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..b8626c4
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+4
diff --git a/debian/control b/debian/control
index c983833..7b7e53d 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@ Priority: optional
Maintainer: Debian GNU Hurd Maintainers <debian-hurd@lists.debian.org>
Uploaders: Marcus Brinkmann <brinkmd@debian.org>, Guillem Jover <guillem@debian.org>
Standards-Version: 3.5.6.0
-Build-Depends: mig, sharutils, texinfo
+Build-Depends: debhelper (>= 4.0.0), mig, sharutils, texinfo
Package: gnumach
Section: base
diff --git a/debian/gnumach-dbg.docs b/debian/gnumach-dbg.docs
new file mode 100644
index 0000000..0804e23
--- /dev/null
+++ b/debian/gnumach-dbg.docs
@@ -0,0 +1,5 @@
+README
+NEWS
+i386/README-Drivers
+ChangeLog.0
+ChangeLog.00
diff --git a/debian/gnumach-dev.docs b/debian/gnumach-dev.docs
new file mode 100644
index 0000000..ac4f405
--- /dev/null
+++ b/debian/gnumach-dev.docs
@@ -0,0 +1,3 @@
+NEWS
+ChangeLog.0
+ChangeLog.00
diff --git a/debian/gnumach.docs b/debian/gnumach.docs
new file mode 100644
index 0000000..0804e23
--- /dev/null
+++ b/debian/gnumach.docs
@@ -0,0 +1,5 @@
+README
+NEWS
+i386/README-Drivers
+ChangeLog.0
+ChangeLog.00
diff --git a/debian/gnumach.info b/debian/gnumach.info
new file mode 100644
index 0000000..fd51950
--- /dev/null
+++ b/debian/gnumach.info
@@ -0,0 +1 @@
+build/doc/mach.info*
diff --git a/debian/postinst b/debian/postinst
deleted file mode 100644
index 5728608..0000000
--- a/debian/postinst
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh -e
-
-install-info --quiet --section "Kernel" "Kernel" /usr/share/info/mach.info
diff --git a/debian/prerm b/debian/prerm
deleted file mode 100644
index b033806..0000000
--- a/debian/prerm
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh -e
-
-install-info --quiet --remove /usr/share/info/mach.info
diff --git a/debian/rules b/debian/rules
index cee71ed..47b9cb2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,21 +1,12 @@
#!/usr/bin/make -f
-############################ -*- Mode: Makefile -*- ###########################
-## rules ---
-## Author : Marcus Brinkmann <brinkmd@debian.org>
-## Created On : Sat, 1 Aug 1998 21:33:31 +0200
-## Created On Node : localhost
-## Last Modified By : Marcus Brinkmann
-## Last Modified On : Sun, 8 Nov 1998 13:55:22 +0100
-## Last Machine Used: localhost
-## Update Count : 1
-## Status : Unknown, Use with caution!
-## HISTORY :
-## Description :
-##
-###############################################################################
+#
+# Based on the work by Marcus Brinkmann <brinkmd@debian.org>
+# Rewritten by Guillem Jover <guillem@debian.org>
+#
-package := gnumach
-package-dev := gnumach-dev
+pkg := gnumach
+pkg_dbg := gnumach-dbg
+pkg_dev := gnumach-dev
DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
@@ -28,36 +19,10 @@ else
CFLAGS += -O2
endif
-PREFIX = /usr
-BINDIR = $(PREFIX)/bin
-MANDIR = $(PREFIX)/man
-INFODIR = $(PREFIX)/share/info
-DOCDIR = $(PREFIX)/share/doc/$(package)
-DOCDIR-DEV = $(PREFIX)/share/doc/$(package-dev)
-
-# Package specific stuff. The idea is to try to make the rules
-# generic (gradually).
-
-FILES_TO_CLEAN = debian/files machine
-DIRS_TO_CLEAN = debian/tmp build build-dbg
-STAMPS_TO_CLEAN = stamp-build stamp-configure
-
-install_file = install -o root -g root -m 644
-install_program = install -s -o root -g root -m 755
-install_script = install -o root -g root -m 755
-make_directory = install -d -o root -g root -m 755
-
-define checkdir
- test -f debian/rules
-endef
-
-define checkroot
- @test 0 = "`id -u`" || (echo need root priviledges; exit 1)
-endef
-
# disabled:
-# ncr5380, ncr53c400, ncr53c406a
-# hpj2577, hpj2573, hp27248b, hp2585, atp
+# ncr5380, ncr53c400, ncr53c406a
+# hpj2577, hpj2573, hp27248b, hp2585, atp
+
drivers := --enable-floppy \
--enable-ide \
\
@@ -146,135 +111,122 @@ patch::
include debian/patch.mk
-stamp-configure: patch
- $(checkdir)
+configure: patch stamp-configure
+stamp-configure:
+ dh_testdir
-mkdir build
cd build && ../configure $(drivers) \
--build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
touch stamp-configure
-stamp-configure-dbg: patch
- $(checkdir)
+configure-dbg: patch stamp-configure-dbg
+stamp-configure-dbg:
+ dh_testdir
-mkdir build-dbg
cd build-dbg && ../configure --enable-kdb $(drivers) \
--build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
touch stamp-configure-dbg
all build: stamp-build stamp-build-dbg
-stamp-build: stamp-configure
- $(checkdir)
+stamp-build: configure
+ dh_testdir
$(MAKE) -C build
$(MAKE) -C build/doc
touch stamp-build
-stamp-build-dbg: stamp-configure-dbg
- $(checkdir)
+stamp-build-dbg: configure-dbg
+ dh_testdir
$(MAKE) -C build-dbg
touch stamp-build-dbg
clean::
- $(checkdir)
- -rm -f $(FILES_TO_CLEAN) $(STAMPS_TO_CLEAN)
- -rm -rf $(DIRS_TO_CLEAN)
+ dh_testdir
+ -rm -f machine stamp-build stamp-configure
+ -rm -rf build build-dbg
-rm -f core `find . \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
-o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
-o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -print`
# XXX: Should be removed once the autoconf patch is in upstream
rm -f i386/linux/configure.ac
+
+ dh_clean
binary: binary-indep binary-arch
# Build architecture-independent files here.
binary-indep: build
- $(checkdir)
- $(checkroot)
- -rm -rf debian/tmp
-
- $(make_directory) debian/tmp/DEBIAN debian/tmp$(DOCDIR-DEV)
+ dh_testdir
+ dh_testroot
+ dh_clean -p$(pkg_dev) -k
+ dh_installdirs -p$(pkg_dev)
- $(MAKE) -C build install-headers prefix=$(CURDIR)/debian/tmp
- mv debian/tmp/include debian/tmp/usr/.
- -find debian/tmp -type d | xargs chmod g-w
+ $(MAKE) -C build install-headers \
+ prefix=$(CURDIR)/debian/$(pkg_dev)/usr \
+ exec_prefix=$(CURDIR)/debian/$(pkg_dev) \
+ includedir=\$${prefix}/include
- $(install_file) NEWS debian/tmp$(DOCDIR-DEV)
- $(install_file) ChangeLog debian/tmp$(DOCDIR-DEV)/ChangeLog
- $(install_file) ChangeLog.0 debian/tmp$(DOCDIR-DEV)
- $(install_file) ChangeLog.00 debian/tmp$(DOCDIR-DEV)
- $(install_file) debian/changelog debian/tmp$(DOCDIR-DEV)/changelog.Debian
- gzip -9frq debian/tmp$(DOCDIR-DEV)/.
- $(install_file) debian/copyright debian/tmp$(DOCDIR-DEV)
- ln -s ChangeLog.gz debian/tmp$(DOCDIR-DEV)/changelog.gz
+ dh_installdocs -p$(pkg_dev)
+ dh_installchangelogs -p$(pkg_dev) -k ChangeLog
- dpkg-gencontrol -isp -p$(package-dev) -Pdebian/tmp
- chown -R root.root debian/tmp
- dpkg --build debian/tmp ..
+ dh_link -p$(pkg_dev)
+ dh_strip -p$(pkg_dev)
+ dh_compress -p$(pkg_dev)
+ dh_fixperms -p$(pkg_dev)
+ dh_installdeb -p$(pkg_dev)
+ dh_gencontrol -p$(pkg_dev)
+ dh_md5sums -p$(pkg_dev)
+ dh_builddeb -p$(pkg_dev)
binary-arch: binary-gnumach binary-gnumach-dbg
binary-gnumach: stamp-build
- $(checkdir)
- $(checkroot)
- -rm -rf debian/tmp
+ dh_testdir
+ dh_testroot
+ dh_clean -p$(pkg) -k
+ dh_installdirs -p$(pkg)
- $(make_directory) debian/tmp/DEBIAN debian/tmp$(DOCDIR) debian/tmp$(INFODIR)
+ $(MAKE) -C build install-kernel \
+ prefix=$(CURDIR)/debian/$(pkg)/usr \
+ exec_prefix=$(CURDIR)/debian/$(pkg)
- $(MAKE) -C build install-kernel prefix=$(CURDIR)/debian/tmp
- strip --strip-all debian/tmp/boot/gnumach
- gzip -9fq debian/tmp/boot/gnumach
- -find debian/tmp -type d | xargs chmod g-w
- $(install_file) build/doc/mach.info* debian/tmp$(INFODIR)
- -gzip -9frq debian/tmp$(INFODIR)
+ dh_installdocs -p$(pkg)
+ dh_installchangelogs -p$(pkg) -k ChangeLog
+ dh_installinfo -p$(pkg)
- $(install_file) README debian/tmp$(DOCDIR)
- $(install_file) NEWS debian/tmp$(DOCDIR)
- $(install_file) ChangeLog debian/tmp$(DOCDIR)/ChangeLog
- $(install_file) ChangeLog.0 debian/tmp$(DOCDIR)
- $(install_file) ChangeLog.00 debian/tmp$(DOCDIR)
- $(install_file) i386/README-Drivers debian/tmp$(DOCDIR)
- $(install_file) debian/README.Debian debian/tmp$(DOCDIR)
- $(install_file) debian/changelog debian/tmp$(DOCDIR)/changelog.Debian
- gzip -9frq debian/tmp$(DOCDIR)/.
- $(install_file) debian/copyright debian/tmp$(DOCDIR)
- ln -s ChangeLog.gz debian/tmp$(DOCDIR)/changelog.gz
-
- $(install_script) debian/postinst debian/tmp/DEBIAN
- $(install_script) debian/prerm debian/tmp/DEBIAN
- dpkg-gencontrol -isp -p$(package) -Pdebian/tmp
- chown -R root.root debian/tmp
- dpkg --build debian/tmp ..
+ dh_link -p$(pkg)
+ dh_strip -p$(pkg)
+ dh_compress -p$(pkg) boot/gnumach
+ dh_fixperms -p$(pkg)
+ dh_installdeb -p$(pkg)
+ dh_gencontrol -p$(pkg)
+ dh_md5sums -p$(pkg)
+ dh_builddeb -p$(pkg)
binary-gnumach-dbg: stamp-build-dbg
- $(checkdir)
- $(checkroot)
- -rm -rf debian/tmp
-
- $(make_directory) debian/tmp/DEBIAN debian/tmp$(DOCDIR)-dbg
+ dh_testdir
+ dh_testroot
+ dh_clean -p$(pkg_dbg) -k
+ dh_installdirs -p$(pkg_dbg)
- $(MAKE) -C build-dbg install-kernel prefix=$(CURDIR)/debian/tmp
- mv debian/tmp/boot/gnumach debian/tmp/boot/gnumach-dbg
- gzip -9fq debian/tmp/boot/gnumach-dbg
- -find debian/tmp -type d | xargs chmod g-w
+ $(MAKE) -C build-dbg install-kernel \
+ prefix=$(CURDIR)/debian/$(pkg_dbg)/usr \
+ exec_prefix=$(CURDIR)/debian/$(pkg_dbg)
+ mv debian/$(pkg_dbg)/boot/gnumach debian/$(pkg_dbg)/boot/gnumach-dbg
- $(install_file) README debian/tmp$(DOCDIR)-dbg
- $(install_file) NEWS debian/tmp$(DOCDIR)-dbg
- $(install_file) ChangeLog debian/tmp$(DOCDIR)-dbg/ChangeLog
- $(install_file) ChangeLog.0 debian/tmp$(DOCDIR)-dbg
- $(install_file) ChangeLog.00 debian/tmp$(DOCDIR)-dbg
- $(install_file) i386/README-Drivers debian/tmp$(DOCDIR)-dbg
- $(install_file) debian/README.Debian debian/tmp$(DOCDIR)-dbg
- $(install_file) debian/changelog debian/tmp$(DOCDIR)-dbg/changelog.Debian
- gzip -9frq debian/tmp$(DOCDIR)-dbg/.
- $(install_file) debian/copyright debian/tmp$(DOCDIR)-dbg
- ln -s ChangeLog.gz debian/tmp$(DOCDIR)-dbg/changelog.gz
+ dh_installdocs -p$(pkg_dbg)
+ dh_installchangelogs -p$(pkg_dbg) -k ChangeLog
- dpkg-gencontrol -isp -p$(package)-dbg -Pdebian/tmp
- chown -R root.root debian/tmp
- dpkg --build debian/tmp ..
+ dh_link -p$(pkg_dbg)
+ dh_compress -p$(pkg_dbg) boot/gnumach-dbg
+ dh_fixperms -p$(pkg_dbg)
+ dh_installdeb -p$(pkg_dbg)
+ dh_gencontrol -p$(pkg_dbg)
+ dh_md5sums -p$(pkg_dbg)
+ dh_builddeb -p$(pkg_dbg)
binary-indep: build
-# We have nothing to do here.
-.PHONY: build clean binary-indep binary-arch binary-gnumach binary-gnumach-dbg
-.PHONY: binary configure
+.PHONY: build clean configure
+.PHONY: binary binary-indep binary-arch binary-gnumach binary-gnumach-dbg