dhcp: fix crossbuild

Who the hell build such a fucked up buildsystem?
This commit is contained in:
Enno Boland 2015-03-28 19:55:16 +01:00
parent fbde12f5f6
commit d030013319
2 changed files with 28 additions and 4 deletions

View file

@ -0,0 +1,12 @@
--- lib/export/dns/Makefile.in.orig 2011-05-17 01:47:16.000000000 +0200
+++ lib/export/dns/Makefile.in 2015-03-28 19:34:39.143820772 +0100
@@ -166,7 +166,8 @@ code.h: gen
./gen -s ${srcdir} > code.h
gen: ${srcdir}/gen.c
- ${CC} ${ALL_CFLAGS} ${LDFLAGS} -o $@ ${srcdir}/gen.c ${LIBS}
+ ${BUILD_CC} ${BUILD_CFLAGS} -I${top_srcdir}/lib/isc/include \
+ ${BUILD_CPPFLAGS} ${BUILD_LDFLAGS} -o $@ ${srcdir}/gen.c ${BUILD_LIBS}
#We don't need rbtdb64 for this library
#rbtdb64.@O@: rbtdb.c

View file

@ -10,13 +10,25 @@ license="ISC"
homepage="https://www.isc.org/software/dhcp"
distfiles="ftp://ftp.isc.org/isc/${pkgname}/${pkgname}-${version}/${pkgname}-${version}.tar.gz"
checksum=505c5754526ba92669bfd64daa8b529c6694c4528b45c3f35743c6fd4bd72897
configure_args="
--enable-paranoia
conf_files="/etc/dhcpd.conf"
_configure_args+="--sbindir=/usr/bin --sysconfdir=/etc --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"
conf_files="/etc/dhcpd.conf"
pre_configure() {
if [ "$CROSS_BUILD" ]; then
# assume that there is /dev/random. Fixes cross compiling
sed -i "2i\ac_cv_file__dev_random=yes" 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
fi
# set real configure_args
configure_args+="$_configure_args"
}
post_install() {
vsv dhcpd4
@ -28,7 +40,7 @@ dhclient_package() {
conf_files="/etc/dhclient.conf"
pkg_install() {
vmove etc/dhclient.conf
vmove usr/sbin/dhclient
vmove usr/bin/dhclient
vmove usr/share/man/man5/dhclient*
vmove usr/share/man/man8/dhclient*
vsv dhclient