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

74 lines
2.1 KiB
Bash

# Template file for 'kea'
pkgname=kea
version=1.9.5
revision=2
build_style=gnu-configure
configure_args="--enable-generate-docs --with-openssl=${XBPS_CROSS_BASE}/usr
$(vopt_if mysql --with-mysql)
$(vopt_if pgsql --with-pgsql=${XBPS_CROSS_BASE}/usr/bin/pg_config.sh)"
hostmakedepends="flex bison perl pkg-config automake libtool
doxygen elinks libxslt docbook-xsl python3-Sphinx python3-sphinx_rtd_theme"
makedepends="boost-devel log4cplus-devel python3-devel
$(vopt_if botan botan-devel openssl-devel)
$(vopt_if mysql libmariadbclient-devel)
$(vopt_if pgsql postgresql-libs-devel)"
depends="libkea>=0"
checkdepends="procps-ng" #needs pgrep
conf_files="/etc/kea/*.conf"
short_desc="Next generation DHCPv4/v6 server"
maintainer="Orphaned <orphan@voidlinux.org>"
license="MPL-2.0, Apache-2.0"
homepage="https://kea.isc.org"
distfiles="http://ftp.isc.org/isc/kea/${version/.P/-P}/kea-${version/.P/-P}.tar.gz"
checksum=324a06f488645bee587e49a45d491b525f53417c56b219f1cb37461fdefd9d91
build_options="botan mysql pgsql"
desc_option_botan="With Botan SSL support"
desc_option_mysql="With MySQL lease information database"
desc_option_pgsql="With PostgreSQL lease information database"
build_options_default="pgsql"
# Reduce log spamming for deprecated auto_ptr
CXXFLAGS="-Wno-deprecated-declarations -O2"
make_dirs="/var/kea 755 root root"
pre_configure() {
autoreconf -fi
}
post_install() {
vsv kea-dhcp4
vsv kea-dhcp6
vsv kea-dhcp-ddns
# We don't have the MPL-2.0 standard license
vlicense COPYING
# Since sv is used to control the kea servers,
# keactrl and its config file is useless for us
rm ${DESTDIR}/usr/bin/keactrl
rm ${DESTDIR}/etc/kea/keactrl.conf
rm ${DESTDIR}/usr/bin/kea-ctrl-agent
# Modify the logging output to stdout
sed -i ${DESTDIR}/etc/kea/*.conf \
-e 's;"output": "/var/log/.*";"output": "stdout";'
}
libkea_package() {
short_desc+=" - libraries"
pkg_install() {
vmove "usr/lib/*.so.*"
}
}
libkea-devel_package() {
short_desc+=" - development files"
depends="${makedepends} libkea>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
}
}