1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148
|
#!/usr/bin/make -f
# Debian rules file for gzip, requires the debhelper package.
# Crafted by Bdale Garbee, bdale@gag.com, 5 November 2000
# Cleanup by Thorsten Glaser, tg@debian.org, 20 June 2012
# based on the rules file of the jupp package
# Comment this to turn off debhelper verbose mode.
export DH_VERBOSE=1
shellescape='$(subst ','\'',$(1))'
shellexport=$(1)=$(call shellescape,${$(1)})
include /usr/share/dpkg/architecture.mk
# Automatic ${CC} selection for cross-compiles
# is ${CC} defined anywhere (other than implicit rules?)
ifneq (,$(findstring $(origin CC),default undefined))
# no - then default to gcc (or cross-gcc)
ifneq (${DEB_BUILD_ARCH},${DEB_HOST_ARCH})
CC= ${DEB_HOST_GNU_TYPE}-gcc
else
CC= gcc
endif
endif
export DEFS=NO_ASM # Avoid TEXTRELs on i386
DEB_CFLAGS_MAINT_APPEND := -Wall
ifeq ($(buildarch), amd64)
DEB_CPPFLAGS_MAINT_APPEND := -DUNALIGNED_OK
endif
# Automatic dpkg-buildflags selection, backport-friendly
# maybe turn this on later
#DEB_BUILD_MAINT_OPTIONS=hardening=+all
include /usr/share/dpkg/buildflags.mk
# maybe turn this on later
#ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
#NUMJOBS= $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
#MAKEFLAGS+= -j${NUMJOBS}
#endif
# whitespace-safe path to source directory
_topdir=$(call shellescape,$(shell pwd))
CONFIGURE_ARGS= --prefix=/usr \
--bindir=/usr/bin \
--infodir=/usr/share/info \
--mandir=/usr/share/man \
--disable-silent-rules
ifneq (${DEB_BUILD_ARCH},${DEB_HOST_ARCH})
CONFIGURE_ARGS+= --host=${DEB_HOST_GNU_TYPE} \
--build=${DEB_BUILD_GNU_TYPE}
endif
reconf-stamp:
mkdir -p debian/backup/
cp Makefile.in debian/backup/
cp aclocal.m4 debian/backup/
cp build-aux/config.sub debian/backup/
cp build-aux/config.guess debian/backup/
cp configure debian/backup/
cp doc/Makefile.in debian/backup/doc-Makefile.in
cp doc/gzip.info debian/backup/
cp doc/stamp-vti debian/backup/
cp doc/version.texi debian/backup/
cp lib/Makefile.in debian/backup/lib-Makefile.in
cp tests/Makefile.in debian/backup/tests-Makefile.in
cp -f /usr/share/misc/config.sub build-aux/config.sub
cp -f /usr/share/misc/config.guess build-aux/config.guess
autoreconf -v
:>$@
configure: configure-stamp
configure-stamp: reconf-stamp
dh_testdir
mkdir -p builddir
cd builddir && env \
$(foreach i,CC CFLAGS CPPFLAGS LDFLAGS,$(call shellexport,$i)) \
CONFIG_SHELL=/bin/sh GREP=grep ../configure ${CONFIGURE_ARGS}
:>$@
build: build-stamp
build-arch: build-stamp
build-stamp: configure-stamp
dh_testdir
${MAKE} -C builddir
ifeq (,$(filter nocheck,${DEB_BUILD_OPTIONS}))
ifeq (${DEB_BUILD_ARCH},${DEB_HOST_ARCH})
${MAKE} -C builddir check
endif
endif
:>$@
build-indep:
clean:
dh_testdir
dh_testroot
mv debian/backup/Makefile.in Makefile.in || true
mv debian/backup/aclocal.m4 aclocal.m4 || true
mv debian/backup/config.sub build-aux/config.sub || true
mv debian/backup/config.guess build-aux/config.guess || true
mv debian/backup/configure configure || true
mv debian/backup/doc-Makefile.in doc/Makefile.in || true
mv debian/backup/gzip.info doc/gzip.info || true
mv debian/backup/stamp-vti doc/stamp-vti || true
mv debian/backup/version.texi doc/version.texi || true
mv debian/backup/lib-Makefile.in lib/Makefile.in || true
mv debian/backup/tests-Makefile.in tests/Makefile.in || true
dh_clean
binary: binary-arch
binary-arch: build-stamp
dh_testdir
dh_testroot
dh_prep
dh_installdirs
${MAKE} -C builddir install DESTDIR=${_topdir}/debian/gzip
dh_testdir -a
dh_testroot -a
dh_installdocs -a README* TODO NEWS
dh_installman *.1
dh_installinfo -a doc/gzip.info
dh_installchangelogs -a ChangeLog
dh_link -a
dh_lintian -a
dh_strip -a
dh_compress -a
rm -f ${_topdir}/debian/gzip/usr/share/info/dir.gz
dh_fixperms -a
dh_makeshlibs -a
dh_installdeb -a
dh_shlibdeps -a
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
binary-indep:
.PHONY: binary binary-arch binary-indep build build-arch build-indep clean
.PHONY: configure
|