void-packages/srcpkgs/acct/template
Đoàn Trần Công Danh ae69000001 srcpkgs/a*: convert patches to -Np1
* arduino and antiword 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

26 lines
690 B
Bash

# Template file for 'acct'
pkgname=acct
version=6.6.4
revision=2
build_style=gnu-configure
short_desc="GNU Accounting Utilities"
homepage="https://www.gnu.org/software/acct/"
license="GPL-3.0-or-later"
maintainer="Orphaned <orphan@voidlinux.org>"
distfiles="${GNU_SITE}/$pkgname/$pkgname-$version.tar.gz"
checksum=4c15bf2b58b16378bcc83f70e77d4d40ab0b194acf2ebeefdb507f151faa663f
if [ "$CROSS_BUILD" ]; then
post_extract() {
case "$XBPS_TARGET_MACHINE" in
*-musl) cp $FILESDIR/locs-musl locs ;;
*) cp $FILESDIR/locs-glibc locs ;;
esac
}
fi
post_install() {
# The last(1) command is provided by util-linux
rm ${DESTDIR}/usr/bin/last
rm ${DESTDIR}/usr/share/man/man1/last.1
}