File: rules

package info (click to toggle)
libapreq2-perl 2.04-dev-1sarge2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,700 kB
  • ctags: 1,508
  • sloc: sh: 8,103; ansic: 5,557; perl: 2,842; cpp: 1,052; makefile: 234
file content (80 lines) | stat: -rwxr-xr-x 1,838 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
#!/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)

ifndef PERL
PERL = /usr/bin/perl
endif

ifndef DESTDIR
DESTDIR=..
endif
TMP      = `pwd`/debian/libapache2-request-perl

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

OPTIMIZE = -O2 -Wall
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
OPTIMIZE += -g
endif

build:
	dh_testdir
	CFLAGS="-g -O2" $(PERL) Makefile.PL INSTALLDIRS=vendor --with-apache2-apxs=/usr/bin/apxs2 --prefix=/usr
	$(MAKE) OPTIMIZE="$(OPTIMIZE)" LD_RUN_PATH=""

clean:
	dh_testdir
	dh_testroot
	-$(MAKE) distclean
	dh_clean

binary: binary-arch binary-indep

binary-indep: 

binary-arch: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs
	
	# Yes, it actually appears both PREFIX and prefix are needed.
	$(MAKE) install INSTALLDIRS=vendor DESTDIR=$(TMP) PREFIX=/usr prefix=/usr
	
	# We don't need this, but libtool installs it anyhow.
	$(RM) $(TMP)/usr/lib/libapreq2.so
	
	# These conflict with libapache-request-perl, unfortunately.
	$(RM) $(TMP)/usr/share/man/man3/Apache::Cookie.3pm
	$(RM) $(TMP)/usr/share/man/man3/Apache::Request.3pm
	
	install -m 0644 debian/apreq.load $(TMP)/etc/apache2/mods-available/
	
	dh_installdocs README
	install -m 0644 docs/html/* $(TMP)/usr/share/doc/libapache2-request-perl/html/ 
	dh_installexamples 
	dh_installmenu
	dh_installcron
	dh_installchangelogs CHANGES
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_perl $(INSTDIR)/Apache
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb --destdir=$(DESTDIR)

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