diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2009-05-30 20:39:07 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2009-05-30 20:39:07 +0200 |
commit | ba3359722cbf8aa7b0ed39e1f81d1d74ec88fecd (patch) | |
tree | 10c726d162bc0ded85eb7aeacf8f246bd39ad63a /package/dhcp-forwarder | |
parent | bbd610f15a71b27c955175cb98392b114717fd47 (diff) |
optimize ipkg package management
- generate ipkg control file from PKG_* variables
- automatically install init scripts from ./files/*.init
set #PKG pkgname to set the binary package
- rename FWINIT -> INIT
- move postinst and conffiles meta data to ./files
- update the packages to the latest upstream version
- remove some unready or unused package (strongswan,..)
more cleanups needed after allmodconfig
Diffstat (limited to 'package/dhcp-forwarder')
-rw-r--r-- | package/dhcp-forwarder/Makefile | 20 | ||||
-rw-r--r-- | package/dhcp-forwarder/files/dhcp-forwarder.conffiles (renamed from package/dhcp-forwarder/ipkg/dhcp-forwarder.conffiles) | 0 | ||||
-rw-r--r-- | package/dhcp-forwarder/files/dhcp-forwarder.postinst (renamed from package/dhcp-forwarder/ipkg/dhcp-forwarder.postinst) | 0 | ||||
-rw-r--r-- | package/dhcp-forwarder/files/dhcp-fwd.init | 3 | ||||
-rw-r--r-- | package/dhcp-forwarder/ipkg/dhcp-forwarder.control | 4 | ||||
-rw-r--r-- | package/dhcp-forwarder/patches/00-big_endian.patch | 11 | ||||
-rw-r--r-- | package/dhcp-forwarder/patches/01-getpwnmam_getgrnam.patch | 35 |
7 files changed, 12 insertions, 61 deletions
diff --git a/package/dhcp-forwarder/Makefile b/package/dhcp-forwarder/Makefile index e0aa1dc6a..02d6b2ca5 100644 --- a/package/dhcp-forwarder/Makefile +++ b/package/dhcp-forwarder/Makefile @@ -6,30 +6,30 @@ include ${TOPDIR}/rules.mk PKG_NAME:= dhcp-forwarder -PKG_VERSION:= 0.7 -PKG_RELEASE:= 12 -PKG_MD5SUM:= e7f876e615ebc3f96418f6477b4451e2 +PKG_VERSION:= 0.8 +PKG_RELEASE:= 1 +PKG_MD5SUM:= fb3670dee9f71af1e55ac5dcd64e213e +PKG_DESCR:= DHCP relay agent +PKG_SECTION:= net +PKG_URL:= http://www.nongnu.org/dhcp-fwd +PKG_SITES:= http://savannah.nongnu.org/download/dhcp-fwd/ + DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2 -MASTER_SITES:= http://savannah.nongnu.org/download/dhcp-fwd/ include ${TOPDIR}/mk/package.mk -$(eval $(call PKG_template,DHCP_FORWARDER,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE})) +$(eval $(call PKG_template,DHCP_FORWARDER,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) CONFIGURE_STYLE= gnu -CONFIGURE_ENV+= ac_cv_func_malloc_0_nonnull="yes" CONFIGURE_ARGS+= --disable-dietlibc BUILD_STYLE= auto INSTALL_STYLE= auto XAKE_FLAGS+= cfg_filename="/etc/dhcp-fwd.conf" post-install: - ${INSTALL_DIR} ${IDIR_DHCP_FORWARDER}/etc/init.d - ${INSTALL_DIR} ${IDIR_DHCP_FORWARDER}/usr/sbin + ${INSTALL_DIR} ${IDIR_DHCP_FORWARDER}/usr/sbin ${IDIR_DHCP_FORWARDER}/etc ${INSTALL_DATA} ${WRKBUILD}/contrib/dhcp-fwd.conf \ ${IDIR_DHCP_FORWARDER}/etc/ - ${INSTALL_BIN} ./files/dhcp-fwd.init \ - ${IDIR_DHCP_FORWARDER}/etc/init.d/dhcp-fwd ${INSTALL_BIN} ${WRKINST}/usr/sbin/dhcp-fwd \ ${IDIR_DHCP_FORWARDER}/usr/sbin/ diff --git a/package/dhcp-forwarder/ipkg/dhcp-forwarder.conffiles b/package/dhcp-forwarder/files/dhcp-forwarder.conffiles index 70be85a8a..70be85a8a 100644 --- a/package/dhcp-forwarder/ipkg/dhcp-forwarder.conffiles +++ b/package/dhcp-forwarder/files/dhcp-forwarder.conffiles diff --git a/package/dhcp-forwarder/ipkg/dhcp-forwarder.postinst b/package/dhcp-forwarder/files/dhcp-forwarder.postinst index 9ba16f5b0..9ba16f5b0 100644 --- a/package/dhcp-forwarder/ipkg/dhcp-forwarder.postinst +++ b/package/dhcp-forwarder/files/dhcp-forwarder.postinst diff --git a/package/dhcp-forwarder/files/dhcp-fwd.init b/package/dhcp-forwarder/files/dhcp-fwd.init index 1481095fe..70d499aba 100644 --- a/package/dhcp-forwarder/files/dhcp-fwd.init +++ b/package/dhcp-forwarder/files/dhcp-fwd.init @@ -1,5 +1,6 @@ #!/bin/sh -#FWINIT 80 +#PKG dhcp-forwarder +#INIT 80 . /etc/rc.conf case $1 in diff --git a/package/dhcp-forwarder/ipkg/dhcp-forwarder.control b/package/dhcp-forwarder/ipkg/dhcp-forwarder.control deleted file mode 100644 index 9958ddb39..000000000 --- a/package/dhcp-forwarder/ipkg/dhcp-forwarder.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: dhcp-forwarder -Priority: optional -Section: net -Description: a DHCP relay agent diff --git a/package/dhcp-forwarder/patches/00-big_endian.patch b/package/dhcp-forwarder/patches/00-big_endian.patch deleted file mode 100644 index add157d3f..000000000 --- a/package/dhcp-forwarder/patches/00-big_endian.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- dhcp-forwarder-0.7/src/dhcp.h 2004-06-22 03:46:56.000000000 -0700 -+++ dhcp-forwarder-0.7-x/src/dhcp.h 2005-10-06 17:04:14.000000000 -0700 -@@ -89,7 +89,7 @@ - optDHCP_COOKIE = 0x63538263u, - flgDHCP_BCAST = 0x0080u - #else -- DHCP_COOKIE = 0x63825363u, -+ optDHCP_COOKIE = 0x63825363u, - flgDHCP_BCAST = 0x8000u - #endif - }; diff --git a/package/dhcp-forwarder/patches/01-getpwnmam_getgrnam.patch b/package/dhcp-forwarder/patches/01-getpwnmam_getgrnam.patch deleted file mode 100644 index ef8491330..000000000 --- a/package/dhcp-forwarder/patches/01-getpwnmam_getgrnam.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff -pur dhcp-forwarder-0.7-orig/src/wrappers.h dhcp-forwarder-0.7-patched/src/wrappers.h ---- dhcp-forwarder-0.7-orig/src/wrappers.h 2004-06-22 12:46:56.000000000 +0200 -+++ dhcp-forwarder-0.7-patched/src/wrappers.h 2005-12-27 12:28:10.464289435 +0100 -@@ -65,7 +65,14 @@ Egetgrnam(char const *name) - /*@*/ - { - /*@observer@*/struct group const *res = getgrnam(name); -- FatalErrnoError(res==0, 1, "getgrnam()"); -+ -+ FatalErrnoError((res == NULL) && (errno != 0), 1, "getgrnam()"); -+ -+ if (res == NULL) -+ { -+ fprintf (stderr, "No such group: `%s'\n", name); -+ exit (1); -+ } - - /*@-freshtrans@*/ - /*@-mustfreefresh@*/ -@@ -80,7 +87,14 @@ Egetpwnam(char const *name) - /*@*/ - { - struct passwd const *res = getpwnam(name); -- FatalErrnoError(res==0, 1, "getpwnam()"); -+ -+ FatalErrnoError((res == NULL) && (errno != 0), 1, "getpwnam()"); -+ -+ if (res == NULL) -+ { -+ fprintf (stderr, "No such user: `%s'\n", name); -+ exit (1); -+ } - - return res; - } |