summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
authorClint Adams <clint@debian.org>2020-08-19 15:12:19 +0200
committerClint Adams <clint@debian.org>2020-08-19 15:12:19 +0200
commit5344719e01dc283a210299018ca33c005e5dbf45 (patch)
tree766f5d2744b4c51a7b27fa684fe68b46f3691b89 /debian/rules
debianutils (4.11.1) unstable; urgency=medium
* Mark smoke autopkgtest as superficial * run-parts: print version output to stdout instead of stderr. closes: #961872. [dgit import package debianutils 4.11.1]
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules126
1 files changed, 126 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..d0af3cb
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,126 @@
+#! /usr/bin/make -f
+
+package = debianutils
+
+CFLAGS = -Wall -g
+INSTALL = install
+INSTALL_FILE = $(INSTALL) -p -m 644
+INSTALL_PROGRAM = $(INSTALL) -p -m 755
+INSTALL_SCRIPT = $(INSTALL) -p -m 755
+INSTALL_DIR = $(INSTALL) -p -d -m 755
+
+include /usr/share/dpkg/architecture.mk
+
+STRIP=strip
+
+ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
+CONFARGS = --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
+STRIP=$(DEB_HOST_GNU_TYPE)-strip
+endif
+
+CFLAGS := $(shell dpkg-buildflags --get CFLAGS)
+CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
+LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
+
+BUILD_DATE := $(shell dpkg-parsechangelog | sed -n -e 's/^Date: //p')
+
+build: build-indep build-arch
+build-indep:
+
+build-arch:
+ $(checkdir)
+ ./configure CFLAGS="$(CFLAGS)" \
+ CPPFLAGS="$(CPPFLAGS)" \
+ LDFLAGS="$(LDFLAGS)" \
+ --prefix=/usr \
+ --mandir=/usr/share/man $(CONFARGS)
+ $(MAKE)
+ touch build-arch
+
+clean:
+ $(checkdir)
+ test ! -f Makefile || $(MAKE) distclean
+ $(RM) -rf autom4te.cache
+ $(RM) -r debian/tmp* debianutils*
+ $(RM) build-arch debian/files* debian/substvars
+ find . -name '*~' -print0 | xargs -0 rm -f
+
+binary-indep: build
+ $(checkdir)
+
+binary-arch: 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/doc/$(package) \
+ debian/tmp/usr/share/$(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/bin/
+
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+ $(STRIP) --remove-section=.comment --remove-section=.note \
+ debian/tmp/bin/run-parts \
+ debian/tmp/bin/tempfile \
+ debian/tmp/usr/bin/ischroot
+endif
+
+ifeq ($(DEB_HOST_ARCH_OS),linux)
+ mv debian/tmp/usr/sbin/installkernel debian/tmp/sbin/
+else
+ rm debian/tmp/usr/sbin/installkernel \
+ debian/tmp/usr/share/man/man8/installkernel.8
+endif
+ $(INSTALL_FILE) debian/shells debian/tmp/usr/share/$(package)
+ $(INSTALL_FILE) debian/changelog debian/tmp/usr/share/doc/$(package)
+ $(INSTALL_FILE) debian/README.shells debian/tmp/usr/share/doc/$(package)
+ find debian/tmp/usr/share/man/man[18] \
+ debian/tmp/usr/share/man/de/man[18] \
+ debian/tmp/usr/share/man/es/man[18] \
+ debian/tmp/usr/share/man/fr/man[18] \
+ debian/tmp/usr/share/man/it/man[18] \
+ debian/tmp/usr/share/man/ja/man[18] \
+ debian/tmp/usr/share/man/pl/man[18] \
+ debian/tmp/usr/share/man/sl/man[18] \
+ debian/tmp/usr/share/doc/$(package) -type f | xargs gzip -9n
+ $(INSTALL_FILE) debian/copyright debian/tmp/usr/share/doc/$(package)
+ $(INSTALL_SCRIPT) debian/postinst debian/tmp/DEBIAN/
+ $(INSTALL_SCRIPT) debian/postrm debian/tmp/DEBIAN/
+
+ cd debian/tmp && find * -type f ! -regex '^DEBIAN/.*' -print0 | LC_ALL=C sort -z | xargs -r0 md5sum > DEBIAN/md5sums
+
+ find debian/tmp ! -type l -print0 | xargs -0r chmod go=rX,u+rw,a-s
+
+ dpkg-shlibdeps debian/tmp/bin/run-parts \
+ debian/tmp/bin/tempfile \
+ debian/tmp/usr/bin/ischroot
+ dpkg-gencontrol -isp
+ find debian/tmp -depth -newermt '$(BUILD_DATE)' -print0 | \
+ xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
+ dpkg-deb --root-owner-group --build debian/tmp ..
+
+define checkdir
+ test -f run-parts.c && test -f debian/rules
+endef
+
+binary: binary-indep binary-arch
+
+prebuild:
+ autoreconf -fi
+ $(RM) -rf autom4te.cache
+
+ cd po4a && po4a --no-backups po4a.conf
+
+
+.PHONY: build build-indep binary binary-arch binary-indep clean prebuild
+
+# Local Variables:
+# mode:Makefile
+# End: