]> git.cworth.org Git - gzip/blob - debian/rules
Imported Debian patch 1.3.12-4
[gzip] / debian / rules
1 #!/usr/bin/make -f
2 #       Debian rules file for gzip, requires the debhelper package.
3 #       Crafted by Bdale Garbee, bdale@gag.com, 5 November 2000
4
5 # Comment this to turn off debhelper verbose mode.
6 export DH_VERBOSE=1
7
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)
12 endif
13
14 buildarch := $(shell dpkg-architecture -qDEB_BUILD_ARCH)
15 ifeq ($(buildarch),amd64)
16 CFLAGS="-g -O2 -Wall -DUNALIGNED_OK"
17 else
18 CFLAGS="-g -O2 -Wall" 
19 endif
20
21 configure: configure-stamp
22 configure-stamp:
23         dh_testdir
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)
28         touch configure-stamp
29
30 build: configure-stamp build-stamp
31 build-stamp:
32         dh_testdir
33         $(MAKE)
34         touch build-stamp
35
36 clean:
37         dh_testdir
38         dh_testroot
39         -rm -f build-stamp configure-stamp
40         make distclean || exit 0
41         dh_clean
42
43 install: build
44         dh_testdir
45         dh_testroot
46         dh_clean -k
47         dh_installdirs
48
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
52
53 binary-indep:   build install
54
55 binary-arch:    build install
56         dh_testdir
57         dh_testroot
58         dh_installdocs README* TODO
59         dh_installmanpages
60         dh_installinfo doc/gzip.info
61         dh_installchangelogs ChangeLog
62         dh_link
63         dh_strip
64         dh_compress
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
68         dh_fixperms
69         # You may want to make some executables suid here.
70         dh_makeshlibs
71         dh_installdeb
72         dh_shlibdeps
73         dh_gencontrol
74         dh_md5sums
75         dh_builddeb
76
77 binary: binary-indep binary-arch
78 .PHONY: build clean binary-indep binary-arch binary install configure
79