]>
Commit | Line | Data |
---|---|---|
7b922beb DM |
1 | #!/usr/bin/make -f |
2 | # This debian/rules file is provided as a template for normal perl | |
3 | # packages. It was created by Marc Brockschmidt <marc@dch-faq.de> for | |
4 | # the Debian Perl Group (http://pkg-perl.alioth.debian.org/) but may | |
5 | # be used freely wherever it is useful. | |
6 | ||
7 | # Uncomment this to turn on verbose mode. | |
8 | #export DH_VERBOSE=1 | |
9 | ||
10 | # If set to a true value then MakeMaker's prompt function will | |
11 | # always return the default without waiting for user input. | |
12 | export PERL_MM_USE_DEFAULT=1 | |
13 | ||
14 | PACKAGE=$(shell dh_listpackages) | |
15 | ||
16 | ifndef PERL | |
17 | PERL = /usr/bin/perl | |
18 | endif | |
19 | ||
20 | include /usr/share/quilt/quilt.make | |
21 | ||
22 | TMP =$(CURDIR)/debian/$(PACKAGE) | |
23 | ||
24 | # Allow disabling build optimation by setting noopt in | |
25 | # $DEB_BUILD_OPTIONS | |
26 | CFLAGS = -Wall -g | |
27 | ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) | |
28 | CFLAGS += -O0 | |
29 | else | |
30 | CFLAGS += -O2 | |
31 | endif | |
32 | ||
33 | build: build-stamp | |
34 | build-stamp: $(QUILT_STAMPFN) | |
35 | ||
36 | dh_testdir | |
37 | ||
38 | # Add commands to compile the package here | |
39 | $(PERL) Makefile.PL INSTALLDIRS=vendor | |
40 | $(MAKE) OPTIMIZE="$(CFLAGS)" LD_RUN_PATH="" | |
41 | ||
cadcf070 SI |
42 | $(MAKE) test |
43 | ||
7b922beb DM |
44 | touch build-stamp |
45 | ||
46 | clean: unpatch | |
47 | dh_testdir | |
48 | dh_testroot | |
49 | ||
50 | # Add commands to clean up after the build process here | |
51 | [ ! -f Makefile ] || $(MAKE) realclean | |
52 | ||
53 | dh_clean build-stamp install-stamp | |
54 | ||
55 | install: build install-stamp | |
56 | install-stamp: | |
57 | dh_testdir | |
58 | dh_testroot | |
59 | dh_clean -k | |
60 | ||
61 | # Add commands to install the package into debian/PACKAGE_NAME here | |
7b922beb DM |
62 | $(MAKE) install DESTDIR=$(TMP) PREFIX=/usr |
63 | ||
64 | # rm example local.cf | |
65 | rm $(TMP)/etc/mail/spamassassin/local.cf | |
66 | ||
d27e5c83 SI |
67 | # rm config files rendered by PMG templates |
68 | rm $(TMP)/etc/mail/spamassassin/init.pre | |
69 | rm $(TMP)/etc/mail/spamassassin/v310.pre | |
70 | rm $(TMP)/etc/mail/spamassassin/v320.pre | |
71 | ||
7b922beb DM |
72 | # apply rule updates |
73 | tar xzvf ../sa-updates.tgz -C $(TMP)/usr/share/spamassassin/ | |
74 | #patch -d $(TMP)/usr/share/spamassassin <../72_active.cf.diff | |
75 | ||
7a367109 DM |
76 | # install extra rules |
77 | mkdir $(TMP)/usr/share/spamassassin-extra/ | |
78 | install -m 0644 extra_rules/KAM.cf $(TMP)/usr/share/spamassassin-extra/ | |
79 | ||
7b922beb DM |
80 | # As this is a architecture dependent package, we are not |
81 | # supposed to install stuff to /usr/share. MakeMaker creates | |
82 | # the dirs, we delete them from the deb: | |
83 | rmdir --ignore-fail-on-non-empty --parents $(TMP)/usr/share/perl5 | |
84 | ||
85 | touch install-stamp | |
86 | ||
87 | # Build architecture-independent files here. | |
88 | binary-indep: build install | |
89 | # We have nothing to do by default. | |
90 | ||
91 | # Build architecture-dependent files here. | |
92 | binary-arch: build install | |
93 | dh_testdir | |
94 | dh_testroot | |
95 | dh_installdocs README t/README sql/README.awl sql/README.bayes sql/README spamd/README.vpopmail spamd/README spamd/OSXStartup/README spamc/README.win spamc/README.qmail spamd-apache2/README.apache ldap/README ldap/README.testing | |
96 | dh_installexamples | |
97 | # dh_installmenu | |
98 | # dh_installcron | |
99 | # dh_installman | |
100 | dh_installchangelogs Changes | |
101 | dh_link | |
102 | dh_strip | |
103 | dh_compress | |
104 | dh_fixperms | |
105 | dh_makeshlibs | |
106 | dh_installdeb | |
107 | dh_perl | |
108 | dh_shlibdeps | |
109 | dh_gencontrol | |
110 | dh_md5sums | |
111 | dh_builddeb | |
112 | ||
113 | source diff: | |
114 | @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false | |
115 | ||
116 | binary: binary-indep binary-arch | |
117 | .PHONY: build clean binary-indep binary-arch binary |