Marcel Telka
2024-04-07 8a23b876d5e0a9d2a1ae972f152fad47a355daa4
commit | author | age
8cc152 1 #
I 2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 # You may only use this file in accordance with the terms of version
5 # 1.0 of the CDDL.
6 #
7 # A full copy of the text of the CDDL should have accompanied this
8 # source.  A copy of the CDDL is also available via the Internet at
9 # http://www.illumos.org/license/CDDL.
10 #
11
12 #
5e8d62 13 # Copyright 2024 Geoff Weiss
8cc152 14 #
I 15
16 BUILD_STYLE = setup.py
17
18 include ../../../make-rules/shared-macros.mk
19
5e8d62 20 COMPONENT_NAME= fail2ban
I 21 COMPONENT_VERSION= 1.0.2
22 COMPONENT_SUMMARY= Ban hosts that cause multiple authentication errors
23 COMPONENT_PROJECT_URL= https://www.fail2ban.org
24 COMPONENT_FMRI= network/$(COMPONENT_NAME)
25 COMPONENT_CLASSIFICATION= System/Services
26 COMPONENT_SRC=        $(COMPONENT_NAME)-$(COMPONENT_VERSION)
27 COMPONENT_ARCHIVE=    $(COMPONENT_VERSION).tar.gz
28 COMPONENT_ARCHIVE_URL= https://github.com/fail2ban/fail2ban/archive/$(COMPONENT_ARCHIVE)
29 COMPONENT_ARCHIVE_HASH= sha256:ae8b0b41f27a7be12d40488789d6c258029b23a01168e3c0d347ee80b325ac23
30 COMPONENT_LICENSE= GPLv2
8cc152 31
5e8d62 32 COMPONENT_LICENSE_FILE =    COPYING
8cc152 33
I 34 # This is a standalone application.  Since no other Python project depends on
35 # it we just provide single unversioned package.
36 SINGLE_PYTHON_VERSION = yes
37
38 include $(WS_MAKE_RULES)/common.mk
39
40 COMPONENT_PREP_ACTION +=  \
41     cd $(SOURCE_DIR) ; \
42     ./fail2ban-2to3
43
44 COMPONENT_BUILD_CMD = $(PYTHON) setup.py build
45 COMPONENT_INSTALL_CMD = $(PYTHON) setup.py install
46 COMPONENT_INSTALL_ARGS += --prefix=/usr
47 COMPONENT_INSTALL_ARGS += --root=$(PROTO_DIR)
48 COMPONENT_INSTALL_ARGS += --skip-build
49
5e8d62 50 # Install SMF manifest files. Remove paths files for other OS's. 
I 51 # Add openindiana paths file.
8cc152 52 COMPONENT_POST_INSTALL_ACTION += \
I 53     $(PYTHON) -mcompileall $(PROTO_DIR) ; \
54     $(MKDIR) $(PROTO_DIR)/lib/svc/method ; \
55     $(CP) $(SOURCE_DIR)/files/solaris-svc-fail2ban $(PROTO_DIR)/lib/svc/method/svc-fail2ban ; \
56     $(MKDIR) $(PROTO_DIR)/lib/svc/manifest/network ; \
57     $(CP) $(SOURCE_DIR)/files/solaris-fail2ban.xml $(PROTO_DIR)/lib/svc/manifest/network ; \
58     $(CP) $(COMPONENT_DIR)/files/paths-openindiana.conf $(PROTO_DIR)/etc/fail2ban ; \
59     rm -f $(PROTO_DIR)/etc/fail2ban/paths-arch.conf ; \
60     rm -f $(PROTO_DIR)/etc/fail2ban/paths-debian.conf ; \
61     rm -f $(PROTO_DIR)/etc/fail2ban/paths-fedora.conf ; \
62     rm -f $(PROTO_DIR)/etc/fail2ban/paths-freebsd.conf ; \
63     rm -f $(PROTO_DIR)/etc/fail2ban/paths-opensuse.conf ; \
5e8d62 64     rm -f $(PROTO_DIR)/etc/fail2ban/paths-osx.conf ; 
8cc152 65
I 66 # Auto-generated dependencies
67 PYTHON_REQUIRED_PACKAGES += runtime/python
68 REQUIRED_PACKAGES += SUNWcs
69 REQUIRED_PACKAGES += shell/bash