]>
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 | |
7b922beb | 25 | |
7a367109 DM |
26 | EXTRA_RULES = KAM.cf |
27 | ||
ae1e4fd8 SI |
28 | SA_UPDATE_GPG_DIR = .sa-update-gpghome |
29 | ||
f8a626c3 TL |
30 | deb: ${DEB} |
31 | ||
7b922beb | 32 | #${DEB}: ${OPKGNAME}.tar.gz |
7a367109 | 33 | ${DEB}: ${OPKGNAME}.tar.gz sa-updates.tgz ${EXTRA_RULES} |
7b922beb DM |
34 | -rm -rf ${OPKGNAME} ${NPKGNAME} |
35 | tar xzf ${OPKGNAME}.tar.gz | |
36 | mv ${OPKGNAME} ${NPKGNAME} | |
37 | cp -a debian ${NPKGNAME} | |
7a367109 DM |
38 | mkdir ${NPKGNAME}/extra_rules |
39 | cp ${EXTRA_RULES} ${NPKGNAME}/extra_rules | |
7b922beb DM |
40 | cd ${NPKGNAME}; dpkg-buildpackage -us -uc -rfakeroot |
41 | -rm -rf ${OPKGNAME} ${NPKGNAME} | |
42 | lintian ${DEB} | |
43 | ||
7a367109 DM |
44 | KAM.cf: |
45 | wget http://www.pccc.com/downloads/SpamAssassin/contrib/KAM.cf -O $@.tmp | |
46 | mv KAM.cf.tmp $@ | |
7b922beb | 47 | |
ae1e4fd8 SI |
48 | ${SA_UPDATE_GPG_DIR}/.prepared: ${OPKGNAME}.tar.gz |
49 | rm -rf ${SA_UPDATE_GPG_DIR} | |
50 | mkdir --mode=0700 -p ${SA_UPDATE_GPG_DIR} | |
51 | tar --strip-components 2 -xzf ${OPKGNAME}.tar.gz ${OPKGNAME}/rules/sa-update-pubkey.txt | |
52 | sa-update --gpghomedir ${SA_UPDATE_GPG_DIR} --import sa-update-pubkey.txt | |
53 | rm sa-update-pubkey.txt | |
54 | touch $@ | |
55 | ||
27e14884 TL |
56 | .PHONY: update-sa |
57 | update-sa: ${SA_UPDATE_GPG_DIR}/.prepared | |
d2ab4c52 | 58 | rm -rf updates.tmp |
ae1e4fd8 | 59 | sa-update --gpghomedir ${SA_UPDATE_GPG_DIR} --updatedir updates.tmp --channel updates.spamassassin.org |
7b922beb DM |
60 | tar cvzf sa-updates.tgz --exclude=local.cf --exclude=regression_tests.cf --exclude=*.txt --exclude=MIRRORED.BY -C updates.tmp/updates_spamassassin_org/ . |
61 | ||
62 | .PHONY: upload | |
63 | upload: ${DEB} | |
f050a4b2 | 64 | tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pmg --dist stretch |
7b922beb | 65 | |
ae1e4fd8 | 66 | CLEANFILES = *~ debian/*~ *.deb proxmox-spamassassin_* updates.tmp ${SA_UPDATE_GPG_DIR} |
7b922beb DM |
67 | |
68 | .PHONY: clean | |
69 | clean: | |
70 | rm -rf ${CLEANFILES} | |
19fb7ca6 DM |
71 | |
72 | .PHONY: dinstall | |
73 | dinstall: ${DEB} | |
74 | dpkg -i ${DEB} |