File: rules

package info (click to toggle)
libberkeleydb-perl 0.42-1~squeeze1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 1,324 kB
  • ctags: 314
  • sloc: perl: 10,257; ansic: 5,247; makefile: 50
file content (70 lines) | stat: -rwxr-xr-x 1,333 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
SHELL+= -e

ifndef PERL
PERL := /usr/bin/perl
endif

DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)

D := $(CURDIR)/debian/libberkeleydb-perl

build: build-stamp
build-stamp:
	dh_testdir

	$(PERL) Makefile.PL INSTALLDIRS=vendor
	make OPTIMIZE="$(CFLAGS)"
ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),amd64 i386))
	make test
else
	# sorry, I wasted too much time because of buildds with broken toolchains
	$(warning Tests disabled for this architecture.)
endif

	touch $@

clean:
	dh_testdir
	rm -f build-stamp install-stamp

	[ ! -f Makefile ] || $(MAKE) distclean

	dh_clean

install: install-stamp
install-stamp: build-stamp
	dh_testdir
	dh_testroot
	dh_clean -k

	$(MAKE) install DESTDIR=$D
	[ ! -d $D/usr/share/perl5/ ] \
	  || rmdir --ignore-fail-on-non-empty --parents $D/usr/share/perl5/

	touch $@

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs Changes
	dh_installdocs
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_perl
	dh_shlibdeps
	dh_gencontrol
	dh_builddeb

binary-indep:

binary: binary-indep binary-arch

get-orig-source:
	cd $(dir $(firstword $(MAKEFILE_LIST)))../ && \
	uscan --rename --force-download --watchfile debian/watch --destdir $(CURDIR)

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