]> git.cworth.org Git - gzip/blob - debian/rules
Imported Debian patch 1.3.9-1
[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 CFLAGS="-g -O2 -Wall" 
15
16 configure: configure-stamp
17 configure-stamp:
18         dh_testdir
19         CFLAGS=$(CFLAGS) ./configure \
20                 --prefix=/usr \
21                 --infodir=`pwd`/debian/gzip/usr/share/info \
22                 --mandir=`pwd`/debian/gzip/usr/share/man $(CONFARGS)
23         touch configure-stamp
24
25 build: configure-stamp build-stamp
26 build-stamp:
27         dh_testdir
28         $(MAKE)
29         touch build-stamp
30
31 clean:
32         dh_testdir
33         dh_testroot
34         -rm -f build-stamp configure-stamp
35         make distclean || exit 0
36         dh_clean
37
38 install: build
39         dh_testdir
40         dh_testroot
41         dh_clean -k
42         dh_installdirs
43
44         make install prefix=debian/gzip/usr bindir=debian/gzip/bin \
45                  scriptdir=debian/gzip/usr/bin
46         ln debian/gzip/bin/gzip debian/gzip/bin/uncompress
47         install -o root -g root -m 0644 debian/gzip.lintian \
48                 debian/gzip/usr/share/lintian/overrides/gzip
49
50 binary-indep:   build install
51
52 binary-arch:    build install
53         dh_testdir
54         dh_testroot
55         dh_installdocs README* TODO
56         dh_installmanpages
57         dh_installinfo doc/gzip.info
58         dh_installchangelogs
59         dh_link
60         dh_strip
61         dh_compress
62         ln -s gunzip.1.gz debian/gzip/usr/share/man/man1/uncompress.1.gz
63         ln -s zgrep.1.gz debian/gzip/usr/share/man/man1/zegrep.1.gz
64         ln -s zgrep.1.gz debian/gzip/usr/share/man/man1/zfgrep.1.gz
65         dh_fixperms
66         # You may want to make some executables suid here.
67         dh_makeshlibs
68         dh_installdeb
69         dh_shlibdeps
70         dh_gencontrol
71         dh_md5sums
72         dh_builddeb
73
74 binary: binary-indep binary-arch
75 .PHONY: build clean binary-indep binary-arch binary install configure
76