xref: /OK3568_Linux_fs/buildroot/package/ifplugd/ifplugd.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1################################################################################
2#
3# ifplugd
4#
5################################################################################
6
7IFPLUGD_VERSION = 0.28
8IFPLUGD_SITE = http://0pointer.de/lennart/projects/ifplugd
9IFPLUGD_LICENSE = GPL-2.0+
10IFPLUGD_LICENSE_FILES = LICENSE
11IFPLUGD_SELINUX_MODULES = ifplugd
12IFPLUGD_AUTORECONF = YES
13
14# install-strip unconditionally overwrites $(TARGET_DIR)/etc/ifplugd/ifplugd.*
15IFPLUGD_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) install-exec
16IFPLUGD_CONF_OPTS = --disable-lynx --with-initdir=/etc/init.d/
17IFPLUGD_DEPENDENCIES = libdaemon
18
19define IFPLUGD_INSTALL_FIXUP
20	$(INSTALL) -D -m 0644 $(@D)/conf/ifplugd.conf $(TARGET_DIR)/etc/ifplugd/ifplugd.conf; \
21	$(SED) 's^\(ARGS=.*\)w^\1^' $(TARGET_DIR)/etc/ifplugd/ifplugd.conf; \
22	$(INSTALL) -D -m 0755 $(@D)/conf/ifplugd.action \
23		$(TARGET_DIR)/etc/ifplugd/ifplugd.action
24endef
25
26IFPLUGD_POST_INSTALL_TARGET_HOOKS += IFPLUGD_INSTALL_FIXUP
27
28define IFPLUGD_INSTALL_INIT_SYSV
29	$(INSTALL) -D -m 0755 $(@D)/conf/ifplugd.init \
30		$(TARGET_DIR)/etc/init.d/S45ifplugd
31	# don't use bash for init script
32	$(SED) 's^/bin/bash^/bin/sh^g' $(TARGET_DIR)/etc/init.d/S45ifplugd
33endef
34
35$(eval $(autotools-package))
36