X-Git-Url: https://git.distorted.org.uk/~mdw/disorder/blobdiff_plain/66ec39ed3af82963f63f16942149b9ba79aebe29..07184dd3deba9009e4c4391ef711a62aa57eb536:/debian/autorules.m4 diff --git a/debian/autorules.m4 b/debian/autorules.m4 index d9a4a0c..6b98a5c 100644 --- a/debian/autorules.m4 +++ b/debian/autorules.m4 @@ -23,6 +23,23 @@ INSTALL=install CONFIGURE=--prefix=/usr +INSTALL_DATA=$(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 + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) +CFLAGS=-O0 -g +else +CFLAGS=-O2 -g +endif +export CFLAGS +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) +INSTALL_PROGRAM += -s +endif +export INSTALL_DATA +export INSTALL_SCRIPT +export INSTALL_PROGRAM + m4_divert(-1)m4_dnl m4_changequote([,]) @@ -58,6 +75,12 @@ pkg-$1: [build] cp debian/changelog \ debian/$1/usr/share/doc/$1/changelog.Debian gzip -9 debian/$1/usr/share/doc/$1/changelog.Debian + @for f in preinst postinst prerm postrm conffiles templates config; do\ + if test -e debian/$$f.$1; then\ + echo cp debian/$$f.$1 debian/$1/DEBIAN/$$f; \ + cp debian/$$f.$1 debian/$1/DEBIAN/$$f; \ + fi;\ + done $2 dpkg-gencontrol -isp -p$1 -Pdebian/$1 -Tdebian/substvars.$1 chown -R root:root debian/$1 chmod -R g-ws debian/$1