mirror of
https://github.com/rsmarples/dhcpcd.git
synced 2024-11-23 18:14:09 +08:00
Installing to FHS dirs just for Linux is silly, especially as GNU autotools don't by default. With installing to the same dirs regardless of OS it also makes my life easier.
This commit is contained in:
parent
a06bed27a5
commit
b604c3de5b
8
Makefile
8
Makefile
@ -7,9 +7,9 @@ SRCS= common.c dhcp.c dhcpcd.c logger.c net.c signals.c
|
||||
SRCS+= configure.c client.c
|
||||
SRCS+= ${SRC_IF} ${SRC_PF}
|
||||
|
||||
SCRIPTDIR= ${PREFIX}/libexec
|
||||
SCRIPT= ${SCRIPTDIR}/dhcpcd.sh
|
||||
HOOKDIR= ${SCRIPTDIR}/dhcpcd.hook.d
|
||||
LIBEXECDIR= ${PREFIX}/libexec
|
||||
SCRIPT= ${LIBEXECDIR}/dhcpcd.sh
|
||||
HOOKDIR= ${LIBEXECDIR}/dhcpcd.hook.d
|
||||
|
||||
BINDIR= ${PREFIX}/sbin
|
||||
DBDIR= /var/db
|
||||
@ -19,7 +19,7 @@ MAN= dhcpcd.conf.5 dhcpcd.8 dhcpcd.sh.8
|
||||
CLEANFILES= dhcpcd.conf.5 dhcpcd.8 dhcpcd.sh.8
|
||||
|
||||
SCRIPTS= dhcpcd.sh
|
||||
SCRIPTSDIR= ${SCRIPTDIR}
|
||||
SCRIPTSDIR= ${LIBEXECDIR}
|
||||
CLEANFILES+= dhcpcd.sh
|
||||
|
||||
FILES= dhcpcd.conf
|
||||
|
10
README
10
README
@ -15,12 +15,14 @@ If you're cross compiling you may need to set the below knobs to avoid
|
||||
automatic tests.
|
||||
OS=BSD | Linux
|
||||
|
||||
You can change the default dir where dhcpcd stores it's .lease files with
|
||||
DBDIR=/var/db
|
||||
|
||||
If you're building for a NOMMU system where fork() does not work, you should
|
||||
add -DTHERE_IS_NO_FORK to your CFLAGS.
|
||||
|
||||
You can change the default dir with these knobs.
|
||||
For example, to satisfy FHS compliance you would do this:-
|
||||
LIBEXECDIR=/lib/dhcpcd
|
||||
DBDIR=/var/lib/dhcpcd
|
||||
|
||||
We now default to using -std=c99. For 64-bit linux, this always works, but
|
||||
for 32-bit linux it requires either gnu99 or a patch to asm/types.h.
|
||||
Most distros patch linux headers so this should work fine.
|
||||
@ -40,7 +42,7 @@ make HOOKSCRIPTS=50-ntp.sh install
|
||||
Compatibility
|
||||
-------------
|
||||
If you require compatibility with dhcpcd-3 and older style variables,
|
||||
you can install 50-dhcpcd-compat.sh into the directory /libexec/dhcpcd.hook.d
|
||||
you can install 50-dhcpcd-compat.sh into the directory $LIBEXECDIR/dhcpcd.hook.d
|
||||
We don't install this by default.
|
||||
You should also add -DCMDLINE_COMPAT to your CFLAGS if you need to be fully
|
||||
commandline compatible with prior versions.
|
||||
|
@ -7,11 +7,9 @@ SRC_IF= if-linux.c
|
||||
CPPFLAGS+= -D_BSD_SOURCE -D_XOPEN_SOURCE=600
|
||||
LIBRT= -lrt
|
||||
|
||||
# Satisfy FHS
|
||||
DBDIR= /var/lib/dhcpcd
|
||||
SCRIPTDIR= ${PREFIX}/lib/dhcpcd
|
||||
|
||||
# Work out if our fork() works or not
|
||||
# Work out if our fork() works or not.
|
||||
# If cross-compiling, you'll need to set HAVE_FORK to yes or no depending
|
||||
# on your target arch.
|
||||
_HAVE_FORK_SH= if test "${HAVE_FORK}" = "yes"; then \
|
||||
echo ""; \
|
||||
elif test -n "${HAVE_FORK}"; then \
|
||||
|
Loading…
Reference in New Issue
Block a user