File: rules

package info (click to toggle)
libapreq2 2.13-7%2Bdeb11u1
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 5,788 kB
  • sloc: sh: 9,378; ansic: 8,117; perl: 5,834; cpp: 380; makefile: 299
file content (91 lines) | stat: -rwxr-xr-x 2,253 bytes parent folder | download | duplicates (3)
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
#-*- makefile -*-
# Made with the aid of dh_make, by Craig Small

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

# If set to a true value then MakeMaker's prompt function will
# always return the default without waiting for user input.
export PERL_MM_USE_DEFAULT=1

PACKAGE=$(shell dh_listpackages)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

ifndef PERL
PERL = /usr/bin/perl
endif

ifndef DESTDIR
DESTDIR=..
endif
TMP      = `pwd`/debian/tmp

INSTDIR  = $(shell perl -V:archlib | cut -d\' -f2 )

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

build: build-arch build-indep

build-indep:

build-arch:
	dh_testdir
	dh_autotools-dev_updateconfig
	$(PERL) Makefile.PL --with-apache2-apxs=/usr/bin/apxs2 --prefix=/usr --libdir=/usr/lib/$(DEB_HOST_MULTIARCH)
	sed -i -r 's/(hardcode_into_libs)=.*$$/\1=no/' $(CURDIR)/libtool # See http://wiki.debian.org/RpathIssue.
	$(MAKE) OPTIMIZE="$(CFLAGS)" LDDLFLAGS="-shared $(LDFLAGS)" LD_RUN_PATH=""

clean:
	dh_testdir
	dh_testroot
	[ ! -f Makefile ] || $(MAKE) distclean
	$(RM) -r $(TMP)
	$(RM) config.nice glue/perl/Makefile.old glue/perl/t/REPORT glue/perl/t/SMOKE
	dh_autotools-dev_restoreconfig
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_prep

	# Note: prefix, not PREFIX.
	mkdir $(TMP)
	$(MAKE) install INSTALLDIRS=vendor DESTDIR=$(TMP) prefix=/usr

binary: binary-arch binary-indep

binary-indep: install
	dh_installdirs -i
	dh_install -i --sourcedir=debian/tmp
	install -m 0644 docs/html/* debian/libapreq2-doc/usr/share/doc/libapache2-request-perl/html/ 
	dh_installdocs -i
	dh_installchangelogs -i CHANGES
	dh_compress -i
	dh_fixperms -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i --destdir=$(DESTDIR)

binary-arch: install
	dh_installdirs -a
	dh_install -a --sourcedir=debian/tmp
	dh_installdocs -a README
	dh_apache2 -a
	dh_installchangelogs -a CHANGES
	dh_link -a
	dh_strip -a
	dh_compress -a
	dh_fixperms -a
	dh_perl -a $(INSTDIR)/Apache
	dh_makeshlibs -a -V'libapreq2-3 (>= 2.13-2)'
	dh_shlibdeps -a -L libapreq2 -l debian/libapreq2/usr/lib
	dh_installdeb -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a --destdir=$(DESTDIR)

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