File: rules

package info (click to toggle)
libtiff3 3.4beta037-4
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 2,732 kB
  • ctags: 3,274
  • sloc: ansic: 32,425; sh: 2,610; makefile: 1,515
file content (129 lines) | stat: -rwxr-xr-x 4,636 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#! /usr/bin/make -f

package = libtiff3
sosuffix = 3.4.037
ARCH = $(shell dpkg --print-gnu-build-architecture)
CCLIBC1  = $(ARCH)-linuxlibc1-gcc
STRIP = strip

build:
	$(checkdir)
	./configure --noninteractive \
	  --with-DIR_BIN=/usr/bin \
	  --with-DIR_LIB=/usr/lib \
	  --with-DIR_INC=/usr/include \
	  --with-DIR_MAN=/usr/man \
	  --with-DIR_HTML=/usr/doc/libtiff3/html \
	  --with-JPEG --with-ZIP
	$(MAKE)
	test -d libtiff/libc5 || mkdir libtiff/libc5
	$(MAKE) -C libtiff/libc5 -f ../Makefile SRCDIR=.. CC=$(CCLIBC1)
	touch build

clean:
	$(checkdir)
	rm -f build
	-$(MAKE) distclean
	find . -name '*~' -print0 | xargs -0r rm
	rm -rf debian/tmp* debian/files* debian/substvars

binary-indep: checkroot build

binary-arch: b-l b-ld b-lg b-ldg b-t

b-l: checkroot build
	$(checkdir)
	rm -rf debian/tmp-l
	install -d debian/tmp-l/{DEBIAN,usr/{lib/libc5-compat,doc/libtiff3}}
	install -m 644 libtiff/libc5/libtiff.so.$(sosuffix) debian/tmp-l/usr/lib/libc5-compat/
	ln -s libtiff.so.$(sosuffix) debian/tmp-l/usr/lib/libc5-compat/libtiff.so.3
	$(STRIP) --strip-unneeded debian/tmp-l/usr/lib/libc5-compat/libtiff.so.$(sosuffix)
	install -m 644 debian/copyright debian/tmp-l/usr/doc/libtiff3/
	install -m 644 debian/changelog debian/tmp-l/usr/doc/libtiff3/changelog.Debian
	gzip -9f debian/tmp-l/usr/doc/libtiff3/changelog.Debian
	install debian/lib.postinst debian/tmp-l/DEBIAN/postinst
	dpkg-shlibdeps libtiff/libc5/libtiff.so.$(sosuffix)
	install -m644 debian/libtiff3.shlibs debian/tmp-l/DEBIAN/shlibs
	dpkg-gencontrol -plibtiff3 -Pdebian/tmp-l
	dpkg --build debian/tmp-l ..

b-ld: checkroot build
	$(checkdir)
	rm -rf debian/tmp-ld
	install -d debian/tmp-ld/{DEBIAN,usr/{$(ARCH)-linuxlibc1/{include,lib},doc}}
	install -s -m 644 libtiff/libc5/static/libtiff.a debian/tmp-ld/usr/$(ARCH)-linuxlibc1/lib/
	ln -s ../../lib/libc5-compat/libtiff.so.$(sosuffix) debian/tmp-ld/usr/$(ARCH)-linuxlibc1/lib/libtiff.so
	install -m 644 libtiff/{tiff.h,tiffio.h} debian/tmp-ld/usr/$(ARCH)-linuxlibc1/include/
	ln -s libtiff3 debian/tmp-ld/usr/doc/libtiff3-altdev
	$(genversion)
	dpkg-gencontrol -plibtiff3-altdev -Pdebian/tmp-ld
	dpkg --build debian/tmp-ld ..

b-lg: checkroot build
	$(checkdir)
	rm -rf debian/tmp-lg
	install -d debian/tmp-lg/{DEBIAN,usr/{lib,doc/libtiff3g}}
	install -m 644 libtiff/libtiff.so.$(sosuffix) debian/tmp-lg/usr/lib/
	ln -s libtiff.so.$(sosuffix) debian/tmp-lg/usr/lib/libtiff.so.3
	$(STRIP) --strip-unneeded debian/tmp-lg/usr/lib/libtiff.so.$(sosuffix)
	install -m 644 debian/copyright debian/tmp-lg/usr/doc/libtiff3g/
	install -m 644 debian/changelog debian/tmp-lg/usr/doc/libtiff3g/changelog.Debian
	gzip -9f debian/tmp-lg/usr/doc/libtiff3g/changelog.Debian
	install debian/lib.postinst debian/tmp-lg/DEBIAN/postinst
	dpkg-shlibdeps libtiff/libtiff.so.$(sosuffix)
	install -m644 debian/libtiff3g.shlibs debian/tmp-lg/DEBIAN/shlibs
	dpkg-gencontrol -plibtiff3g -Pdebian/tmp-lg
	dpkg --build debian/tmp-lg ..

b-ldg: checkroot build
	$(checkdir)
	rm -rf debian/tmp-ldg
	install -d debian/tmp-ldg/{DEBIAN,usr/{include,lib,doc/libtiff3g/html/images,man/man3}}
	install -s -m 644 libtiff/static/libtiff.a debian/tmp-ldg/usr/lib/
	ln -s libtiff.so.$(sosuffix) debian/tmp-ldg/usr/lib/libtiff.so
	install -m 644 libtiff/{tiff.h,tiffio.h} debian/tmp-ldg/usr/include/
	ln -s libtiff3g debian/tmp-ldg/usr/doc/libtiff3g-dev
	install -m 644 man/lib/*.3t debian/tmp-ldg/usr/man/man3
	gzip -9f debian/tmp-ldg/usr/man/man3/*
	install -m 644 html/*.html debian/tmp-ldg/usr/doc/libtiff3g/html/
	install -m 644 html/images/* debian/tmp-ldg/usr/doc/libtiff3g/html/images/
	gzip -9f debian/tmp-ldg/usr/doc/libtiff3g/html/*.html
	$(genversion)
	dpkg-gencontrol -plibtiff3g-dev -Pdebian/tmp-ldg
	dpkg --build debian/tmp-ldg ..

b-t: checkroot build
	$(checkdir)
	rm -rf debian/tmp-t
	install -d debian/tmp-t/{DEBIAN,usr/{bin,man/man1,doc}}
	find tools -type f -perm -1 | xargs -i install -s '{}' debian/tmp-t/usr/bin/
	install -m 644 man/apps/*.1 debian/tmp-t/usr/man/man1
	gzip -9f debian/tmp-t/usr/man/man1/*
	ln -s libtiff3g debian/tmp-t/usr/doc/libtiff-tools
	dpkg-shlibdeps debian/tmp-t/usr/bin/*
	dpkg-gencontrol -plibtiff-tools -Pdebian/tmp-t
	dpkg --build debian/tmp-t ..

define genversion
	dpkg-parsechangelog | \
	awk '/^Version/{printf("libtiff3:Version=%s\n",$$2)}' >debian/substvars
endef

define checkdir
	test -f libtiff/tiff.h -a -f debian/rules
endef

binary:		binary-indep binary-arch

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

checkroot:
	$(checkdir)
	test root = "`whoami`"

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

# Local Variables:
# mode: makefile
# end: