File: rules

package info (click to toggle)
gzip 1.3.12-9%2Bsqueeze1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 2,156 kB
  • ctags: 1,389
  • sloc: ansic: 8,868; sh: 4,609; makefile: 186; asm: 179; perl: 11
file content (111 lines) | stat: -rwxr-xr-x 2,768 bytes parent folder | download
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#!/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

buildarch := $(shell dpkg-architecture -qDEB_BUILD_ARCH)
ifeq ($(buildarch),amd64)
CFLAGS=-g -O2 -Wall -DUNALIGNED_OK
else
CFLAGS=-g -O2 -Wall
endif

configure: configure-stamp
configure-stamp:
	dh_testdir
	mkdir -p build
	cd build && ../configure \
		--prefix=/usr --bindir=/bin \
		--infodir=`pwd`/debian/gzip/usr/share/info \
		--mandir=`pwd`/debian/gzip/usr/share/man $(CONFARGS)
	touch configure-stamp

configure-win32: configure-win32-stamp
configure-win32-stamp:
	dh_testdir
	mkdir -p build-win32
	cd build-win32 && ../configure --host=i586-mingw32msvc
	touch configure-win32-stamp

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

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

clean:
	dh_testdir
	dh_testroot
	-rm -f build-stamp build-win32-stamp configure-stamp configure-win32-stamp
	-rm -rf build build-win32
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs
	$(MAKE) -C build install prefix=`pwd`/debian/gzip/usr bindir=`pwd`/debian/gzip/bin 

install-win32: build-win32
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs
	i586-mingw32msvc-strip build-win32/gzip.exe
	install -m 0755 build-win32/gzip.exe debian/gzip-win32/usr/share/win32/

binary-indep:	build-win32 install-win32
	dh_testdir -i
	dh_testroot -i
	dh_installdocs -i README* TODO
	dh_installchangelogs -i ChangeLog
	dh_lintian -i
	dh_compress -i
	dh_fixperms -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

binary-arch:	build install
	dh_testdir -s
	dh_testroot -s
	dh_installdocs -s README* TODO
	dh_installman *.1
	dh_installinfo -s doc/gzip.info
	dh_installchangelogs -s ChangeLog
	dh_link -s
	dh_lintian -s
	dh_strip -s
	dh_compress -s
	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 -s
	# You may want to make some executables suid here.
	dh_makeshlibs -s
	dh_installdeb -s
	dh_shlibdeps -s
	dh_gencontrol -s
	dh_md5sums -s
	dh_builddeb -s

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