2 # Debian rules file for gzip, requires the debhelper package.
3 # Crafted by Bdale Garbee, bdale@gag.com, 5 November 2000
5 # Comment this to turn off debhelper verbose mode.
8 DEB_BUILD_GNU_TYPE = $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
9 DEB_HOST_GNU_TYPE = $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
10 ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
11 CONFARGS = --host=$(DEB_HOST_GNU_TYPE)
14 buildarch := $(shell dpkg-architecture -qDEB_BUILD_ARCH)
15 ifeq ($(buildarch),amd64)
16 CFLAGS="-g -O2 -Wall -DUNALIGNED_OK"
21 configure: configure-stamp
24 CFLAGS=$(CFLAGS) ./configure \
25 --prefix=/usr --bindir=/bin \
26 --infodir=`pwd`/debian/gzip/usr/share/info \
27 --mandir=`pwd`/debian/gzip/usr/share/man $(CONFARGS)
30 build: configure-stamp build-stamp
39 -rm -f build-stamp configure-stamp
40 make distclean || exit 0
49 make install prefix=debian/gzip/usr bindir=debian/gzip/bin
50 install -o root -g root -m 0644 debian/gzip.lintian \
51 debian/gzip/usr/share/lintian/overrides/gzip
53 binary-indep: build install
55 binary-arch: build install
58 dh_installdocs README* TODO
60 dh_installinfo doc/gzip.info
61 dh_installchangelogs ChangeLog
65 ln -s gunzip.1.gz debian/gzip/usr/share/man/man1/uncompress.1.gz
66 ln -s zgrep.1.gz debian/gzip/usr/share/man/man1/zegrep.1.gz
67 ln -s zgrep.1.gz debian/gzip/usr/share/man/man1/zfgrep.1.gz
69 # You may want to make some executables suid here.
77 binary: binary-indep binary-arch
78 .PHONY: build clean binary-indep binary-arch binary install configure