File: rules

package info (click to toggle)
libjpeg6b 6b-5
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,824 kB
  • ctags: 2,609
  • sloc: ansic: 20,774; sh: 9,588; asm: 284; makefile: 50
file content (70 lines) | stat: -rwxr-xr-x 1,897 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
#!/usr/bin/make -f
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.

package=libjpeg

export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

DH_COMPAT=1
#export DH_VERBOSE=1

build: build-stamp
build-stamp:
	dh_testdir
	CFLAGS="-D_REENTRANT -O2 -Wall" ./configure --prefix=/usr --mandir=usr/share/man \
	 --enable-static --enable-shared --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
	sed < libtool > libtool-2 \
	-e 's/^hardcode_libdir_flag_spec.*$$/hardcode_libdir_flag_spec=" -D__LIBTOOL_IS_A_FOOL__ "/' \
	-e '/^archive_cmds="/s/"$$/ \\$$deplibs"/'
	mv libtool-2 libtool
	chmod 755 libtool
	make

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	-rm -f build-stamp
	-make clean
	-rm -f libtool Makefile jconfig.h
	dh_clean

binary-indep: 

binary-arch: build
	dh_testdir 
	dh_testroot 
	dh_clean -k
	dh_installdirs 
	$(MAKE) install prefix=`pwd`/debian/tmp/usr
	# separate out lib package
	dh_movefiles
	# Install tests
	install -m644 debian/libjpeg-progs.test \
	    debian/libjpeg-progs/usr/share/doc/libjpeg-progs/tests/test.sh
	install testimg.uu testimg.jpg testimg.ppm testimgp.jpg testorig.jpg \
	    testprog.jpg debian/libjpeg-progs/usr/share/doc/libjpeg-progs/tests
	# Remove empty dirs
	rmdir debian/tmp/usr/share/man/man1 debian/tmp/usr/share/man
	rmdir debian/tmp/usr/bin debian/tmp/usr/include debian/tmp/usr/share
	# Finish it off with debhelper
	dh_installdocs README
	dh_installexamples 
#	dh_installmanpages 
	dh_installchangelogs change.log
	dh_strip 
	dh_compress 
	dh_fixperms 
	dh_installdeb 
	dh_shlibdeps -l`pwd`/debian/tmp/usr/lib 
	dh_gencontrol 
#	dh_makeshlibs
	dh_md5sums 
	dh_builddeb 

binary:		binary-indep binary-arch

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