From bfb1e1e9f1d942b27a11e5825e0bbe3ca01614fe Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Sat, 31 May 2008 07:28:12 +0000 Subject: package: ifplugd package --- package/ifplugd/Config.in | 12 ++++++++++++ package/ifplugd/ifplugd-cross.patch | 17 +++++++++++++++++ package/ifplugd/ifplugd-fix-headers.patch | 24 ++++++++++++++++++++++++ package/ifplugd/ifplugd.mk | 29 +++++++++++++++++++++++++++++ 4 files changed, 82 insertions(+) create mode 100644 package/ifplugd/Config.in create mode 100644 package/ifplugd/ifplugd-cross.patch create mode 100644 package/ifplugd/ifplugd-fix-headers.patch create mode 100644 package/ifplugd/ifplugd.mk (limited to 'package/ifplugd') diff --git a/package/ifplugd/Config.in b/package/ifplugd/Config.in new file mode 100644 index 000000000..cfa522b32 --- /dev/null +++ b/package/ifplugd/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_IFPLUGD + bool "ifplugd" + default n + select BR2_PACKAGE_LIBDAEMON + help + Ifplugd is a daemon which will automatically configure your + ethernet device when a cable is plugged in and automatically + de-configure it if the cable is pulled out. This is useful + on laptops with onboard network adapters, since it will only + configure the interface when a cable is really connected. + + http://0pointer.de/lennart/projects/ifplugd/ diff --git a/package/ifplugd/ifplugd-cross.patch b/package/ifplugd/ifplugd-cross.patch new file mode 100644 index 000000000..621723814 --- /dev/null +++ b/package/ifplugd/ifplugd-cross.patch @@ -0,0 +1,17 @@ +--- + configure | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: ifplugd-0.28/configure +=================================================================== +--- ifplugd-0.28.orig/configure ++++ ifplugd-0.28/configure +@@ -5430,7 +5430,7 @@ + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test "$cross_compiling" = yes; then +- ac_cv_func_malloc_0_nonnull=no ++ ac_cv_func_malloc_0_nonnull=yes + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ diff --git a/package/ifplugd/ifplugd-fix-headers.patch b/package/ifplugd/ifplugd-fix-headers.patch new file mode 100644 index 000000000..06372a26a --- /dev/null +++ b/package/ifplugd/ifplugd-fix-headers.patch @@ -0,0 +1,24 @@ +--- + src/interface.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: ifplugd-0.28/src/interface.c +=================================================================== +--- ifplugd-0.28.orig/src/interface.c ++++ ifplugd-0.28/src/interface.c +@@ -23,7 +23,6 @@ + #endif + + #include +-#include + #include + #include + #include +@@ -32,6 +31,7 @@ + #include + #include + #include ++#include + #include + #include + #include diff --git a/package/ifplugd/ifplugd.mk b/package/ifplugd/ifplugd.mk new file mode 100644 index 000000000..204bad7dc --- /dev/null +++ b/package/ifplugd/ifplugd.mk @@ -0,0 +1,29 @@ +############################################################# +# +# ifplugd +# +############################################################# +IFPLUGD_VERSION = 0.28 +IFPLUGD_SOURCE = ifplugd-$(IFPLUGD_VERSION).tar.gz +IFPLUGD_SITE = http://0pointer.de/lennart/projects/ifplugd/ +IFPLUGD_AUTORECONF = NO +IFPLUGD_INSTALL_STAGING = NO +IFPLUGD_INSTALL_TARGET = YES + +IFPLUGD_CONF_OPT = --disable-lynx + +IFPLUGD_DEPENDENCIES = uclibc libdaemon + +$(eval $(call AUTOTARGETS,package,ifplugd)) + +$(IFPLUGD_HOOK_POST_INSTALL): + $(INSTALL) -d $(TARGET_DIR)/etc/ifplugd + $(INSTALL) $(IFPLUGD_DIR)/conf/ifplugd.conf $(TARGET_DIR)/etc/ifplugd/ + $(INSTALL) -m 0755 $(IFPLUGD_DIR)/conf/ifplugd.action \ + $(TARGET_DIR)/etc/ifplugd/ + $(INSTALL) -m 0755 $(IFPLUGD_DIR)/conf/ifplugd.init \ + $(TARGET_DIR)/etc/init.d/S45ifplugd + # continue booting without waiting for fork (no -w option) + $(SED) 's^\(ARGS=.*\)w^\1^' $(TARGET_DIR)/etc/ifplugd/ifplugd.conf + # don't use bash for init script + $(SED) 's^/bin/bash^/bin/sh^g' $(TARGET_DIR)/etc/init.d/S45ifplugd -- cgit v1.2.3