File: rules

package info (click to toggle)
vcdimager 0.7.23-4
  • links: PTS
  • area: main
  • in suites: lenny, squeeze
  • size: 4,232 kB
  • ctags: 1,864
  • sloc: ansic: 18,143; sh: 9,372; xml: 317; makefile: 288
file content (82 lines) | stat: -rwxr-xr-x 2,383 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
#!/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-independent
# package.

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

CFLAGS = -g -Wall
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif

DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)

LIBCDEV=$(shell dpkg-awk 'Provides:libc-dev' -- Package | sed -ne 's/^Package:[[:space:]]*//p' | head -1) | libc-dev

configure: configure-stamp
configure-stamp:
	dh_testdir
# This test sounds rather useless since I KNOW that ./configure is in the tarball
#	if [ ! -e ./configure -a -e ./autogen.sh ]; then ./autogen.sh; fi
	CFLAGS="$(CFLAGS)" ./configure --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
	touch configure-stamp

build: configure-stamp build-stamp
build-stamp:
	dh_testdir
	$(MAKE)
	# Check the programs if we can...
	if [ "$(DEB_HOST_GNU_TYPE)" = "$(DEB_BUILD_GNU_TYPE)" ]; then $(MAKE) check; fi
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp
	[ ! -f Makefile ] || $(MAKE) distclean
	dh_clean

install: DH_OPTIONS=
install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp


# Build architecture-independent files here.
# Pass -i to all debhelper commands in this target to reduce clutter.
binary-indep: build install

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir -a
	dh_testroot -a
	dh_installdocs -a
#	dh_installman -a
	dh_installinfo -a
	dh_installchangelogs ChangeLog -a
	dh_install --sourcedir=$(CURDIR)/debian/tmp --list-missing
	dh_strip -a
	dh_link -a
	dh_compress -a
	dh_fixperms -a
	dh_makeshlibs -a -N libvcdinfo0
	dh_makeshlibs -p libvcdinfo0 -V 'libvcdinfo0 (>> 0.7.23)'
	dh_installdeb -a
	dh_shlibdeps -a -L libvcdinfo0 -l debian/libvcdinfo0/usr/lib
	dh_gencontrol -a -- -Vlibcdev="$(LIBCDEV)"
	dh_md5sums -a
	dh_builddeb -a

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