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
|
testdir = test -f src/lrz.c && test -f debian/rules
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)
[ ! -f Makefile ] || $(MAKE) clean
dh_autoreconf_clean
dh_clean
rm -rf debian/tmp
rm -f build-stamp po/lrzsz.pot po/*.gmo debian/substvars
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
|