#!/usr/bin/make -f testdir = test -f src/lrz.c && test -f debian/rules export DEB_CFLAGS_MAINT_APPEND = -std=gnu17 include /usr/share/dpkg/architecture.mk ifeq ($(origin CC),default) CC = $(DEB_HOST_GNU_TYPE)-gcc endif export CC export AUTOHEADER=true CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS) CFLAGS = $(shell dpkg-buildflags --get CFLAGS) LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS) BUILD_DATE=$(shell dpkg-parsechangelog --show-field Date) export CPPFLAGS export CFLAGS export LDFLAGS build: build-arch build-indep build-arch: build-stamp build-indep: build-stamp build-stamp: $(testdir) touch config.rpath dh_autoreconf dh_auto_configure -- --disable-nls --disable-rpath --prefix=/usr --mandir='$${prefix}/share/man' --program-transform-name=s/l// $(MAKE) touch $@ clean: $(testdir) # Neutralise the autotools while cleaning. The build-time dh_autoreconf # regenerates Makefile.in with automake's maintainer-mode rebuild rules. On a # second build "make clean" would otherwise see Makefile.am newer than the # leftover Makefile.in and re-run automake against the pre-modern configure.in, # which automake >= 1.16 rejects. Forcing the tools to ":" turns those rebuild # rules into harmless no-ops; the assignments propagate to the sub-makes. [ ! -f Makefile ] || $(MAKE) clean ACLOCAL=: AUTOCONF=: AUTOMAKE=: AUTOHEADER=: dh_autoreconf_clean dh_clean rm -rf debian/tmp rm -f build-stamp po/lrzsz.pot po/*.gmo debian/substvars # Remove the files produced by configure/config.status. "make clean" only # deletes objects and binaries, leaving these behind; on a rebuild they would # count as unexpected changes to the 3.0 (quilt) upstream tree and make # dpkg-source -b abort. They are all generated from .in templates shipped in # the orig tarball, so removing them restores the pristine (patched) source. rm -f Makefile config.h config.log config.status stamp-h stamp-h1 \ Specfile systype src/lrzszbug \ intl/Makefile lib/Makefile man/Makefile src/Makefile \ testsuite/Makefile po/Makefile po/Makefile.in binary: binary-arch binary-indep binary-arch: build $(testdir) rm -rf debian/tmp $(MAKE) prefix=$(CURDIR)/debian/tmp/usr install ifeq "$(findstring nostrip,$(DEB_BUILD_OPTIONS))" "" $(DEB_HOST_GNU_TYPE)-strip -R .comment -R .note debian/tmp/usr/bin/* endif install -d -m 0755 debian/tmp/usr/share/doc/lrzsz install -p -m 0644 NEWS README README.cvs README.isdn4linux TODO debian/copyright debian/tmp/usr/share/doc/lrzsz install -p -m 0644 -D ChangeLog debian/tmp/usr/share/doc/lrzsz/changelog install -p -m 0644 -D debian/changelog debian/tmp/usr/share/doc/lrzsz/changelog.Debian find debian/tmp/usr/share/man -type f -print0 | xargs -0 gzip -9n find debian/tmp/usr/share/doc -type f ! -name copyright ! -name '*.html' \ \( -name 'changelog*' -o -size +8 \) -print0 | xargs -0 gzip -9n ln -s rz.1.gz debian/tmp/usr/share/man/man1/rb.1.gz ln -s rz.1.gz debian/tmp/usr/share/man/man1/rx.1.gz ln -s sz.1.gz debian/tmp/usr/share/man/man1/sb.1.gz ln -s sz.1.gz debian/tmp/usr/share/man/man1/sx.1.gz install -d -m 0755 debian/tmp/DEBIAN install -p -m 0644 debian/control debian/tmp/DEBIAN cd debian/tmp && find usr -type f -print0 | LC_ALL=C sort -z | xargs -0 md5sum > DEBIAN/md5sums chmod -R go=u-w debian/tmp dpkg-shlibdeps debian/tmp/usr/bin/* dpkg-gencontrol -plrzsz find debian/tmp -depth -newermt '$(BUILD_DATE)' -print0 | xargs -0r touch --no-dereference --date='$(BUILD_DATE)' dpkg-deb --root-owner-group --build debian/tmp .. binary-indep: .PHONY: clean build build-arch build-indep binary binary-arch binary-indep