shared-macros.mk: simplify java settings
[oi-userland.git] / components / sysutils / zrepl / Makefile
bloba49b6110510a9e756fd449940c21fb3f90d8578c
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.
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.
12 # Copyright 2022 Gary Mills
14 BUILD_BITS= 64
15 BUILD_STYLE= justmake
16 include ../../../make-rules/shared-macros.mk
18 COMPONENT_NAME= zrepl
19 COMPONENT_VERSION= 0.6.1
20 COMPONENT_SUMMARY= A one-stop, integrated solution for ZFS replication
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
27 COMPONENT_ARCHIVE_HASH= sha256:263c82501b75a1413f8a298c1d67d7e940c1b0cb967979790773237e2a30adbd
28 COMPONENT_LICENSE= MIT
29 COMPONENT_LICENSE_FILE= LICENSE
31 TEST_TARGET= $(NO_TESTS)
33 include $(WS_MAKE_RULES)/common.mk
35 DATE=$(shell date -u +%Y-%m-%d-T%TZ)
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.
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"
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"
56 # All installed files go to the artifact directory
57 COMPONENT_INSTALL_ARGS += ARTIFACTDIR=$(PROTO_DIR)
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";
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
72 # Add the files directory to the prototype search path list
73 PKG_PROTO_DIRS += $(COMPONENT_DIR)/files
75 # Build dependencies
76 REQUIRED_PACKAGES += developer/golang
77 REQUIRED_PACKAGES += library/python/docutils
79 # Auto-generated dependencies
80 REQUIRED_PACKAGES += SUNWcs
81 REQUIRED_PACKAGES += shell/ksh93
82 REQUIRED_PACKAGES += system/library