void-packages/srcpkgs/dhcp/template

57 lines
1.9 KiB
Bash
Raw Normal View History

2015-03-28 18:55:09 +01:00
# Template file for 'dhcp'
pkgname=dhcp
2016-03-31 13:36:43 +02:00
_version=4.3.4
version=${_version//-/.}
2016-03-31 13:47:53 +02:00
revision=4
2016-03-31 13:36:43 +02:00
wrksrc="dhcp-${_version}"
2015-03-28 18:55:09 +01:00
build_style=gnu-configure
2016-01-11 20:20:32 +01:00
disable_parallel_build=yes
2015-03-28 18:55:09 +01:00
hostmakedepends="perl"
2015-05-13 09:33:48 +02:00
conf_files="/etc/dhcpd.conf"
2015-03-28 18:55:09 +01:00
short_desc="Server from the Internet Software Consortium's implementation of DHCP"
maintainer="Enno Boland <gottox@voidlinux.eu>"
2015-03-28 18:55:09 +01:00
license="ISC"
homepage="https://www.isc.org/software/dhcp"
2016-03-31 13:36:43 +02:00
distfiles="http://ftp.isc.org/isc/dhcp/${_version}/dhcp-${_version}.tar.gz"
checksum=f5115aee3dd3e6925de4ba47b80ab732ba48b481c8364b6ebade2d43698d607e
pre_configure() {
2015-06-02 11:00:24 +02:00
local _args=" --sbindir=/usr/bin --enable-paranoia
2015-05-13 09:33:48 +02:00
--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
2016-03-31 13:47:53 +02:00
--with-cli6-lease-file=/var/lib/dhclient/dhclient6.leases
--with-randomdev=/dev/random"
2015-05-26 13:31:08 +02:00
local cargs="$(echo $configure_args | tr '\n' ' ')"
2015-05-13 09:33:48 +02:00
2015-03-28 20:03:44 +01:00
# patching bind Makefile to patch with a cross fix while building (WTF?!)
2016-01-11 20:20:32 +01:00
sed -i "s#./configure#patch -p0 < $FILESDIR/003_cross_fix.patch \&\& ./configure --with-randomdev=/dev/random $cargs#" bind/Makefile.in
# set real configure_args
2015-05-13 09:33:48 +02:00
export configure_args+="${_args}"
}
2015-03-28 18:55:09 +01:00
post_install() {
2015-05-13 09:33:48 +02:00
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
2015-03-28 18:55:09 +01:00
vsv dhcpd4
vsv dhcpd6
2015-03-29 09:10:46 +02:00
# Remove development stuff, useless...
rm -rf ${DESTDIR}/usr/include ${DESTDIR}/usr/lib ${DESTDIR}/usr/share/man/man3
2016-02-11 06:08:34 +01:00
vlicense LICENSE
2015-03-28 18:55:09 +01:00
}
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"
2015-03-28 18:55:09 +01:00
pkg_install() {
vmove etc/dhclient.conf
2015-06-02 11:00:24 +02:00
vmove usr/bin/dhclient
2015-03-28 18:55:09 +01:00
vmove usr/share/man/man5/dhclient*
vmove usr/share/man/man8/dhclient*
2015-06-02 11:00:24 +02:00
vbin client/scripts/linux dhclient-script
2015-03-28 18:55:09 +01:00
vsv dhclient
}
}