summaryrefslogtreecommitdiffstats
path: root/package/rpcbind/rpcbind.mk
diff options
context:
space:
mode:
authorAurélien Chabot <aurelien@chabot.fr>2015-07-19 23:02:39 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-07-27 23:45:01 +0200
commit0db9c4d197b19bb14f67deeeac495a85a4c28767 (patch)
tree24bdef2363f79da13b204412763c2938a6ad4639 /package/rpcbind/rpcbind.mk
parent6c8d93c88d722143b785034439c61358a9481c68 (diff)
downloadbuildroot-0db9c4d197b19bb14f67deeeac495a85a4c28767.tar.gz
buildroot-0db9c4d197b19bb14f67deeeac495a85a4c28767.zip
rpcbind: add systemd support
systemd files taken from Arch Linux. [Thomas: - fix indentation - indicate source of systemd files.] Signed-off-by: Aurélien Chabot <aurelien@chabot.fr> Acked-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/rpcbind/rpcbind.mk')
-rw-r--r--package/rpcbind/rpcbind.mk16
1 files changed, 16 insertions, 0 deletions
diff --git a/package/rpcbind/rpcbind.mk b/package/rpcbind/rpcbind.mk
index 1e28af9e9a..4360d1f47a 100644
--- a/package/rpcbind/rpcbind.mk
+++ b/package/rpcbind/rpcbind.mk
@@ -14,11 +14,27 @@ RPCBIND_CONF_ENV += \
CFLAGS="$(TARGET_CFLAGS) `$(PKG_CONFIG_HOST_BINARY) --cflags libtirpc`"
RPCBIND_DEPENDENCIES += libtirpc host-pkgconf
RPCBIND_CONF_OPTS += --with-rpcuser=root
+
+ifeq ($(BR2_INIT_SYSTEMD),y)
+RPCBIND_CONF_OPTS += --with-systemdsystemunitdir=/usr/lib/systemd/system
+else
RPCBIND_CONF_OPTS += --with-systemdsystemunitdir=no
+endif
+
+define RPCBIND_INSTALL_INIT_SYSTEMD
+ $(INSTALL) -m 0755 -D package/rpcbind/rpcbind.service \
+ $(TARGET_DIR)/usr/lib/systemd/system/rpcbind.service
+ $(INSTALL) -m 0755 -D package/rpcbind/rpcbind.socket \
+ $(TARGET_DIR)/usr/lib/systemd/system/rpcbind.socket
+ mkdir -p $(TARGET_DIR)/etc/systemd/system/sockets.target.wants
+ ln -fs ../../../../usr/lib/systemd/system/rpcbind.socket \
+ $(TARGET_DIR)/etc/systemd/system/sockets.target.wants/rpcbind.socket
+endef
define RPCBIND_INSTALL_INIT_SYSV
$(INSTALL) -m 0755 -D package/rpcbind/S30rpcbind \
$(TARGET_DIR)/etc/init.d/S30rpcbind
endef
+
$(eval $(autotools-package))
OpenPOWER on IntegriCloud