File: rules

package info (click to toggle)
libapreq2 2.08-5
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 5,072 kB
  • ctags: 3,133
  • sloc: sh: 9,087; ansic: 7,565; perl: 5,567; cpp: 378; makefile: 281
file content (79 lines) | stat: -rwxr-xr-x 1,815 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
#!/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/tmp

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 --with-apache2-apxs=/usr/bin/apxs2 --prefix=/usr
	$(MAKE) OPTIMIZE="$(OPTIMIZE)" LD_RUN_PATH=""

clean:
	dh_testdir
	dh_testroot
	-$(MAKE) distclean
	$(RM) -r $(TMP)
	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.
	mkdir $(TMP)
	$(MAKE) install INSTALLDIRS=vendor DESTDIR=$(TMP) PREFIX=/usr prefix=/usr
	
	# 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
	
	dh_install --sourcedir=debian/tmp
	
	install -m 0644 debian/apreq.load debian/libapache2-mod-apreq2/etc/apache2/mods-available/
	
	dh_installdocs README
	install -m 0644 docs/html/* debian/libapreq2-doc/usr/share/doc/libapache2-request-perl/html/ 
	dh_installchangelogs CHANGES
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_perl $(INSTDIR)/Apache
	dh_makeshlibs
	dh_shlibdeps -L libapreq2 -l debian/libapreq2/usr/lib
	dh_gencontrol
	dh_md5sums 
	dh_builddeb --destdir=$(DESTDIR)

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