netplug: convert to gentargets and bump to 1.2.9.2
Signed-off-by: Martin Banky <Martin.Banky@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This commit is contained in:
parent
03f36427e4
commit
20d4792e5b
2
CHANGES
2
CHANGES
@ -7,7 +7,7 @@
|
|||||||
direcfb-examples, dmalloc, cloop, cups, ffmpeg, gdk-pixbuf,
|
direcfb-examples, dmalloc, cloop, cups, ffmpeg, gdk-pixbuf,
|
||||||
hostapd, i2c-tools, input-tools, libconfig, lsof,
|
hostapd, i2c-tools, input-tools, libconfig, lsof,
|
||||||
ltp-testsuite, lvm2, m4, memtester, mii-diag, mrouted,
|
ltp-testsuite, lvm2, m4, memtester, mii-diag, mrouted,
|
||||||
openssh, openssl, openvpn, pango, qt, rsync, sdl_gfx,
|
netplug, openssh, openssl, openvpn, pango, qt, rsync, sdl_gfx,
|
||||||
sdl_sound, sysklogd, sysvinit, udev, usbutils, xz, zlib
|
sdl_sound, sysklogd, sysvinit, udev, usbutils, xz, zlib
|
||||||
|
|
||||||
New packages: dhrystone, fbgrab, lsuio, rsh-redone, whetstone
|
New packages: dhrystone, fbgrab, lsuio, rsh-redone, whetstone
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
netplug uses nested functions, and gcc generates a warning that
|
|
||||||
is turned into an error:
|
|
||||||
|
|
||||||
cc1: warnings being treated as errors
|
|
||||||
if_info.c: In function 'ifsm_scriptdone':
|
|
||||||
if_info.c:289: error: generating trampoline in object (requires executable stack)
|
|
||||||
|
|
||||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
|
||||||
|
|
||||||
Index: netplug-1.2.9/Makefile
|
|
||||||
===================================================================
|
|
||||||
--- netplug-1.2.9.orig/Makefile 2010-05-09 21:07:40.000000000 +0200
|
|
||||||
+++ netplug-1.2.9/Makefile 2010-05-09 21:09:32.000000000 +0200
|
|
||||||
@@ -9,7 +9,7 @@
|
|
||||||
|
|
||||||
install_opts :=
|
|
||||||
|
|
||||||
-CFLAGS += -Wall -Werror -std=gnu99 -DNP_ETC_DIR='"$(etcdir)"' \
|
|
||||||
+CFLAGS += -Wall -std=gnu99 -DNP_ETC_DIR='"$(etcdir)"' \
|
|
||||||
-DNP_SCRIPT_DIR='"$(scriptdir)"' -ggdb3 -O3 -DNP_VERSION='"$(version)"'
|
|
||||||
|
|
||||||
netplugd: config.o netlink.o lib.o if_info.o main.o
|
|
21
package/netplug/netplug-1.2.9.2-makefile-flags.patch
Normal file
21
package/netplug/netplug-1.2.9.2-makefile-flags.patch
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
Preserve the cflags settings, because buildroot clobbers them.
|
||||||
|
|
||||||
|
--- a/Makefile 2010-10-05 00:06:38.000000000 -0700
|
||||||
|
+++ b/Makefile 2010-10-05 00:15:27.000000000 -0700
|
||||||
|
@@ -11,11 +11,14 @@ mandir ?= $(prefix)/usr/share/man
|
||||||
|
|
||||||
|
install_opts :=
|
||||||
|
|
||||||
|
-CFLAGS += -Wall -std=gnu99 -DNP_ETC_DIR='"$(etcdir)"' \
|
||||||
|
+NETPLUG_CFLAGS += -Wall -std=gnu99 -DNP_ETC_DIR='"$(etcdir)"' \
|
||||||
|
-DNP_SCRIPT_DIR='"$(scriptdir)"' -ggdb3 -O3 -DNP_VERSION='"$(version)"'
|
||||||
|
|
||||||
|
+%.o: %.c
|
||||||
|
+ $(CC) $(NETPLUG_CFLAGS) $(CFLAGS) -c -o $@ $<
|
||||||
|
+
|
||||||
|
netplugd: config.o netlink.o lib.o if_info.o main.o
|
||||||
|
- $(CC) $(LDFLAGS) -o $@ $^
|
||||||
|
+ $(CC) $(LDFLAGS) -o $@ $(NETPLUG_CFLAGS) $^
|
||||||
|
|
||||||
|
install:
|
||||||
|
install -d $(install_opts) -m 755 \
|
@ -1,12 +0,0 @@
|
|||||||
diff -ur netplug-1.2.9/netlink.c netplug-1.2.9-patched/netlink.c
|
|
||||||
--- netplug-1.2.9/netlink.c 2005-01-07 23:57:09.000000000 -0600
|
|
||||||
+++ netplug-1.2.9-patched/netlink.c 2008-02-27 20:18:09.855767996 -0600
|
|
||||||
@@ -284,7 +284,7 @@
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
- int addr_len = sizeof(addr);
|
|
||||||
+ socklen_t addr_len = sizeof(addr);
|
|
||||||
|
|
||||||
if (getsockname(fd, (struct sockaddr *) &addr, &addr_len) == -1) {
|
|
||||||
do_log(LOG_ERR, "Could not get socket details: %m");
|
|
@ -3,51 +3,26 @@
|
|||||||
# netplug
|
# netplug
|
||||||
#
|
#
|
||||||
#############################################################
|
#############################################################
|
||||||
NETPLUG_VERSION=1.2.9
|
NETPLUG_VERSION=1.2.9.2
|
||||||
NETPLUG_SOURCE=netplug-$(NETPLUG_VERSION).tar.bz2
|
NETPLUG_SOURCE=netplug-$(NETPLUG_VERSION).tar.bz2
|
||||||
NETPLUG_SITE=http://www.red-bean.com/~bos/netplug
|
NETPLUG_SITE=http://www.red-bean.com/~bos/netplug
|
||||||
NETPLUG_DIR=$(BUILD_DIR)/netplug-$(NETPLUG_VERSION)
|
|
||||||
NETPLUG_CAT:=$(BZCAT)
|
|
||||||
NETPLUG_BINARY:=netplugd
|
|
||||||
NETPLUG_TARGET_BINARY:=sbin/netplugd
|
|
||||||
|
|
||||||
$(DL_DIR)/$(NETPLUG_SOURCE):
|
define NETPLUG_BUILD_CMDS
|
||||||
$(call DOWNLOAD,$(NETPLUG_SITE),$(NETPLUG_SOURCE))
|
$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
|
||||||
|
endef
|
||||||
|
|
||||||
netplug-source: $(DL_DIR)/$(NETPLUG_SOURCE)
|
define NETPLUG_INSTALL_TARGET_CMDS
|
||||||
|
$(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install
|
||||||
|
endef
|
||||||
|
|
||||||
$(NETPLUG_DIR)/.unpacked: $(DL_DIR)/$(NETPLUG_SOURCE)
|
define NETPLUG_UNINSTALL_TARGET_CMDS
|
||||||
$(NETPLUG_CAT) $(DL_DIR)/$(NETPLUG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
rm -f $(TARGET_DIR)/sbin/netplugd
|
||||||
toolchain/patch-kernel.sh $(NETPLUG_DIR) package/netplug/ netplug\*.patch
|
|
||||||
touch $(NETPLUG_DIR)/.unpacked
|
|
||||||
|
|
||||||
$(NETPLUG_DIR)/$(NETPLUG_BINARY): $(NETPLUG_DIR)/.unpacked
|
|
||||||
$(MAKE) CC="$(TARGET_CC)" -C $(NETPLUG_DIR)
|
|
||||||
$(STRIPCMD) $(NETPLUG_DIR)/$(NETPLUG_BINARY)
|
|
||||||
|
|
||||||
$(TARGET_DIR)/$(NETPLUG_TARGET_BINARY): $(NETPLUG_DIR)/$(NETPLUG_BINARY)
|
|
||||||
$(INSTALL) -m 644 -D $(NETPLUG_DIR)/etc/netplugd.conf $(TARGET_DIR)/etc/netplug/netplugd.conf
|
|
||||||
$(INSTALL) -m 755 -D package/netplug/netplug-script $(TARGET_DIR)/etc/netplug.d/netplug
|
|
||||||
$(INSTALL) -m 755 -D package/netplug/S29netplug $(TARGET_DIR)/etc/init.d
|
|
||||||
$(INSTALL) -m 755 -D $(NETPLUG_DIR)/$(NETPLUG_BINARY) $(TARGET_DIR)/$(NETPLUG_TARGET_BINARY)
|
|
||||||
touch -c $(TARGET_DIR)/$(NETPLUG_TARGET_BINARY)
|
|
||||||
|
|
||||||
netplug: $(TARGET_DIR)/$(NETPLUG_TARGET_BINARY)
|
|
||||||
|
|
||||||
netplug-clean:
|
|
||||||
rm -f $(TARGET_DIR)/$(NETPLUG_TARGET_BINARY)
|
|
||||||
rm -rf $(TARGET_DIR)/etc/netplug*
|
rm -rf $(TARGET_DIR)/etc/netplug*
|
||||||
rm -f $(TARGET_DIR)/etc/init.d/S*netplug
|
rm -f $(TARGET_DIR)/etc/init.d/S*netplug
|
||||||
-$(MAKE) -C $(NETPLUG_DIR) clean
|
endef
|
||||||
|
|
||||||
netplug-dirclean:
|
define NETPLUG_CLEAN_CMDS
|
||||||
rm -rf $(NETPLUG_DIR)
|
-$(MAKE) -C $(@D) clean
|
||||||
|
endef
|
||||||
|
|
||||||
#############################################################
|
$(eval $(call GENTARGETS,package,netplug))
|
||||||
#
|
|
||||||
# Toplevel Makefile options
|
|
||||||
#
|
|
||||||
#############################################################
|
|
||||||
ifeq ($(BR2_PACKAGE_NETPLUG),y)
|
|
||||||
TARGETS+=netplug
|
|
||||||
endif
|
|
||||||
|
Loading…
Reference in New Issue
Block a user