void-packages/srcpkgs/miniupnpd/template

38 lines
1.1 KiB
Bash

# Template file for 'miniupnpd'
pkgname=miniupnpd
version=2.1
revision=3
build_style=gnu-makefile
make_cmd="make -f Makefile.linux"
make_install_args="PREFIX= SBININSTALLDIR=/usr/bin"
conf_files="
/etc/miniupnpd/*.conf
/etc/miniupnpd/*.sh"
hostmakedepends="pkg-config"
makedepends="libnfnetlink-devel iptables-devel libressl-devel"
short_desc="Lightweight UPnP IGD daemon"
maintainer="Duncaen <duncaen@voidlinux.org>"
license="BSD-3-Clause"
homepage="http://miniupnp.free.fr"
distfiles="http://miniupnp.free.fr/files/miniupnpd-${version}.tar.gz"
checksum=950894779661197fe093855fda29a728f434b5756eb4fa6cb5f7b9bff7ffe0c1
do_configure() {
sed -i ${wrksrc}/genconfig.sh \
-e 's|LSB_RELEASE=.*|LSB_RELEASE=$(false)|g' \
-e '\|/sbin/sysctl|d'
${make_cmd} CONFIG_OPTIONS="--ipv6 --igd2 --leasefile" config.h
sed -i ${wrksrc}/config.h \
-e 's|^#define OS_URL.*$|#define OS_URL "http://voidlinux.org/"|g' \
-e 's|^#define OS_NAME.*$|#define OS_NAME "Void"|g' \
-e 's|^#define OS_VERSION.*$|#define OS_VERSION "Void"|g'
}
post_install() {
rm -rf ${DESTDIR}/etc/init.d
vsv miniupnpd
vlicense LICENSE
}