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
25 cd build && ../configure \
26 --prefix=/usr --bindir=/bin \
27 --infodir=`pwd`/debian/gzip/usr/share/info \
28 --mandir=`pwd`/debian/gzip/usr/share/man $(CONFARGS)
31 configure-win32: configure-win32-stamp
32 configure-win32-stamp:
35 cd build-win32 && ../configure --host=i586-mingw32msvc
36 touch configure-win32-stamp
39 build-stamp: configure-stamp
44 build-win32: build-win32-stamp
45 build-win32-stamp: configure-win32-stamp
47 $(MAKE) -C build-win32
48 touch build-win32-stamp
53 -rm -f build-stamp build-win32-stamp configure-stamp configure-win32-stamp
54 -rm -rf build build-win32
62 $(MAKE) -C build install prefix=`pwd`/debian/gzip/usr bindir=`pwd`/debian/gzip/bin
64 install-win32: build-win32
69 i586-mingw32msvc-strip build-win32/gzip.exe
70 install -m 0755 build-win32/gzip.exe debian/gzip-win32/usr/share/win32/
72 binary-indep: build-win32 install-win32
75 dh_installdocs -i README* TODO
76 dh_installchangelogs -i ChangeLog
85 binary-arch: build install
88 dh_installdocs -s README* TODO
90 dh_installinfo -s doc/gzip.info
91 dh_installchangelogs -s ChangeLog
96 ln -s gunzip.1.gz debian/gzip/usr/share/man/man1/uncompress.1.gz
97 ln -s zgrep.1.gz debian/gzip/usr/share/man/man1/zegrep.1.gz
98 ln -s zgrep.1.gz debian/gzip/usr/share/man/man1/zfgrep.1.gz
100 # You may want to make some executables suid here.
108 binary: binary-indep binary-arch
109 .PHONY: build clean binary-indep binary-arch binary install configure
110 .PHONY: build-win32 install-win32 configure-win32