]> git.proxmox.com Git - proxmox-spamassassin.git/blob - debian/rules
Makefile: use "--product pmg --dist stretch" for upload target
[proxmox-spamassassin.git] / debian / rules
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
42 touch build-stamp
43
44 clean: 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
53 install: build install-stamp
54 install-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
70 # As this is a architecture dependent package, we are not
71 # supposed to install stuff to /usr/share. MakeMaker creates
72 # the dirs, we delete them from the deb:
73 rmdir --ignore-fail-on-non-empty --parents $(TMP)/usr/share/perl5
74
75 touch install-stamp
76
77 # Build architecture-independent files here.
78 binary-indep: build install
79 # We have nothing to do by default.
80
81 # Build architecture-dependent files here.
82 binary-arch: build install
83 dh_testdir
84 dh_testroot
85 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
86 dh_installexamples
87 # dh_installmenu
88 # dh_installcron
89 # dh_installman
90 dh_installchangelogs Changes
91 dh_link
92 dh_strip
93 dh_compress
94 dh_fixperms
95 dh_makeshlibs
96 dh_installdeb
97 dh_perl
98 dh_shlibdeps
99 dh_gencontrol
100 dh_md5sums
101 dh_builddeb
102
103 source diff:
104 @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
105
106 binary: binary-indep binary-arch
107 .PHONY: build clean binary-indep binary-arch binary