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 ifeq ($(shell dpkg-architecture -qDEB_HOST_ARCH),amd64)
15 CFLAGS=-g -O2 -Wall -DUNALIGNED_OK
21 cp -f /usr/share/misc/config.sub build-aux/config.sub
22 cp -f /usr/share/misc/config.guess build-aux/config.guess
26 configure: configure-stamp
27 configure-stamp: reconf-stamp
30 cd build && ../configure \
31 --prefix=/usr --bindir=/bin \
32 --infodir=`pwd`/debian/gzip/usr/share/info \
33 --mandir=`pwd`/debian/gzip/usr/share/man $(CONFARGS)
36 configure-indep: configure-indep-stamp
37 configure-indep-stamp: reconf-stamp
40 cd build-indep && ../configure --host=i686-w64-mingw32
43 build: build-arch build-indep
45 build-arch: build-stamp
46 build-stamp: configure-stamp
49 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
50 ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
51 $(MAKE) -C build check
56 build-indep: build-indep-stamp
57 build-indep-stamp: configure-indep-stamp
59 $(MAKE) -C build-indep
65 -rm -f build-stamp build-indep-stamp configure-stamp configure-indep-stamp reconf-stamp
66 -rm -rf build build-indep
74 $(MAKE) -C build install prefix=`pwd`/debian/gzip/usr bindir=`pwd`/debian/gzip/bin
76 install-indep: build-indep
81 i686-w64-mingw32-strip build-indep/gzip.exe
82 install -m 0755 build-indep/gzip.exe debian/gzip-win32/usr/share/win32/
84 binary-indep: build-indep install-indep
87 dh_installdocs -i README* TODO
88 dh_installchangelogs -i ChangeLog
97 binary-arch: build install
100 dh_installdocs -s README* TODO
102 dh_installinfo -s doc/gzip.info
103 dh_installchangelogs -s ChangeLog
108 ln -s gunzip.1.gz debian/gzip/usr/share/man/man1/uncompress.1.gz
109 ln -s zgrep.1.gz debian/gzip/usr/share/man/man1/zegrep.1.gz
110 ln -s zgrep.1.gz debian/gzip/usr/share/man/man1/zfgrep.1.gz
112 # You may want to make some executables suid here.
120 binary: binary-indep binary-arch
121 .PHONY: build clean binary-indep binary-arch binary install configure
122 .PHONY: build-indep install-indep configure-indep