Modified dhcpcd x3

This commit is contained in:
Mike Staszel 2009-09-26 13:58:38 -05:00
parent c22b734a25
commit ad4e727e8c
2 changed files with 55 additions and 10 deletions

49
core/dhcpcd/Makefile Normal file
View file

@ -0,0 +1,49 @@
# Makefile based on BSD make.
# Our mk stubs also work with GNU make.
# Copyright (c) 2008 Roy Marples <roy@marples.name>
PROG= dhcpcd
SRCS= arp.c bind.c common.c control.c dhcp.c dhcpcd.c duid.c eloop.c
SRCS+= if-options.c if-pref.c ipv4ll.c net.c signals.c
SRCS+= configure.c
SRCS+= ${SRC_IF} ${SRC_PF}
LIBEXECDIR?= ${PREFIX}/opt/lib/dhcpcd/
SCRIPT= ${LIBEXECDIR}/dhcpcd-run-hooks
HOOKDIR= ${LIBEXECDIR}/dhcpcd-hooks
BINDIR= ${PREFIX}/sbin
DBDIR?= /opt/var/db
SYSCONFDIR?= ${PREFIX}/opt/etc
MAN= dhcpcd.conf.5 dhcpcd.8 dhcpcd-run-hooks.8
CLEANFILES= dhcpcd.conf.5 dhcpcd.8 dhcpcd-run-hooks.8
SCRIPTS= dhcpcd-run-hooks
SCRIPTSDIR= ${LIBEXECDIR}
CLEANFILES+= dhcpcd-run-hooks
FILES= dhcpcd.conf
FILESDIR= ${SYSCONFDIR}
CPPFLAGS+= -DDBDIR=\"${DBDIR}\"
CPPFLAGS+= -DSCRIPT=\"${SCRIPT}\"
CPPFLAGS+= -DSYSCONFDIR=\"${SYSCONFDIR}\"
LDADD+= ${LIBRT}
SUBDIRS= dhcpcd-hooks
.SUFFIXES: .in
SED_DBDIR= -e 's:@DBDIR@:${DBDIR}:g'
SED_HOOKDIR= -e 's:@HOOKDIR@:${HOOKDIR}:g'
SED_SCRIPT= -e 's:@SCRIPT@:${SCRIPT}:g'
SED_SYS= -e 's:@SYSCONFDIR@:${SYSCONFDIR}:g'
.in:
${SED} ${SED_DBDIR} ${SED_HOOKDIR} ${SED_SCRIPT} ${SED_SYS} $< > $@
MK= mk
include ${MK}/sys.mk
include ${MK}/os.mk
include ${MK}/prog.mk

View file

@ -15,22 +15,18 @@ depends=()
backup=('opt/etc/conf.d/dhcpcd' 'opt/etc/dhcpcd.conf')
options=('emptydirs')
source=("http://roy.marples.name/downloads/$pkgname/$pkgname-$pkgver.tar.bz2" \
'dhcpcd.conf.d')
'dhcpcd.conf.d'
'Makefile')
md5sums=('0b920a8094ee3a8c16c973794561feef'
'372d33485556982b64a97f301e17c5dd')
'372d33485556982b64a97f301e17c5dd'
'cc4f85ea0a4a59444c511d383792c813')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
# Fix Installation Locations
# export PREFIX=/opt
sed -i 's/\/etc/\/opt/etc/' Makefile || return 1
sed -i 's/\/db/\/opt/lib/dhcpcd/' Makefile || return 1
sed -i 's/\/libexec/\/opt/lib/dhcpcd/' Makefile || return 1
sed -i 's/\/libexec/\/opt/lib/dhcpcd/' dhcpcd-hooks/Makefile || return 1
sed -i 's/\/sbin/\/opt/sbin/' Makefile || return 1
# Build
rm Makefile
cp $srcdir/Makefile .
make || return 1
make DESTDIR=${pkgdir} install || return 1