File: rules

package info (click to toggle)
netpbm-free 2:10.0-15.3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 9,952 kB
  • ctags: 8,098
  • sloc: ansic: 101,867; perl: 1,321; sh: 827; makefile: 755; lex: 206; csh: 13
file content (105 lines) | stat: -rwxr-xr-x 2,791 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
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
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
# This version is for a hypothetical package that builds an
# architecture-dependant package, as well as an architecture-independant
# package.

# Uncomment this to turn on verbose mode. 
#export DH_VERBOSE=1

DEBIAN_DIR = $(shell pwd)/debian

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

build: build-stamp
build-stamp:
	dh_testdir
	ln -sf shhopt.h shhopt/netpbm-shhopt.h
	dh_quilt_patch
	cp -af Makefile.config.in Makefile.config
	make depend

	make build

	touch build-stamp


clean:
	dh_testdir
	dh_testroot
	touch Makefile.config .depend
	rm -f build-stamp
	make clean
	dh_clean
	rm -f shhopt/netpbm-shhopt.h
	rm -f Makefile.config .depend
	rm -f debian/*.debhelper.log
	dh_quilt_unpatch

# Build architecture-independent files here.
binary-indep: build

# Build architecture-dependent files here.
binary-arch: build
#	dh_testversion
	dh_testdir
	dh_testroot
	dh_prep

# install netpbm
	make PREFIX=$(DEBIAN_DIR)/netpbm/usr \
		install.bin
	make PREFIX=$(DEBIAN_DIR)/netpbm/usr/share \
		install.man.bin install.man.general
	dh_installdirs -pnetpbm usr/share/doc/netpbm
	install -m 644 HISTORY $(DEBIAN_DIR)/netpbm/usr/share/doc/netpbm/changelog
	install -m 755 debian/imagetops $(DEBIAN_DIR)/netpbm/usr/bin

# install libnetpbm10
	make PREFIX=$(DEBIAN_DIR)/libnetpbm10/usr \
		install.lib.shared.lib

# install libnetpbm10-dev
	make PREFIX=$(DEBIAN_DIR)/libnetpbm10-dev/usr/ \
		install.lib.hdr install.lib.static install.lib.shared.devel
	make PREFIX=$(DEBIAN_DIR)/libnetpbm10-dev/usr/share/ \
		install.man.lib

# install libnetpbm9
	make PREFIX=$(DEBIAN_DIR)/libnetpbm9/usr \
		install.lib.old-shared.lib

# install libnetpbm9-dev
	make PREFIX=$(DEBIAN_DIR)/libnetpbm9-dev/usr/ \
		install.lib.hdr install.lib.old-static install.lib.old-shared.devel
	make PREFIX=$(DEBIAN_DIR)/libnetpbm9-dev/usr/share/ \
		install.man.old-lib

	dh_makeshlibs
	dh_installdocs
	dh_installexamples
	dh_installmenu
	dh_installcron
	dh_installman
	dh_installchangelogs
	dh_strip
	dh_compress usr/share/doc/netpbm/COPYRIGHT.PATENT
	dh_fixperms
	dh_installdeb
	dh_shlibdeps -L libnetpbm10 -l debian/libnetpbm10/usr/lib -Nlibnetpbm9 -Nlibnetpbm9-dev
	dh_shlibdeps -L libnetpbm9 -l debian/libnetpbm9/usr/lib -plibnetpbm9 -plibnetpbm9-dev
	
	dh_gencontrol
	cat debian/netpbm/DEBIAN/control | sed 's/libnetpbm10, //g' > debian/netpbm/DEBIAN/control.1
	mv -f debian/netpbm/DEBIAN/control.1 debian/netpbm/DEBIAN/control

	dh_md5sums
	dh_fixperms
	dh_builddeb

source diff:                                                                  
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

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