summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
authorClint Adams <schizo@debian.org>2005-06-21 23:30:25 +0000
committerClint Adams <schizo@debian.org>2005-06-21 23:30:25 +0000
commitc2a1c435ef5e7d590328802ce333de410ce40cb6 (patch)
tree6095e344242e76daf58d6d42afc5ca29673d2a0a /debian/rules
downloaddebianutils-c2a1c435ef5e7d590328802ce333de410ce40cb6.tar.gz
tag of schizo@debian.org--2004-primary/debianutils--etch--0--version-0
(automatically generated log message) git-archimport-id: schizo@debian.org--etch/debianutils--etch--0--base-0
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules110
1 files changed, 110 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..cc84deb
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,110 @@
+#! /usr/bin/make -f
+
+package = debianutils
+
+CFLAGS = -Wall -g
+INSTALL = install
+INSTALL_FILE = $(INSTALL) -p -o root -g root -m 644
+INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 755
+INSTALL_SCRIPT = $(INSTALL) -p -o root -g root -m 755
+INSTALL_DIR = $(INSTALL) -p -d -o root -g root -m 755
+
+DEB_BUILD_GNU_SYSTEM ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_SYSTEM)
+DEB_BUILD_GNU_TYPE = $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+DEB_HOST_GNU_TYPE = $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
+CONFARGS = --host=$(DEB_HOST_GNU_TYPE)
+endif
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+CFLAGS += -O0
+else
+CFLAGS += -O2
+endif
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+INSTALL_PROGRAM += -s
+endif
+
+build:
+ $(checkdir)
+ CFLAGS="$(CFLAGS)" ./configure --prefix=/usr \
+ --mandir=/usr/share/man $(CONFARGS)
+ $(MAKE)
+
+clean:
+ $(checkdir)
+ -$(MAKE) clean
+ $(RM) -rf autom4te.cache
+ $(RM) -r debian/tmp* debian/files* debian/substvars debianutils*
+ find . -name '*~' -print0 | xargs -0 rm -f
+
+binary-indep: checkroot build
+ $(checkdir)
+
+binary-arch: checkroot build
+ $(checkdir)
+ -rm -rf debian/tmp
+ $(INSTALL_DIR) debian/tmp/DEBIAN \
+ debian/tmp/bin \
+ debian/tmp/sbin \
+ debian/tmp/usr/bin \
+ debian/tmp/usr/sbin \
+ debian/tmp/usr/share/man/man1 \
+ debian/tmp/usr/share/man/man8 \
+ debian/tmp/usr/share/man/fr/man8 \
+ debian/tmp/usr/lib/mime/packages \
+ debian/tmp/usr/share/doc/$(package)
+ $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp INSTALL_PROGRAM="$(INSTALL_PROGRAM)"
+ mv debian/tmp/usr/bin/run-parts \
+ debian/tmp/usr/bin/tempfile \
+ debian/tmp/usr/bin/mktemp \
+ debian/tmp/usr/bin/which \
+ debian/tmp/bin/
+ifeq ($(DEB_BUILD_GNU_SYSTEM),gnu)
+ ln -s /bin/which debian/tmp/usr/bin/which
+endif
+ifeq ($(DEB_BUILD_GNU_SYSTEM),linux)
+ mv debian/tmp/usr/sbin/installkernel debian/tmp/sbin/
+else
+ rm debian/tmp/usr/sbin/installkernel \
+ debian/tmp/usr/sbin/mkboot \
+ debian/tmp/usr/share/man/man8/installkernel.8 \
+ debian/tmp/usr/share/man/man8/mkboot.8
+endif
+ ln -s sensible-editor.1.gz debian/tmp/usr/share/man/man1/sensible-pager.1.gz
+ ln -s sensible-editor.1.gz debian/tmp/usr/share/man/man1/sensible-browser.1.gz
+ $(INSTALL_FILE) debian/changelog debian/tmp/usr/share/doc/$(package)
+ find debian/tmp/usr/share/man/man[18] \
+ debian/tmp/usr/share/doc/$(package) -type f | xargs gzip -9
+ gzip -9f debian/tmp/usr/share/man/fr/man1/which.1 \
+ debian/tmp/usr/share/man/fr/man8/savelog.8
+ $(INSTALL_FILE) debian/copyright debian/tmp/usr/share/doc/$(package)
+ $(INSTALL_SCRIPT) debian/preinst debian/tmp/DEBIAN/
+ $(INSTALL_SCRIPT) debian/prerm debian/tmp/DEBIAN/
+ $(INSTALL_SCRIPT) debian/postinst debian/tmp/DEBIAN/
+ $(INSTALL_SCRIPT) debian/postrm debian/tmp/DEBIAN/
+ $(INSTALL_FILE) debian/mime debian/tmp/usr/lib/mime/packages/debianutils
+ dpkg-shlibdeps run-parts tempfile mktemp
+ dpkg-gencontrol -isp
+ dpkg --build debian/tmp ..
+
+define checkdir
+ test -f run-parts.c && test -f debian/rules
+endef
+
+binary: binary-indep binary-arch
+
+checkroot:
+ $(checkdir)
+ test 0 = `id -u`
+
+prebuild:
+ printf "define(DEBIANUTILS_VERSION, %s)\n" $$(dpkg-parsechangelog | sed -n '/^Version: \(.*\)$$/ {s//\1/;p}') >acinclude.m4
+
+ autoreconf -fi
+
+.PHONY: binary binary-arch binary-indep clean checkroot build prebuild
+
+# Local Variables:
+# mode:Makefile
+# End: