File: rules

package info (click to toggle)
gzip 1.3.5-15%2Betch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 1,488 kB
  • ctags: 1,056
  • sloc: ansic: 7,067; sh: 869; asm: 179; makefile: 136; perl: 11
file content (76 lines) | stat: -rwxr-xr-x 1,867 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/usr/bin/make -f
#	Debian rules file for gzip, requires the debhelper package.
#	Crafted by Bdale Garbee, bdale@gag.com, 5 November 2000

# Comment this to turn off debhelper verbose mode.
export DH_VERBOSE=1

DEB_BUILD_GNU_TYPE = $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_GNU_TYPE = $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
CONFARGS = --host=$(DEB_HOST_GNU_TYPE)
endif

CFLAGS="-g -O2 -Wall" 

configure: configure-stamp
configure-stamp:
	dh_testdir
	CFLAGS=$(CFLAGS) ./configure \
		--prefix=/usr \
		--infodir=`pwd`/debian/gzip/usr/share/info \
		--mandir=`pwd`/debian/gzip/usr/share/man $(CONFARGS)
	touch configure-stamp

build: configure-stamp build-stamp
build-stamp:
	dh_testdir
	$(MAKE)
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	-rm -f build-stamp configure-stamp
	make distclean || exit 0
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	make install prefix=debian/gzip/usr bindir=debian/gzip/bin \
		 scriptdir=debian/gzip/usr/bin
	ln debian/gzip/bin/gzip debian/gzip/bin/uncompress
	install -o root -g root -m 0644 debian/gzip.lintian \
		debian/gzip/usr/share/lintian/overrides/gzip

binary-indep:	build install

binary-arch:	build install
	dh_testdir
	dh_testroot
	dh_installdocs README* TODO
	dh_installmanpages
	dh_installinfo gzip.info
	dh_installchangelogs
	dh_link
	dh_strip
	dh_compress
	ln -s gunzip.1.gz debian/gzip/usr/share/man/man1/uncompress.1.gz
	ln -s zgrep.1.gz debian/gzip/usr/share/man/man1/zegrep.1.gz
	ln -s zgrep.1.gz debian/gzip/usr/share/man/man1/zfgrep.1.gz
	dh_fixperms
	# You may want to make some executables suid here.
	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure