~ubuntu-branches/ubuntu/saucy/libapreq2/saucy-proposed

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Steinar H. Gunderson
  • Date: 2005-10-10 18:53:46 UTC
  • Revision ID: james.westby@ubuntu.com-20051010185346-ygmt093hyz84z6fu
Tags: 2.06-dev-2
Hardcode $prefix in apreq2-config.in to /usr, so apreq2-config gives out
more sensible values. (Closes: #323108)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
#-*- makefile -*-
 
3
# Made with the aid of dh_make, by Craig Small
 
4
 
 
5
# Uncomment this to turn on verbose mode.
 
6
#export DH_VERBOSE=1
 
7
 
 
8
# If set to a true value then MakeMaker's prompt function will
 
9
# always return the default without waiting for user input.
 
10
export PERL_MM_USE_DEFAULT=1
 
11
 
 
12
PACKAGE=$(shell dh_listpackages)
 
13
 
 
14
ifndef PERL
 
15
PERL = /usr/bin/perl
 
16
endif
 
17
 
 
18
ifndef DESTDIR
 
19
DESTDIR=..
 
20
endif
 
21
TMP      = `pwd`/debian/tmp
 
22
 
 
23
INSTDIR  = $(shell perl -V:archlib | cut -d\' -f2 )
 
24
 
 
25
OPTIMIZE = -O2 -Wall
 
26
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
 
27
OPTIMIZE += -g
 
28
endif
 
29
 
 
30
build:
 
31
        dh_testdir
 
32
        CFLAGS="-g -O2" $(PERL) Makefile.PL INSTALLDIRS=vendor --with-apache2-apxs=/usr/bin/apxs2 --prefix=/usr
 
33
        $(MAKE) OPTIMIZE="$(OPTIMIZE)" LD_RUN_PATH=""
 
34
 
 
35
clean:
 
36
        dh_testdir
 
37
        dh_testroot
 
38
        -$(MAKE) distclean
 
39
        $(RM) -r $(TMP)
 
40
        dh_clean
 
41
 
 
42
binary: binary-arch binary-indep
 
43
 
 
44
binary-indep: 
 
45
 
 
46
binary-arch: build
 
47
        dh_testdir
 
48
        dh_testroot
 
49
        dh_clean -k
 
50
        dh_installdirs
 
51
        
 
52
        # Yes, it actually appears both PREFIX and prefix are needed.
 
53
        mkdir $(TMP)
 
54
        $(MAKE) install INSTALLDIRS=vendor DESTDIR=$(TMP) PREFIX=/usr prefix=/usr
 
55
        
 
56
        # These conflict with libapache-request-perl, unfortunately.
 
57
        $(RM) $(TMP)/usr/share/man/man3/Apache::Cookie.3pm
 
58
        $(RM) $(TMP)/usr/share/man/man3/Apache::Request.3pm
 
59
        
 
60
        dh_install --sourcedir=debian/tmp
 
61
        
 
62
        install -m 0644 debian/apreq.load debian/libapache2-mod-apreq2/etc/apache2/mods-available/
 
63
        
 
64
        dh_installdocs README
 
65
        install -m 0644 docs/html/* debian/libapreq2-doc/usr/share/doc/libapache2-request-perl/html/ 
 
66
        dh_installchangelogs CHANGES
 
67
        dh_link
 
68
        dh_strip
 
69
        dh_compress
 
70
        dh_fixperms
 
71
        dh_installdeb
 
72
        dh_perl $(INSTDIR)/Apache
 
73
        dh_makeshlibs
 
74
        dh_shlibdeps -L libapreq2 -l debian/libapreq2/usr/lib
 
75
        dh_gencontrol
 
76
        dh_md5sums 
 
77
        dh_builddeb --destdir=$(DESTDIR)
 
78
 
 
79
.PHONY: build clean binary binary-arch binary-indep