File: rules

package info (click to toggle)
libgd 1.3-1.1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 660 kB
  • ctags: 310
  • sloc: ansic: 19,947; perl: 132; makefile: 122; sh: 6
file content (143 lines) | stat: -rwxr-xr-x 4,122 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.

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

version=$(shell expr `pwd` : '.*-\([0-9.]*\)')
version_major=$(shell expr `pwd` : '.*-\([0-9]*\).[0-9.]*')

build: build-libgd1g build-libgd1g-dev build-libgd1 build-libgd1-altdev build-libgd1g-tools

# Build shared libc6 library.
build-libgd1g:
	dh_testdir
	-mkdir libgd1g
	cd libgd1g ; \
		$(MAKE) -f ../Makefile VPATH=".." srcdir=".." \
		CFLAGS="-D_REENTRANT -O2 -fPIC -pipe" ; \
		gcc -shared -D_REENTRANT \
			-Wl,-soname,libgd.so.$(version_major) \
			-o libgd.so.$(version) `ls *.o` -lc; \
		ln -s libgd.so.$(version) libgd.so
	touch build-libgd1g

# Build static libc6 library.
build-libgd1g-dev:
	dh_testdir
	-mkdir libgd1g-dev
	cd libgd1g-dev ; \
		$(MAKE) -f ../Makefile VPATH=".." srcdir=".." \
			CFLAGS="-D_REENTRANT -O2 -pipe" LDFLAGS="-s" libgd.a
	touch build-libgd1g-dev

# Build shared libc5 compat library.
build-libgd1:
	dh_testdir
	-mkdir libgd1
	cd libgd1 ; \
		$(MAKE) -f ../Makefile VPATH=".." srcdir=".." \
		CC=`dpkg --print-gnu-build-architecture`-linuxlibc1-gcc \
		CFLAGS="-D_REENTRANT -O2 -fPIC -pipe" ; \
		`dpkg --print-gnu-build-architecture`-linuxlibc1-gcc \
			-shared -D_REENTRANT \
			-Wl,-soname,libgd.so.$(version_major) \
			-o libgd.so.$(version) `ls *.o` -lc
	touch build-libgd1

# Build static libc5 compat library.
build-libgd1-altdev:
	dh_testdir
	-mkdir libgd1-altdev
	cd libgd1-altdev ; \
		$(MAKE) -f ../Makefile VPATH=".." srcdir=".." \
		CFLAGS="-D_REENTRANT -O2 -pipe" LDFLAGS="-s" \
		CC=`dpkg --print-gnu-build-architecture`-linuxlibc1-gcc \
		libgd.a
	touch build-libgd1-altdev

# Build the GD utilities/demos
build-libgd1g-tools:
	dh_testdir
	-mkdir libgd1g-tools
	cd libgd1g-tools ; \
		$(MAKE) -f ../Makefile VPATH=".." srcdir=".." CFLAGS="-O2" \
		LIBS="-L../libgd1g/ -lgd -lm" \
		gddemo giftogd webgif
	touch build-libgd1g-tools

clean:
	dh_testdir
	dh_testroot
	rm -f build-libgd1g build-libgd1g-dev build-libgd1 \
		build-libgd1-altdev build-libgd1g-tools
	# Add here commands to clean up after the build process.
	rm -rf libgd1g libgd1g-dev libgd1 libgd1-altdev libgd1g-tools
	dh_clean 

# Build architecture-independent files here.
binary-indep: build
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build
	dh_testdir
	dh_testroot
	dh_clean
	dh_installdirs

	# libgd1g
	install -m644 libgd1g/libgd.so.1.3 debian/tmp/usr/lib/
	cd debian/tmp/usr/lib && ln -sf libgd.so.1.3 libgd.so.1

	# libgd1g-dev
	install -m644 libgd1g-dev/libgd.a debian/libgd1g-dev/usr/lib
	install -m644 gd.h gdfontg.h gdfontl.h gdfontmb.h gdfonts.h gdfontt.h \
		debian/libgd1g-dev/usr/include
	cd debian/libgd1g-dev/usr/lib && ln -sf libgd.so.1.3 libgd.so

	# libgd1g-tools
	install -m755 bdftogd debian/libgd1g-tools/usr/bin
	install -m755 libgd1g-tools/gddemo debian/libgd1g-tools/usr/bin
	install -m755 libgd1g-tools/giftogd debian/libgd1g-tools/usr/bin
	install -m755 libgd1g-tools/webgif debian/libgd1g-tools/usr/bin

	# libgd1
	install -m644 libgd1/libgd.so.1.3 \
		debian/libgd1/usr/lib/libc5-compat/
	cd debian/libgd1/usr/lib/libc5-compat && \
		ln -sf libgd.so.1.3 libgd.so.1

	# libgd1-altdev
	install -m644 libgd1-altdev/libgd.a \
		debian/libgd1-altdev/usr/i486-linuxlibc1/lib
	cd debian/libgd1-altdev/usr/i486-linuxlibc1/lib && \
		ln -sf ../../lib/libc5-compat/libgd.so.1.3 libgd.so

	dh_installdocs
	install -m644 readme.txt debian/tmp/usr/doc/libgd1g/README
	install -m644 index.html debian/tmp/usr/doc/libgd1g/
	dh_installexamples
	dh_installmenu
#	dh_installinit
#	dh_installcron
	dh_installmanpages
	dh_undocumented
	dh_installchangelogs
	dh_strip
	dh_compress
	dh_fixperms
	dh_suidregister
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_makeshlibs
	cp debian/shlibs.local debian/tmp/DEBIAN/shlibs
	dh_md5sums
	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