void-packages/srcpkgs/spamassassin/template
Đoàn Trần Công Danh 4b97cd2fb4 srcpkgs/s*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

32 lines
1.1 KiB
Bash

# Template file for 'spamassassin'
pkgname=spamassassin
version=3.4.4
revision=2
wrksrc="Mail-SpamAssassin-${version}"
build_style=perl-module
# Missing optional dependencies:
# Mail::SPF, Geo::IP, Razor2, Encode::Detect, Net::Patricia
hostmakedepends="curl gnupg perl perl-DBI perl-Digest-SHA1 perl-HTML-Parser
perl-HTTP-Date perl-IO-Socket-INET6 perl-IO-Socket-SSL perl-LWP
perl-Mail-DKIM perl-Net-DNS perl-NetAddr-IP"
makedepends="$hostmakedepends"
depends="$hostmakedepends"
short_desc="Tool that serves as a mail filter to identify Spam"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="Apache-2.0"
homepage="https://spamassassin.apache.org/"
distfiles="http://www.us.apache.org/dist/${pkgname}/source/Mail-SpamAssassin-${version}.tar.gz"
checksum=8ea27a165b81e3ce8c84ae85c3ecba1f2edfa04ef4a86f07fe28ab612fc8ff60
conf_files="
/etc/mail/spamassassin/v312.pre
/etc/mail/spamassassin/v330.pre
/etc/mail/spamassassin/v340.pre
/etc/mail/spamassassin/v310.pre
/etc/mail/spamassassin/v320.pre
/etc/mail/spamassassin/init.pre
/etc/mail/spamassassin/local.cf"
post_install() {
vinstall $FILESDIR/sa-update 755 /etc/cron.weekly
vsv spamd
}