Marcel Telka
2024-04-02 f1b1912adc00984cd165470b728dda03ac81b2c6
commit | author | age
12c9f8 1 #
GM 2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"). You may
4 # only use this file in accordance with the terms of the CDDL.
5 #
6 # A full copy of the text of the CDDL should have accompanied this
7 # source. A copy of the CDDL is also available via the Internet at
8 # http://www.illumos.org/license/CDDL.
9 #
10
11 #
12 # Copyright 2022 Gary Mills
13 #
a95bbc 14 BUILD_BITS= 64
AW 15 BUILD_STYLE= justmake
12c9f8 16 include ../../../make-rules/shared-macros.mk
GM 17
18 COMPONENT_NAME=        zrepl
69d8b6 19 COMPONENT_VERSION=    0.6.1
12c9f8 20 COMPONENT_SUMMARY=    A one-stop, integrated solution for ZFS replication
GM 21 COMPONENT_PROJECT_URL=    https://zrepl.github.io/
22 COMPONENT_FMRI=        backup/$(COMPONENT_NAME)
23 COMPONENT_CLASSIFICATION=    Applications/System Utilities
24 COMPONENT_SRC=        $(COMPONENT_NAME)-$(COMPONENT_VERSION)
25 COMPONENT_ARCHIVE=    $(COMPONENT_SRC).tar.gz
26 COMPONENT_ARCHIVE_URL=    https://github.com/$(COMPONENT_NAME)/$(COMPONENT_NAME)/archive/refs/tags/v$(COMPONENT_VERSION).tar.gz
69d8b6 27 COMPONENT_ARCHIVE_HASH= sha256:263c82501b75a1413f8a298c1d67d7e940c1b0cb967979790773237e2a30adbd
12c9f8 28 COMPONENT_LICENSE=    MIT
GM 29 COMPONENT_LICENSE_FILE=    LICENSE
30
a95bbc 31 TEST_TARGET= $(NO_TESTS)
12c9f8 32
GM 33 include $(WS_MAKE_RULES)/common.mk
34
35 DATE=$(shell date -u +%Y-%m-%d-T%TZ)
36
37 # The directory specified by the GOPATH environment variable must not
38 # exist, or be empty.  During the "build" target, the GO compiler
39 # downloads GO modules to subdirectories of this directory.  This
40 # behavior is how GO resolves external symbols.
41
42 COMPONENT_BUILD_ENV += GOOS="illumos"
43 COMPONENT_BUILD_ENV += GOPATH="$(SOURCE_DIR)/gopath"
44 COMPONENT_BUILD_ENV += PREFIX=/usr
45 COMPONENT_BUILD_ENV += VERSION="v$(COMPONENT_VERSION)"
46 COMPONENT_BUILD_ENV += DATE="'$(DATE)'"
47 COMPONENT_BUILD_ENV += BUILT_BY="oi-userland"
48
49 COMPONENT_INSTALL_ENV += GOOS="illumos"
50 COMPONENT_INSTALL_ENV += GOPATH="$(SOURCE_DIR)/gopath"
51 COMPONENT_INSTALL_ENV += PREFIX=/usr
52 COMPONENT_INSTALL_ENV += VERSION="v$(COMPONENT_VERSION)"
53 COMPONENT_INSTALL_ENV += DATE="'$(DATE)'"
54 COMPONENT_INSTALL_ENV += BUILT_BY="oi-userland"
55
56 # All installed files go to the artifact directory
57 COMPONENT_INSTALL_ARGS += ARTIFACTDIR=$(PROTO_DIR)
58
59 # Pre-create all the install directories
60 COMPONENT_PRE_INSTALL_ACTION=$(MKDIR) "$(PROTO_DIR)/usr/bin" \
61     "$(PROTO_DIR)/usr/share/bash-completion/completions" \
62     "$(PROTO_DIR)/usr/share/zsh/site-functions" \
63     "$(PROTO_DIR)/usr/share/man/man5" \
64     "$(PROTO_DIR)/usr/share/man/man8" \
65     "$(PROTO_DIR)/usr/share/zrepl/config";
66
67 # Install sample config files
68 COMPONENT_POST_INSTALL_ACTION=$(CP) $(COMPONENT_DIR)/files/illumos.yml \
69     $(SOURCE_DIR)/config/samples/*.yml \
70     $(PROTO_DIR)/usr/share/zrepl/config
71
72 # Add the files directory to the prototype search path list
73 PKG_PROTO_DIRS += $(COMPONENT_DIR)/files
74
75 # Build dependencies
a95bbc 76 REQUIRED_PACKAGES += developer/golang
AW 77 REQUIRED_PACKAGES += library/python/docutils
12c9f8 78
GM 79 # Auto-generated dependencies
a95bbc 80 REQUIRED_PACKAGES += SUNWcs
AW 81 REQUIRED_PACKAGES += shell/ksh93
12c9f8 82 REQUIRED_PACKAGES += system/library