void-packages/srcpkgs/mairix/template
Đoàn Trần Công Danh 765e304c4b srcpkgs/m*: 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

19 lines
646 B
Bash

# Template file for 'mairix'
pkgname=mairix
version=0.24
revision=8
build_style=configure
configure_args="--prefix=/usr --mandir=/usr/share/man"
hostmakedepends="flex bison"
makedepends="bzip2-devel openssl-devel zlib-devel"
short_desc="A program for indexing and searching emails"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="GPL-2.0-only"
homepage="https://github.com/vandry/mairix"
distfiles="https://github.com/vandry/${pkgname}/releases/download/${version}/${pkgname}-${version}.tar.gz"
checksum=a0702e079c768b6fbe25687ebcbabe7965eb493d269a105998c7c1c2caef4a57
pre_build() {
make -C dfasyn CC="$BUILD_CC" CFLAGS="$BUILD_CFLAGS"
}