]> git.proxmox.com Git - proxmox-spamassassin.git/blame - debian/rules
install KAM.cf to /usr/share/spamassassin-extra/
[proxmox-spamassassin.git] / debian / rules
CommitLineData
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.
12export PERL_MM_USE_DEFAULT=1
13
14PACKAGE=$(shell dh_listpackages)
15
16ifndef PERL
17PERL = /usr/bin/perl
18endif
19
20include /usr/share/quilt/quilt.make
21
22TMP =$(CURDIR)/debian/$(PACKAGE)
23
24# Allow disabling build optimation by setting noopt in
25# $DEB_BUILD_OPTIONS
26CFLAGS = -Wall -g
27ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
28 CFLAGS += -O0
29else
30 CFLAGS += -O2
31endif
32
33build: build-stamp
34build-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
42 touch build-stamp
43
44clean: unpatch
45 dh_testdir
46 dh_testroot
47
48 # Add commands to clean up after the build process here
49 [ ! -f Makefile ] || $(MAKE) realclean
50
51 dh_clean build-stamp install-stamp
52
53install: build install-stamp
54install-stamp:
55 dh_testdir
56 dh_testroot
57 dh_clean -k
58
59 # Add commands to install the package into debian/PACKAGE_NAME here
60 $(MAKE) test
61 $(MAKE) install DESTDIR=$(TMP) PREFIX=/usr
62
63 # rm example local.cf
64 rm $(TMP)/etc/mail/spamassassin/local.cf
65
66 # apply rule updates
67 tar xzvf ../sa-updates.tgz -C $(TMP)/usr/share/spamassassin/
68 #patch -d $(TMP)/usr/share/spamassassin <../72_active.cf.diff
69
7a367109
DM
70 # install extra rules
71 mkdir $(TMP)/usr/share/spamassassin-extra/
72 install -m 0644 extra_rules/KAM.cf $(TMP)/usr/share/spamassassin-extra/
73
7b922beb
DM
74 # As this is a architecture dependent package, we are not
75 # supposed to install stuff to /usr/share. MakeMaker creates
76 # the dirs, we delete them from the deb:
77 rmdir --ignore-fail-on-non-empty --parents $(TMP)/usr/share/perl5
78
79 touch install-stamp
80
81# Build architecture-independent files here.
82binary-indep: build install
83# We have nothing to do by default.
84
85# Build architecture-dependent files here.
86binary-arch: build install
87 dh_testdir
88 dh_testroot
89 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
90 dh_installexamples
91# dh_installmenu
92# dh_installcron
93# dh_installman
94 dh_installchangelogs Changes
95 dh_link
96 dh_strip
97 dh_compress
98 dh_fixperms
99 dh_makeshlibs
100 dh_installdeb
101 dh_perl
102 dh_shlibdeps
103 dh_gencontrol
104 dh_md5sums
105 dh_builddeb
106
107source diff:
108 @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
109
110binary: binary-indep binary-arch
111.PHONY: build clean binary-indep binary-arch binary