void-packages/srcpkgs/libcgroup/template
Đoàn Trần Công Danh 861ac185a6 srcpkgs/l*: 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

51 lines
1.3 KiB
Bash

# Template file for 'libcgroup'
pkgname=libcgroup
version=0.41
revision=8
build_style=gnu-configure
configure_args="--sbindir=/usr/bin --enable-pam-module-dir=/usr/lib/security"
hostmakedepends="flex automake libtool"
makedepends="pam-devel"
short_desc="Library that abstracts the control group file system in Linux"
maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-2.1"
homepage="http://libcg.sourceforge.net"
distfiles="${SOURCEFORGE_SITE}/libcg/${pkgname}-${version}.tar.bz2"
checksum=e4e38bdc7ef70645ce33740ddcca051248d56b53283c0dc6d404e17706f6fb51
case "$XBPS_TARGET_MACHINE" in
*-musl) # Add musl-fts implementation
makedepends+=" musl-fts-devel"
LDFLAGS="-lfts"
;;
esac
pre_configure() {
autoreconf -if
}
post_configure() {
# Disable tests
sed -i Makefile -e "/SUBDIRS =/ s; tests;;"
}
libcgroup-utils_package() {
short_desc+=" - utilities"
conf_files="/etc/cgrules.conf /etc/cgconfig.conf"
system_groups="cgred"
pkg_install() {
vmove usr/bin
vmove usr/share/man
vconf samples/cgrules.conf
vconf samples/cgconfig.conf
vsv cgred
}
}
libcgroup-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
}
}