]> git.cworth.org Git - gzip/blob - debian/rules
Imported Debian patch 1.3.12-3
[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 --bindir=/bin \
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         install -o root -g root -m 0644 debian/gzip.lintian \
46                 debian/gzip/usr/share/lintian/overrides/gzip
47
48 binary-indep:   build install
49
50 binary-arch:    build install
51         dh_testdir
52         dh_testroot
53         dh_installdocs README* TODO
54         dh_installmanpages
55         dh_installinfo doc/gzip.info
56         dh_installchangelogs ChangeLog
57         dh_link
58         dh_strip
59         dh_compress
60         ln -s gunzip.1.gz debian/gzip/usr/share/man/man1/uncompress.1.gz
61         ln -s zgrep.1.gz debian/gzip/usr/share/man/man1/zegrep.1.gz
62         ln -s zgrep.1.gz debian/gzip/usr/share/man/man1/zfgrep.1.gz
63         dh_fixperms
64         # You may want to make some executables suid here.
65         dh_makeshlibs
66         dh_installdeb
67         dh_shlibdeps
68         dh_gencontrol
69         dh_md5sums
70         dh_builddeb
71
72 binary: binary-indep binary-arch
73 .PHONY: build clean binary-indep binary-arch binary install configure
74