summaryrefslogtreecommitdiff
path: root/package/netplug/netplug.mk
diff options
context:
space:
mode:
Diffstat (limited to 'package/netplug/netplug.mk')
-rw-r--r--package/netplug/netplug.mk53
1 files changed, 14 insertions, 39 deletions
diff --git a/package/netplug/netplug.mk b/package/netplug/netplug.mk
index 74fa0c597..98d15044c 100644
--- a/package/netplug/netplug.mk
+++ b/package/netplug/netplug.mk
@@ -3,51 +3,26 @@
# netplug
#
#############################################################
-NETPLUG_VERSION=1.2.9
+NETPLUG_VERSION=1.2.9.2
NETPLUG_SOURCE=netplug-$(NETPLUG_VERSION).tar.bz2
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):
- $(call DOWNLOAD,$(NETPLUG_SITE),$(NETPLUG_SOURCE))
+define NETPLUG_BUILD_CMDS
+ $(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)
- $(NETPLUG_CAT) $(DL_DIR)/$(NETPLUG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
- 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)
+define NETPLUG_UNINSTALL_TARGET_CMDS
+ rm -f $(TARGET_DIR)/sbin/netplugd
rm -rf $(TARGET_DIR)/etc/netplug*
rm -f $(TARGET_DIR)/etc/init.d/S*netplug
- -$(MAKE) -C $(NETPLUG_DIR) clean
+endef
-netplug-dirclean:
- rm -rf $(NETPLUG_DIR)
+define NETPLUG_CLEAN_CMDS
+ -$(MAKE) -C $(@D) clean
+endef
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_NETPLUG),y)
-TARGETS+=netplug
-endif
+$(eval $(call GENTARGETS,package,netplug))