1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-10 07:04:03 +00:00
freebsd-ports/net-p2p/bitmark/Makefile
Marcelo Araujo 4a007974ab The Bitmark distributed property system.
Bitmark secures digital property registration through Bitmark certificates,
enabling economic trade of those properties between individuals, governments,
corporations, and institutions at global scale.

WWW: https://github.com/bitmark-inc/bitmarkd

Submitted by:	Christopher Hall <hsw__bitmark.com>
Sponsored by:	Bitmark Inc.
Differential Revision:	https://reviews.freebsd.org/D23167
2020-01-17 10:46:13 +00:00

159 lines
5.6 KiB
Makefile

# $FreeBSD$
PORTNAME= bitmark
DISTVERSIONPREFIX= v
DISTVERSION= 0.12.4
CATEGORIES= net-p2p
MAINTAINER= hsw@bitmark.com
COMMENT?= Bitmark distributed property system programs
LICENSE= ISCL
LICENSE_FILE= ${WRKSRC}/LICENSE
ONLY_FOR_ARCHS= amd64 armv6 armv7 i386
ONLY_FOR_ARCHS_REASON= depends on go which is not supported in this \
architecture
LIB_DEPENDS= libargon2.so:security/libargon2 \
libzmq.so:net/libzmq4
USES= go:modules pkgconfig
CONFLICTS?= bitmark-{daemon,cli,recorder,dumper}
SLAVE_PORT?= no
OPTIONS_DEFINE?= CLI DAEMON DUMPER RECORDER
OPTIONS_DEFAULT?= CLI DAEMON RECORDER
OPTIONS_SUB= yes
DAEMON_DESC= Main bitmarkd node server
CLI_DESC= Command line program to access bitmarks
DUMPER_DESC= Utility to dump bitmarkd levelDB
RECORDER_DESC= Hashing program
.include <bsd.port.options.mk>
USE_GITHUB= yes
GH_ACCOUNT= bitmark-inc:DEFAULT
GH_PROJECT= bitmarkd
GH_TUPLE= bitmark-inc:certgen:v0.1.1:bitmark_inc_certgen/vendor/github.com/bitmark-inc/certgen \
bitmark-inc:exitwithstatus:v0.1.2:bitmark_inc_exitwithstatus/vendor/github.com/bitmark-inc/exitwithstatus \
bitmark-inc:getoptions:v0.1.1:bitmark_inc_getoptions/vendor/github.com/bitmark-inc/getoptions \
bitmark-inc:go-argon2:v0.1.4:bitmark_inc_go_argon2/vendor/github.com/bitmark-inc/go-argon2 \
bitmark-inc:logger:v0.3.4:bitmark_inc_logger/vendor/github.com/bitmark-inc/logger \
btcsuite:btcd:c26ffa870fd8:btcsuite_btcd/vendor/github.com/btcsuite/btcd \
btcsuite:btclog:84c8d2346e9f:btcsuite_btclog/vendor/github.com/btcsuite/btclog \
btcsuite:btcutil:9e5f4b9a998d:btcsuite_btcutil/vendor/github.com/btcsuite/btcutil \
btcsuite:go-socks:4720035b7bfd:btcsuite_go_socks/vendor/github.com/btcsuite/go-socks \
cihub:seelog:f561c5e57575:cihub_seelog/vendor/github.com/cihub/seelog \
davecgh:go-spew:v1.1.0:davecgh_go_spew/vendor/github.com/davecgh/go-spew \
fsnotify:fsnotify:v1.4.7:fsnotify_fsnotify/vendor/github.com/fsnotify/fsnotify \
go-yaml:yaml:v2.2.2:go_yaml_yaml/vendor/gopkg.in/yaml.v2 \
golang:crypto:9756ffdc2472:golang_crypto/vendor/golang.org/x/crypto \
golang:net:ba9fcec4b297:golang_net/vendor/golang.org/x/net \
golang:snappy:v0.0.1:golang_snappy/vendor/github.com/golang/snappy \
golang:sync:112230192c58:golang_sync/vendor/golang.org/x/sync \
golang:sys:749cb33beabd:golang_sys/vendor/golang.org/x/sys \
golang:time:9d24e82272b4:golang_time/vendor/golang.org/x/time \
miekg:dns:v1.1.16:miekg_dns/vendor/github.com/miekg/dns \
mitchellh:mapstructure:v1.1.2:mitchellh_mapstructure/vendor/github.com/mitchellh/mapstructure \
patrickmn:go-cache:v2.1.0:patrickmn_go_cache/vendor/github.com/patrickmn/go-cache \
pebbe:zmq4:v1.0.0:pebbe_zmq4/vendor/github.com/pebbe/zmq4 \
syndtr:goleveldb:v1.0.0:syndtr_goleveldb/vendor/github.com/syndtr/goleveldb \
urfave:cli:v1.21.0:urfave_cli/vendor/github.com/urfave/cli \
yuin:gluamapper:d836955830e7:yuin_gluamapper/vendor/github.com/yuin/gluamapper \
yuin:gopher-lua:1cd887cd7036:yuin_gopher_lua/vendor/github.com/yuin/gopher-lua
# stripping can break go binaries
STRIP=
SLAVE_PORT?= NO
VAR_DIR= /var
.if ${PORT_OPTIONS:MDAEMON}
USERS+= bitmark
GROUPS+= bitmark
BITMARKD_RUN= ${VAR_DIR}/run/bitmarkd
BITMARKD_DATA= ${VAR_DIR}/lib/bitmarkd
SERVER_LIST+= bitmarkd
USE_RC_SUBR+= bitmarkd
SUB_LIST+= BITMARKD_DATA=${BITMARKD_DATA} \
BITMARKD_GROUP=bitmark \
BITMARKD_RUN=${BITMARKD_RUN} \
BITMARKD_USER=bitmark
PLIST_FILES+= "etc/bitmarkd.conf.sub"
.endif
.if ${PORT_OPTIONS:MRECORDER}
USERS+= bitmark-recorder
GROUPS+= bitmark-recorder
RECORDERD_RUN= ${VAR_DIR}/run/recorderd
RECORDERD_DATA= ${VAR_DIR}/lib/recorderd
SERVER_LIST+= recorderd
USE_RC_SUBR+= recorderd
SUB_LIST+= RECORDERD_DATA=${RECORDERD_DATA} \
RECORDERD_GROUP=bitmark-recorder \
RECORDERD_RUN=${RECORDERD_RUN} \
RECORDERD_USER=bitmark-recorder
.endif
.if ${PORT_OPTIONS:MCLI}
COMMAND_LIST+= bitmark-cli
.endif
.if ${PORT_OPTIONS:MDUMPER}
COMMAND_LIST+= bitmark-dumpdb
.endif
.for command in ${SERVER_LIST}
PLIST_FILES+= "@sample etc/${command}.conf.sample" \
etc/newsyslog.conf.d/${command}.conf \
etc/syslog.d/${command}.conf \
sbin/${command}
.endfor
.for command in ${COMMAND_LIST}
PLIST_FILES+= bin/${command}
.endfor
.if ${PORT_OPTIONS:MDAEMON}
PLIST_FILES+= "@dir(bitmark,bitmark,) ${BITMARKD_DATA}" \
"@dir(bitmark,bitmark,) ${BITMARKD_RUN}"
.endif
.if ${PORT_OPTIONS:MRECORDER}
PLIST_FILES+= "@dir(bitmark-recorder,bitmark-recorder,) ${RECORDERD_DATA}" \
"@dir(bitmark-recorder,bitmark-recorder,) ${RECORDERD_RUN}"
.endif
.if ${PORT_OPTIONS:MDAEMON} || ${PORT_OPTIONS:MRECORDER}
PLIST_FILES+= "@dir ${VAR_DIR}/lib"
.endif
GO_BUILDFLAGS+= -ldflags="-X main.version=${DISTVERSION}"
.for command in ${SERVER_LIST} ${COMMAND_LIST}
GO_TARGET+= ./command/${command}
.endfor
do-install:
.for command in ${SERVER_LIST}
${INSTALL_PROGRAM} ${WRKDIR}/bin/${command} ${STAGEDIR}${PREFIX}/sbin
${INSTALL_DATA} ${WRKSRC}/command/${command}/${command}.conf.sample ${STAGEDIR}${PREFIX}/etc/${command}.conf.sample
${MKDIR} ${STAGEDIR}${PREFIX}/etc/syslog.d
${MKDIR} ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d
${INSTALL_DATA} ${FILESDIR}/${command}.syslog ${STAGEDIR}${PREFIX}/etc/syslog.d/${command}.conf
${INSTALL_DATA} ${FILESDIR}/${command}.newsyslog ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d/${command}.conf
.endfor
.for command in ${COMMAND_LIST}
${INSTALL_PROGRAM} ${WRKDIR}/bin/${command} ${STAGEDIR}${PREFIX}/bin
.endfor
.if ${PORT_OPTIONS:MDAEMON}
${INSTALL_DATA} ${WRKSRC}/command/bitmarkd/bitmarkd.conf.sub ${STAGEDIR}${PREFIX}/etc/bitmarkd.conf.sub
${MKDIR} ${STAGEDIR}${BITMARKD_RUN}
${MKDIR} ${STAGEDIR}${BITMARKD_DATA}
.endif
.if ${PORT_OPTIONS:MRECORDER}
${MKDIR} ${STAGEDIR}${RECORDERD_RUN}
${MKDIR} ${STAGEDIR}${RECORDERD_DATA}
.endif
.include <bsd.port.mk>