]> git.proxmox.com Git - proxmox-spamassassin.git/blame - Makefile
bump version to 3.4.4-3
[proxmox-spamassassin.git] / Makefile
CommitLineData
63a37115
TL
1include /usr/share/dpkg/pkg-info.mk
2
3# howto add rule updates:
f803c821 4
7b922beb
DM
5# edit paths ($srcdir) in changes.pl
6# update changes.diff - verify changes!
7
1bd5581e 8# dig -t any 3.4.3.updates.spamassassin.org
7b922beb
DM
9# wget http://spamassassin.kluge.net/updates/501214.tar.gz
10# wget http://spamassassin.kluge.net/updates/501214.tar.gz.asc
11# gpg --verify 501214.tar.gz.asc 501214.tar.gz
12#
13# or just use: make sa-updates.tgz (from the last stable version)
14# warning: start with an empty sa-updates.tgz, install the package,
15# the run sa-update to generate the updates
16#
d2ab4c52
DM
17# Note: we also add KAM.cf from
18# http://www.pccc.com/downloads/SpamAssassin/contrib/KAM.cf
19#
7b922beb
DM
20# edit debin/rules to apply updates
21
f803c821
TL
22OPKGNAME = Mail-SpamAssassin-${DEB_VERSION_UPSTREAM}
23NPKGNAME = proxmox-spamassassin_${DEB_VERSION_UPSTREAM}
24DEB = proxmox-spamassassin_${DEB_VERSION_UPSTREAM_REVISION}_amd64.deb
73ae04ad 25DSC = proxmox-spamassassin_${DEB_VERSION_UPSTREAM_REVISION}.dsc
7b922beb 26
7a367109
DM
27EXTRA_RULES = KAM.cf
28
ae1e4fd8
SI
29SA_UPDATE_GPG_DIR = .sa-update-gpghome
30
f8a626c3
TL
31deb: ${DEB}
32
426b8f0a 33${DEB}: ${NPKGNAME}
73ae04ad 34 cd ${NPKGNAME}; dpkg-buildpackage -b -us -uc -rfakeroot
7b922beb
DM
35 lintian ${DEB}
36
73ae04ad
SI
37dsc: ${DSC}
38
39${DSC}: ${NPKGNAME}
8ea03253 40 cd ${NPKGNAME}; dpkg-buildpackage -S -us -uc -rfakeroot -d
73ae04ad 41 lintian ${DSC}
426b8f0a
SI
42
43${NPKGNAME}.orig.tar.gz: ${OPKGNAME}.tar.gz
44 rm -rf ${NPKGNAME}
45 tar -xzf $<
46 mv ${OPKGNAME} ${NPKGNAME}
47 tar -czf ${NPKGNAME}.orig.tar.gz ${NPKGNAME}
48
49${NPKGNAME}: sa-updates.tgz ${EXTRA_RULES} ${NPKGNAME}.orig.tar.gz
50 cp -a debian $@
51 mkdir -p $@/debian/tree/usr/share/spamassassin
52 tar -C $@/debian/tree/usr/share/spamassassin -xzf sa-updates.tgz
53 mkdir -p $@/debian/tree/usr/share/spamassassin-extra
54 cp -a ${EXTRA_RULES} $@/debian/tree/usr/share/spamassassin-extra
55
ac5080f9
SI
56${OPKGNAME}.tar.gz:
57 rm -f $@*
58 curl -L -o '$@#1.tmp' 'https://www-eu.apache.org/dist/spamassassin/source/$@{,.asc}'
59 mv $@.tmp $@
60 mv $@.asc.tmp $@.asc
61 gpgv --keyring ./sa-releasekey.gpg $@.asc $@
62
7a367109 63KAM.cf:
0c424e96 64 wget https://www.pccc.com/downloads/SpamAssassin/contrib/KAM.cf -O $@.tmp
7a367109 65 mv KAM.cf.tmp $@
7b922beb 66
ae1e4fd8
SI
67${SA_UPDATE_GPG_DIR}/.prepared: ${OPKGNAME}.tar.gz
68 rm -rf ${SA_UPDATE_GPG_DIR}
69 mkdir --mode=0700 -p ${SA_UPDATE_GPG_DIR}
70 tar --strip-components 2 -xzf ${OPKGNAME}.tar.gz ${OPKGNAME}/rules/sa-update-pubkey.txt
71 sa-update --gpghomedir ${SA_UPDATE_GPG_DIR} --import sa-update-pubkey.txt
72 rm sa-update-pubkey.txt
73 touch $@
74
27e14884
TL
75.PHONY: update-sa
76update-sa: ${SA_UPDATE_GPG_DIR}/.prepared
d2ab4c52 77 rm -rf updates.tmp
ae1e4fd8 78 sa-update --gpghomedir ${SA_UPDATE_GPG_DIR} --updatedir updates.tmp --channel updates.spamassassin.org
7b922beb
DM
79 tar cvzf sa-updates.tgz --exclude=local.cf --exclude=regression_tests.cf --exclude=*.txt --exclude=MIRRORED.BY -C updates.tmp/updates_spamassassin_org/ .
80
81.PHONY: upload
82upload: ${DEB}
f050a4b2 83 tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pmg --dist stretch
7b922beb 84
ac5080f9 85CLEANFILES = *~ debian/*~ *.deb proxmox-spamassassin_* updates.tmp ${SA_UPDATE_GPG_DIR} ${OPKGNAME}.tar.gz.*
7b922beb
DM
86
87.PHONY: clean
88clean:
89 rm -rf ${CLEANFILES}
19fb7ca6
DM
90
91.PHONY: dinstall
92dinstall: ${DEB}
93 dpkg -i ${DEB}