]>
Commit | Line | Data |
---|---|---|
f803c821 TL |
1 | include /usr/share/dpkg/pkg-info.mk# howto add rule updates: |
2 | ||
7b922beb DM |
3 | # edit paths ($srcdir) in changes.pl |
4 | # update changes.diff - verify changes! | |
5 | ||
badcf991 | 6 | # dig -t any 2.4.3.updates.spamassassin.org |
7b922beb DM |
7 | # wget http://spamassassin.kluge.net/updates/501214.tar.gz |
8 | # wget http://spamassassin.kluge.net/updates/501214.tar.gz.asc | |
9 | # gpg --verify 501214.tar.gz.asc 501214.tar.gz | |
10 | # | |
11 | # or just use: make sa-updates.tgz (from the last stable version) | |
12 | # warning: start with an empty sa-updates.tgz, install the package, | |
13 | # the run sa-update to generate the updates | |
14 | # | |
d2ab4c52 DM |
15 | # Note: we also add KAM.cf from |
16 | # http://www.pccc.com/downloads/SpamAssassin/contrib/KAM.cf | |
17 | # | |
7b922beb DM |
18 | # edit debin/rules to apply updates |
19 | ||
f803c821 TL |
20 | OPKGNAME = Mail-SpamAssassin-${DEB_VERSION_UPSTREAM} |
21 | NPKGNAME = proxmox-spamassassin_${DEB_VERSION_UPSTREAM} | |
22 | DEB = proxmox-spamassassin_${DEB_VERSION_UPSTREAM_REVISION}_amd64.deb | |
7b922beb | 23 | |
7a367109 DM |
24 | EXTRA_RULES = KAM.cf |
25 | ||
ae1e4fd8 SI |
26 | SA_UPDATE_GPG_DIR = .sa-update-gpghome |
27 | ||
f8a626c3 TL |
28 | deb: ${DEB} |
29 | ||
7b922beb | 30 | #${DEB}: ${OPKGNAME}.tar.gz |
7a367109 | 31 | ${DEB}: ${OPKGNAME}.tar.gz sa-updates.tgz ${EXTRA_RULES} |
7b922beb DM |
32 | -rm -rf ${OPKGNAME} ${NPKGNAME} |
33 | tar xzf ${OPKGNAME}.tar.gz | |
34 | mv ${OPKGNAME} ${NPKGNAME} | |
35 | cp -a debian ${NPKGNAME} | |
7a367109 DM |
36 | mkdir ${NPKGNAME}/extra_rules |
37 | cp ${EXTRA_RULES} ${NPKGNAME}/extra_rules | |
7b922beb DM |
38 | cd ${NPKGNAME}; dpkg-buildpackage -us -uc -rfakeroot |
39 | -rm -rf ${OPKGNAME} ${NPKGNAME} | |
40 | lintian ${DEB} | |
41 | ||
7a367109 DM |
42 | KAM.cf: |
43 | wget http://www.pccc.com/downloads/SpamAssassin/contrib/KAM.cf -O $@.tmp | |
44 | mv KAM.cf.tmp $@ | |
7b922beb | 45 | |
ae1e4fd8 SI |
46 | ${SA_UPDATE_GPG_DIR}/.prepared: ${OPKGNAME}.tar.gz |
47 | rm -rf ${SA_UPDATE_GPG_DIR} | |
48 | mkdir --mode=0700 -p ${SA_UPDATE_GPG_DIR} | |
49 | tar --strip-components 2 -xzf ${OPKGNAME}.tar.gz ${OPKGNAME}/rules/sa-update-pubkey.txt | |
50 | sa-update --gpghomedir ${SA_UPDATE_GPG_DIR} --import sa-update-pubkey.txt | |
51 | rm sa-update-pubkey.txt | |
52 | touch $@ | |
53 | ||
27e14884 TL |
54 | .PHONY: update-sa |
55 | update-sa: ${SA_UPDATE_GPG_DIR}/.prepared | |
d2ab4c52 | 56 | rm -rf updates.tmp |
ae1e4fd8 | 57 | sa-update --gpghomedir ${SA_UPDATE_GPG_DIR} --updatedir updates.tmp --channel updates.spamassassin.org |
7b922beb DM |
58 | tar cvzf sa-updates.tgz --exclude=local.cf --exclude=regression_tests.cf --exclude=*.txt --exclude=MIRRORED.BY -C updates.tmp/updates_spamassassin_org/ . |
59 | ||
60 | .PHONY: upload | |
61 | upload: ${DEB} | |
f050a4b2 | 62 | tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pmg --dist stretch |
7b922beb | 63 | |
ae1e4fd8 | 64 | CLEANFILES = *~ debian/*~ *.deb proxmox-spamassassin_* updates.tmp ${SA_UPDATE_GPG_DIR} |
7b922beb DM |
65 | |
66 | .PHONY: clean | |
67 | clean: | |
68 | rm -rf ${CLEANFILES} | |
19fb7ca6 DM |
69 | |
70 | .PHONY: dinstall | |
71 | dinstall: ${DEB} | |
72 | dpkg -i ${DEB} |