xref: /OK3568_Linux_fs/buildroot/package/sshguard/sshguard.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1################################################################################
2#
3# sshguard
4#
5################################################################################
6
7SSHGUARD_VERSION = 2.4.2
8SSHGUARD_SITE = https://sourceforge.net/projects/sshguard/files/sshguard/$(SSHGUARD_VERSION)
9SSHGUARD_LICENSE = ISC, Public Domain (fnv hash), BSD-3-Clause (SimCList)
10SSHGUARD_LICENSE_FILES = COPYING
11
12define SSHGUARD_INSTALL_CONFIG
13	$(INSTALL) -D -m 0644 $(@D)/examples/sshguard.conf.sample \
14		$(TARGET_DIR)/etc/sshguard.conf
15	$(SED) '/^#BACKEND/c\BACKEND="/usr/libexec/sshg-fw-iptables"' \
16		-e '/^#FILES/c\FILES="/var/log/messages"' $(TARGET_DIR)/etc/sshguard.conf
17endef
18SSHGUARD_POST_INSTALL_TARGET_HOOKS += SSHGUARD_INSTALL_CONFIG
19
20define SSHGUARD_INSTALL_INIT_SYSV
21	$(INSTALL) -D -m 755 package/sshguard/S49sshguard \
22		$(TARGET_DIR)/etc/init.d/S49sshguard
23endef
24
25define SSHGUARD_INSTALL_INIT_SYSTEMD
26	$(INSTALL) -D -m 0644 $(@D)/examples/sshguard.service \
27		$(TARGET_DIR)/usr/lib/systemd/system/sshguard.service
28endef
29
30$(eval $(autotools-package))
31