57 lines
2.0 KiB
Bash
57 lines
2.0 KiB
Bash
# Template file for 'dhcp'
|
|
pkgname=dhcp
|
|
_distver=4.3.3
|
|
_patchver=P1
|
|
version=${_distver}.${_patchver}
|
|
revision=3
|
|
wrksrc="dhcp-${_distver}-${_patchver}"
|
|
build_style=gnu-configure
|
|
disable_parallel_build=yes
|
|
hostmakedepends="perl"
|
|
conf_files="/etc/dhcpd.conf"
|
|
short_desc="Server from the Internet Software Consortium's implementation of DHCP"
|
|
maintainer="Enno Boland <gottox@voidlinux.eu>"
|
|
license="ISC"
|
|
homepage="https://www.isc.org/software/dhcp"
|
|
distfiles="http://ftp.isc.org/isc/dhcp/${_distver}-${_patchver}/dhcp-${_distver}-${_patchver}.tar.gz"
|
|
checksum=c11e896dffa1bfbc49462965d3f6dec45534e34068603546d9a236f2aa669921
|
|
|
|
pre_configure() {
|
|
local _args=" --sbindir=/usr/bin --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"
|
|
local cargs="$(echo $configure_args | tr '\n' ' ')"
|
|
|
|
# patching bind Makefile to patch with a cross fix while building (WTF?!)
|
|
sed -i "s#./configure#patch -p0 < $FILESDIR/003_cross_fix.patch \&\& ./configure --with-randomdev=/dev/random $cargs#" bind/Makefile.in
|
|
|
|
# set real configure_args
|
|
export configure_args+="${_args}"
|
|
}
|
|
post_install() {
|
|
mv ${DESTDIR}/etc/dhclient.conf.example ${DESTDIR}/etc/dhclient.conf
|
|
mv ${DESTDIR}/etc/dhcpd.conf.example ${DESTDIR}/etc/dhcpd.conf
|
|
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
|
|
vlicense LICENSE
|
|
}
|
|
|
|
dhclient_package() {
|
|
short_desc="Client from the Internet Software Consortium's implementation of DHCP"
|
|
conf_files="/etc/dhclient.conf"
|
|
make_dirs="/var/lib/dhclient 0755 root root"
|
|
pkg_install() {
|
|
vmove etc/dhclient.conf
|
|
vmove usr/bin/dhclient
|
|
vmove usr/share/man/man5/dhclient*
|
|
vmove usr/share/man/man8/dhclient*
|
|
vbin client/scripts/linux dhclient-script
|
|
vsv dhclient
|
|
}
|
|
}
|