void-packages/srcpkgs/dma/template
Đoàn Trần Công Danh b6bcd8cd34 srcpkgs/d*: convert patches to -Np1
* daemontools and dmraid is kept at -Np0

```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
943 B
Bash

# Template file for 'dma'
pkgname=dma
version=0.13
revision=3
conf_files="/etc/dma/*.conf"
make_dirs="/var/spool/dma 2775 root mail"
hostmakedepends="flex"
makedepends="openssl-devel"
short_desc="Small Mail Transport Agent (MTA), designed for home and office use"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="BSD-3-Clause"
homepage="https://github.com/corecode/dma"
distfiles="https://github.com/corecode/dma/archive/v${version}.tar.gz"
checksum=9d4b903f2b750d888f51d668d08d2ea18404dedb0a52cffeb3c81376023c1946
system_accounts="mail"
provides="smtp-server-0_1 smtp-forwarder-0_1"
replaces="smtp-server>=0 smtp-forwarder>=0"
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
makedepends+=" musl-legacy-compat"
fi
do_build() {
make PREFIX=/usr SBIN=/usr/bin CC=$CC LEX=flex ${makejobs}
}
do_install() {
vmkdir usr/bin
make PREFIX=/usr SBIN=/usr/bin DESTDIR=${DESTDIR} sendmail-link mailq-link install-etc install
vlicense LICENSE
}