void-packages/srcpkgs/dhcp/template

47 lines
1.5 KiB
Bash

# Template file for 'dhcp'
pkgname=dhcp
version=4.2.3
revision=4
build_style=gnu-configure
hostmakedepends="perl"
short_desc="Server from the Internet Software Consortium's implementation of DHCP"
maintainer="Enno Boland <eb@s01.de>"
license="ISC"
homepage="https://www.isc.org/software/dhcp"
distfiles="ftp://ftp.isc.org/isc/${pkgname}/${pkgname}-${version}/${pkgname}-${version}.tar.gz"
checksum=505c5754526ba92669bfd64daa8b529c6694c4528b45c3f35743c6fd4bd72897
conf_files="/etc/dhcpd.conf"
_configure_args+=" --enable-paranoia
--with-srv-lease-file=/var/lib/dhcp/dhcpd.leases
--with-srv6-lease-file=/var/lib/dhcp/dhcpd6.leases
--with-cli-lease-file=/var/lib/dhclient/dhclient.leases
--with-cli6-lease-file=/var/lib/dhclient/dhclient6.leases"
pre_configure() {
# patching bind Makefile to patch with a cross fix while building (WTF?!)
sed -i "s#./configure#patch -p0 < $FILESDIR/003_cross_fix.patch \&\& ac_cv_file__dev_random=yes ./configure $configure_args#" bind/Makefile
# set real configure_args
configure_args+="$_configure_args"
}
post_install() {
sed -i "s/^/#/" $DESTDIR/etc/dhclient.conf $DESTDIR/etc/dhcpd.conf
vsv dhcpd4
vsv dhcpd6
# Remove development stuff, useless...
rm -rf ${DESTDIR}/usr/include ${DESTDIR}/usr/lib ${DESTDIR}/usr/share/man/man3
}
dhclient_package() {
short_desc="Client from the Internet Software Consortium's implementation of DHCP"
conf_files="/etc/dhclient.conf"
pkg_install() {
vmove etc/dhclient.conf
vmove usr/sbin/dhclient
vmove usr/share/man/man5/dhclient*
vmove usr/share/man/man8/dhclient*
vsv dhclient
}
}