]> git.cworth.org Git - gzip/blob - debian/rules
8a237ccdcbd2d82c4304abb5f3371b4343bee172
[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 # This is the debhelper compatibility version to use.
9 export DH_COMPAT=3
10
11 DEB_BUILD_GNU_TYPE = $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
12 DEB_HOST_GNU_TYPE = $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
13 ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
14 CONFARGS = --host=$(DEB_HOST_GNU_TYPE)
15 endif
16
17 CFLAGS="-g -O2 -Wall" 
18
19 configure: configure-stamp
20 configure-stamp:
21         dh_testdir
22         CFLAGS=$(CFLAGS) ./configure \
23                 --prefix=/usr \
24                 --infodir=`pwd`/debian/gzip/usr/share/info \
25                 --mandir=`pwd`/debian/gzip/usr/share/man $(CONFARGS)
26         touch configure-stamp
27
28 build: configure-stamp build-stamp
29 build-stamp:
30         dh_testdir
31         $(MAKE)
32         touch build-stamp
33
34 clean:
35         dh_testdir
36         dh_testroot
37         -rm -f build-stamp configure-stamp
38         make distclean || exit 0
39         dh_clean
40
41 install: build
42         dh_testdir
43         dh_testroot
44         dh_clean -k
45         dh_installdirs
46
47         make install prefix=debian/gzip/usr bindir=debian/gzip/bin \
48                  scriptdir=debian/gzip/usr/bin
49         ln debian/gzip/bin/gzip debian/gzip/bin/uncompress
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 gzip.info
61         dh_installchangelogs
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