File: rules

package info (click to toggle)
libberkeleydb-perl 0.55-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,480 kB
  • ctags: 331
  • sloc: perl: 11,228; ansic: 6,451; makefile: 56
file content (80 lines) | stat: -rwxr-xr-x 1,616 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
SHELL+= -e

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

-include /usr/share/dpkg/buildflags.mk

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

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

ARCHLIB := $(shell perl -MConfig -e 'print $$Config{vendorarch}')


clean:
	dh_testdir

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

	dh_clean

Makefile: Makefile.PL
	$(PERL) Makefile.PL INSTALLDIRS=vendor

build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp: Makefile
	dh_testdir

	make OPTIMIZE="$(CFLAGS) $(CPPFLAGS)" LD="cc $(CFLAGS) $(LDFLAGS)"
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 $@

install: install-stamp
install-stamp: build-stamp
	dh_testdir
	dh_testroot
	dh_prep

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

	touch $@

# Build architecture-dependent files here.
binary-arch: 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_md5sums
	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: clean build build-arch build-indep binary-arch binary-indep binary