void-packages/srcpkgs/nrpe/template
Đoàn Trần Công Danh 65749575ab srcpkgs/n*: 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

30 lines
1.1 KiB
Bash

# Template file for 'nrpe'
pkgname=nrpe
version=4.0.3
revision=3
build_style=gnu-configure
configure_args="--with-pkgsysconfdir=/etc/nagios
--with-pluginsdir=/usr/lib/monitoring-plugins --with-nagios-user=_nagios
--with-nagios-group=_nagios --with-nrpe-user=_nagios --with-nrpe-group=_nagios
--with-ssl-inc=${XBPS_CROSS_BASE}/usr/include"
make_build_args="nrpe"
make_install_args="install-daemon install-config"
makedepends="openssl-devel"
depends="monitoring-plugins"
make_dirs="/etc/nagios 0775 _nagios _nagios"
conf_files="/etc/nagios/nrpe.cfg"
short_desc="Nagios Remote Plugin Executor"
maintainer="Randy McCaskill <randy@mccaskill.us>"
license="GPL-2.0-or-later"
homepage="https://github.com/NagiosEnterprises/nrpe"
changelog="https://github.com/NagiosEnterprises/nrpe/blob/master/CHANGELOG.md"
distfiles="https://github.com/NagiosEnterprises/${pkgname}/releases/download/${pkgname}-${version}/${pkgname}-${version}.tar.gz"
checksum=f907ba15381adfc6eef211508abd027f8e1973116080faa4534a1191211c0340
system_accounts="_nagios"
post_install() {
vsv nrpe
# remove useless files
rm -f ${DESTDIR}/usr/bin/nrpe-uninstall
rm -f ${DESTDIR}/usr/libexec/check_nrpe
}