void-packages/srcpkgs/atop/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

31 lines
839 B
Bash

# Template file for 'atop'
pkgname=atop
version=2.5.0
revision=1
build_style=gnu-makefile
make_install_target="sysvinstall"
makedepends="ncurses-devel zlib-devel"
short_desc="System and process level monitor"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://www.atoptool.nl/"
distfiles="https://www.atoptool.nl/download/atop-${version}.tar.gz"
checksum=4b911057ce50463b6e8b3016c5963d48535c0cddeebc6eda817e292b22f93f33
python_version=2 #unverified
make_dirs="/var/log/atop 755 root root"
pre_install() {
vsed -e '/chown/d' \
-e 's/04711/0755/' \
-e 's,sbin,bin,g' \
-e '/$(DEFPATH)/d' -i Makefile
vsed -e 's,bin/sh,bin/bash,' -i atop.daily
}
post_install() {
vsv atop
# Remove unused stuff.
rm -f ${DESTDIR}/usr/bin/atop{,sar}-${version}
rm -rf ${DESTDIR}/etc/init.d ${DESTDIR}/var
}