]>
Commit | Line | Data |
---|---|---|
63a37115 TL |
1 | include /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 |
22 | OPKGNAME = Mail-SpamAssassin-${DEB_VERSION_UPSTREAM} |
23 | NPKGNAME = proxmox-spamassassin_${DEB_VERSION_UPSTREAM} | |
24 | DEB = proxmox-spamassassin_${DEB_VERSION_UPSTREAM_REVISION}_amd64.deb | |
91f41381 TL |
25 | DBG_DEB = proxmox-spamassassin-dbgsym_${DEB_VERSION_UPSTREAM_REVISION}_amd64.deb |
26 | DEBS = ${DEB} ${DBG_DEB} | |
73ae04ad | 27 | DSC = proxmox-spamassassin_${DEB_VERSION_UPSTREAM_REVISION}.dsc |
7b922beb | 28 | |
7a367109 DM |
29 | EXTRA_RULES = KAM.cf |
30 | ||
ae1e4fd8 SI |
31 | SA_UPDATE_GPG_DIR = .sa-update-gpghome |
32 | ||
f8a626c3 TL |
33 | deb: ${DEB} |
34 | ||
91f41381 | 35 | ${DEB} ${DBG_DEB}: ${NPKGNAME} |
73ae04ad | 36 | cd ${NPKGNAME}; dpkg-buildpackage -b -us -uc -rfakeroot |
7b922beb DM |
37 | lintian ${DEB} |
38 | ||
73ae04ad SI |
39 | dsc: ${DSC} |
40 | ||
41 | ${DSC}: ${NPKGNAME} | |
8ea03253 | 42 | cd ${NPKGNAME}; dpkg-buildpackage -S -us -uc -rfakeroot -d |
73ae04ad | 43 | lintian ${DSC} |
426b8f0a | 44 | |
4da3759d TL |
45 | .PHONY: update-upstream |
46 | update-upstream: ${OPKGNAME}.tar.gz | |
47 | rm -rf upstream | |
426b8f0a | 48 | tar -xzf $< |
4da3759d | 49 | mv ${OPKGNAME} upstream |
14fcd860 | 50 | |
4da3759d | 51 | ${NPKGNAME}.orig.tar.gz: upstream/ |
14fcd860 SI |
52 | rm -rf ${NPKGNAME} |
53 | cp -a upstream ${NPKGNAME} | |
54 | tar -czf $@ ${NPKGNAME} | |
426b8f0a | 55 | |
054f24db | 56 | ${NPKGNAME}: sa-updates ${EXTRA_RULES} ${NPKGNAME}.orig.tar.gz |
426b8f0a SI |
57 | cp -a debian $@ |
58 | mkdir -p $@/debian/tree/usr/share/spamassassin | |
054f24db | 59 | rsync -av sa-updates/ $@/debian/tree/usr/share/spamassassin |
426b8f0a SI |
60 | mkdir -p $@/debian/tree/usr/share/spamassassin-extra |
61 | cp -a ${EXTRA_RULES} $@/debian/tree/usr/share/spamassassin-extra | |
62 | ||
ac5080f9 SI |
63 | ${OPKGNAME}.tar.gz: |
64 | rm -f $@* | |
65 | curl -L -o '$@#1.tmp' 'https://www-eu.apache.org/dist/spamassassin/source/$@{,.asc}' | |
66 | mv $@.tmp $@ | |
67 | mv $@.asc.tmp $@.asc | |
68 | gpgv --keyring ./sa-releasekey.gpg $@.asc $@ | |
69 | ||
7a367109 | 70 | KAM.cf: |
0c424e96 | 71 | wget https://www.pccc.com/downloads/SpamAssassin/contrib/KAM.cf -O $@.tmp |
7a367109 | 72 | mv KAM.cf.tmp $@ |
7b922beb | 73 | |
ae1e4fd8 SI |
74 | ${SA_UPDATE_GPG_DIR}/.prepared: ${OPKGNAME}.tar.gz |
75 | rm -rf ${SA_UPDATE_GPG_DIR} | |
76 | mkdir --mode=0700 -p ${SA_UPDATE_GPG_DIR} | |
77 | tar --strip-components 2 -xzf ${OPKGNAME}.tar.gz ${OPKGNAME}/rules/sa-update-pubkey.txt | |
78 | sa-update --gpghomedir ${SA_UPDATE_GPG_DIR} --import sa-update-pubkey.txt | |
79 | rm sa-update-pubkey.txt | |
80 | touch $@ | |
81 | ||
27e14884 TL |
82 | .PHONY: update-sa |
83 | update-sa: ${SA_UPDATE_GPG_DIR}/.prepared | |
d2ab4c52 | 84 | rm -rf updates.tmp |
ae1e4fd8 | 85 | sa-update --gpghomedir ${SA_UPDATE_GPG_DIR} --updatedir updates.tmp --channel updates.spamassassin.org |
054f24db | 86 | rsync -av --delete --exclude=local.cf --exclude=regression_tests.cf --exclude=*.txt --exclude=MIRRORED.BY updates.tmp/updates_spamassassin_org/ sa-updates |
7b922beb DM |
87 | |
88 | .PHONY: upload | |
91f41381 TL |
89 | upload: ${DEBS} |
90 | tar cf - ${DEBS} | ssh -X repoman@repo.proxmox.com -- upload --product pmg --dist bullseye | |
7b922beb | 91 | |
feec84ce TL |
92 | .PHONY: clean distclean |
93 | clean: | |
94 | rm -rf *~ debian/*~ *.deb proxmox-spamassassin_* updates.tmp ${SA_UPDATE_GPG_DIR} ${OPKGNAME}.tar.gz.* | |
7b922beb | 95 | |
feec84ce TL |
96 | distclean: clean |
97 | rm -rf ${OPKGNAME}.* | |
19fb7ca6 DM |
98 | |
99 | .PHONY: dinstall | |
100 | dinstall: ${DEB} | |
101 | dpkg -i ${DEB} |