File: rules

package info (click to toggle)
gphoto2 2.0final-4
  • links: PTS
  • area: main
  • in suites: woody
  • size: 8,572 kB
  • ctags: 5,902
  • sloc: ansic: 45,989; sh: 7,219; makefile: 1,059; xml: 474; yacc: 318
file content (91 lines) | stat: -rwxr-xr-x 2,647 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
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

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

# This is the debhelper compatability version to use.
export DH_COMPAT=3

configure: configure-stamp
configure-stamp:
	dh_testdir
	cat debian/canonS10.patch | patch -p1
	./configure --prefix=/usr --sysconfdir=/etc --with-html-dir=\$${prefix}/share/doc/gphoto2-dev/html --with-doc-dir=\$${prefix}/share/doc/gphoto2 --mandir=\$${prefix}/share/man --with-drivers=all --enable-docs --without-aalib
	touch configure-stamp

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

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp
	-$(MAKE) distclean
	-rm -rf `pwd`/debian/tmp `pwd`/debian/gphoto2-dev
	patch -R -t -p1 --dry-run < debian/canonS10.patch \
		| grep -c 'Unreversed patch detected' >/dev/null \
		|| patch -R -t -p1 < debian/canonS10.patch
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	export LIBRARY_PATH=`pwd`/debian/tmp/usr/lib; $(MAKE) install prefix=`pwd`/debian/tmp/usr

	#install -D -o root -g root -m 644 debian/lintian.overrides \
	#	debian/tmp/usr/share/lintian/overrides/gphoto2
	#install -D -o root -g root -m 644 debian/lintian.overrides \
	#	debian/gphoto2-dev/usr/share/lintian/overrides/gphoto2-dev

	# remove upstream 0-byte files to make lintian happy
	-find debian/tmp/ -size 0 -exec rm '{}' ';'

	# Ok the GPL is already on the target system
	rm debian/tmp/usr/share/doc/gphoto2/COPYING

	# Remove the gphoto2 rpath
	#chrpath -l debian/tmp/usr/bin/gphoto2 | grep -c 'RPATH=' 1>/dev/null && \
	#	(echo "Remove gphoto2 rpath"; chrpath -d debian/tmp/usr/bin/gphoto2); 
 
	dh_movefiles

	-find debian/tmp -type d | sort -r | xargs rmdir 2>1 > /dev/null
	# debian/tmp should be empty here : if not fail:
	test ! -d debian/tmp

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

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir -a
	dh_testroot -a

	dh_installdocs doc/DAEMON
	# no undocumented manpage without prior bug report
#	dh_undocumented -pgphoto2-dev gphoto2-config.1
#	dh_undocumented -pgphoto2-dev gphoto2-port-config.1
	dh_installchangelogs ChangeLog
	dh_link -a
	dh_strip -a
	dh_compress -a
	dh_fixperms -a
	dh_makeshlibs -a -V
	dh_installdeb
	dh_shlibdeps -ldebian/gphoto2/usr/lib/
	dh_gencontrol -pgphoto2-dev
	dh_gencontrol -pgphoto2
	dh_md5sums
	dh_builddeb

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