summaryrefslogtreecommitdiff
path: root/www/garage/Makefile
blob: 410f3d7cc8060da4b4b510e4971465faafbe0d67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
PORTNAME=	garage
DISTVERSION=	0.8.4
CATEGORIES=	www
MASTER_SITES=	https://git.deuxfleurs.fr/Deuxfleurs/${PORTNAME}/archive/v${PORTVERSION}.tar.gz?dummy=/
DISTFILES=	${PORTNAME}-${DISTVERSION}${EXTRACT_SUFX}

MAINTAINER=	ashish@FreeBSD.org
COMMENT=	Open-source distributed storage service
WWW=		https://garagehq.deuxfleurs.fr/

LICENSE=	AGPLv3
LICENSE_FILE=	${WRKSRC}/LICENSE

BUILD_DEPENDS=	protoc:devel/protobuf
LIB_DEPENDS=	libsodium.so:security/libsodium \
		libzstd.so:archivers/zstd

USES=		cargo pkgconfig
CARGO_ENV+=	SODIUM_USE_PKG_CONFIG=1
CARGO_INSTALL_PATH=	src/garage
SUB_FILES=	pkg-message
USE_RC_SUBR=	garage
CARGO_VENDOR_DIR=	${WRKDIR}/cargo-crates

post-extract:
	${MV} -v ${WRKDIR}/${PORTNAME} ${WRKSRC}

post-patch:
	${GREP} -F -Rl /etc/garage ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} \
		-e 's,/etc/garage,${ETCDIR},g'

post-install:
	${MKDIR} ${STAGEDIR}${DOCSDIR}
	cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} "! -name *\.bak"

.include <bsd.port.mk>