From: Roy Marples Date: Wed, 15 Jul 2009 09:36:43 +0000 (+0000) Subject: Add import target for easy import into NetBSD X-Git-Tag: v5.1.0~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5bbd4fa243852ccd185381394f1efdec29944ed6;p=thirdparty%2Fdhcpcd.git Add import target for easy import into NetBSD --- diff --git a/Makefile b/Makefile index f2177a15..946d195b 100644 --- a/Makefile +++ b/Makefile @@ -50,12 +50,13 @@ DISTFILE?= ${DISTPREFIX}.tar.bz2 CLEANFILES+= *.tar.bz2 +.PHONY: import import-bsd + .SUFFIXES: .in .in: ${SED} ${SED_DBDIR} ${SED_HOOKDIR} ${SED_SCRIPT} ${SED_SYS} $< > $@ - all: ${PROG} ${SCRIPTS} ${MAN5} ${MAN8} .c.o: @@ -98,4 +99,16 @@ clean: dist: git archive --prefix=${DISTPREFIX}/ ${GITREF} | bzip2 > ${DISTFILE} +import-bsd: + rm -rf /tmp/${DISTPREFIX} + ${INSTALL} -d /tmp/${DISTPREFIX} + cp ${SRCS} *.in /tmp/${DISTPREFIX} + cp $$(${CC} ${LDFLAGS} -o $@ ${OBJS} ${LDADD} | \ + sed -e 's/^.*c //g' -e 's/\\//g' .depend | \ + tr ' ' '\n' | \ + sort -u) /tmp/${DISTPREFIX} + cd dhcpcd-hooks; ${MAKE} DISTPREFIX=${DISTPREFIX} $@ + +import: import-bsd + include Makefile.inc diff --git a/configure b/configure index 885cc555..b3a24238 100755 --- a/configure +++ b/configure @@ -50,11 +50,20 @@ echo "/* $PLATFORM */" >$CONFIG_H echo "Configuring dhcpcd for ... $PLATFORM" -for x in SYSCONFDIR SBINDIR LIBNAME LIBEXECDIR DBDIR RUNDIR MANDIR; do +for x in SYSCONFDIR SBINDIR LIBEXECDIR DBDIR RUNDIR; do + # Make files look nice for import + l=$((10 - ${#x})) + if [ $l -gt 2 ]; then + t=" " + else + t= + fi eval v=\$$x - echo "$x= $v" >>$CONFIG_MK - echo "#define $x \"$v\"" >>$CONFIG_H + echo "$x=$t $v" >>$CONFIG_MK + echo "#define $x$t \"$v\"" >>$CONFIG_H done +echo "LIBNAME= $LIBNAME" >>$CONFIG_MK +echo "MANDIR= $MANDIR" >>$CONFIG_MK if [ "$CC" != cc ]; then echo "Using compiler $CC" @@ -108,7 +117,7 @@ esac LDELF=/libexec/ld.elf_so if [ -e "$LDELF" ]; then echo "Linking against $LDELF" - echo "LDFLAGS+= -Wl,-dynamic-linker=$LDELF" >>$CONFIG_MK + echo "LDFLAGS+= -Wl,-dynamic-linker=$LDELF" >>$CONFIG_MK fi printf "Testing for arc4random support ... " diff --git a/defs.h b/defs.h index e97aef14..08524ddd 100644 --- a/defs.h +++ b/defs.h @@ -30,23 +30,6 @@ #define PACKAGE "dhcpcd" #define VERSION "5.0.6" -/* Some systems do not have a working fork. */ -/* #define THERE_IS_NO_FORK */ - -/* Paths to things */ -#ifndef SYSCONFDIR -# define SYSCONFDIR "/etc" -#endif -#ifndef LIBEXECDIR -# define LIBEXECDIR "/libexec" -#endif -#ifndef RUNDIR -# define RUNDIR "/var/run" -#endif -#ifndef DBDIR -# define DBDIR "/var/db" -#endif - #ifndef CONFIG # define CONFIG SYSCONFDIR "/" PACKAGE ".conf" #endif diff --git a/dhcpcd-hooks/Makefile b/dhcpcd-hooks/Makefile index a8ed21fb..4a48a306 100644 --- a/dhcpcd-hooks/Makefile +++ b/dhcpcd-hooks/Makefile @@ -12,3 +12,6 @@ install: ${INSTALL} -d ${DESTDIR}${SCRIPTSDIR} ${INSTALL} -m ${NONBINMODE} ${SCRIPTS} ${DESTDIR}${SCRIPTSDIR} +import-bsd: + ${INSTALL} -d /tmp/${DISTPREFIX}/dhcpcd-hooks + cp ${SCRIPTS} 50-ntp.conf /tmp/${DISTPREFIX}/dhcpcd-hooks