blob: 68dfaa8f163167b4d425865b0d9be003d19f9d1d (
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
PORTNAME= vaultwarden
DISTVERSION= 1.28.1
PORTREVISION= 3
CATEGORIES= security
MAINTAINER= mr@FreeBSD.org
COMMENT= Bitwarden compatible backend server
WWW= https://github.com/dani-garcia/vaultwarden
LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
LIB_DEPENDS+= libcapnp.so:devel/capnproto \
libgmp.so:math/gmp \
libnettle.so:security/nettle
USES= cargo mysql:client pgsql ssl
# make makeplist > pkg-plist #One has to edit/review the generated plist
# make generate-plist && make check-plist
USE_GITHUB= yes
GH_ACCOUNT= dani-garcia
USE_RC_SUBR= ${PORTNAME}
OPTIONS_DEFINE= WEBVAULT
OPTIONS_DEFAULT=WEBVAULT
WEBVAULT_DESC= Vaultwarden web (bw_web_builds)
WEBVAULT_RUN_DEPENDS= ${WWWDIR}/web-vault/index.html:www/vaultwarden-web_vault
# make cargo-crates > Makefile.crates
CARGO_FEATURES= mysql postgresql sqlite #vendored_openssl
#CARGO_ENV+= RUSTC_BOOTSTRAP=1
INSTALL_TARGET= install-strip
SUB_FILES= pkg-message
SUB_LIST= WWWGRP=${WWWGRP} \
WWWOWN=${WWWOWN}
#post-patch:
# ${REINPLACE_CMD} 's/^rust-version = "1.60"/rust-version = "1.59"/' \
# ${WRKSRC}/Cargo.toml
post-install:
${MKDIR} ${STAGEDIR}/${ETCDIR}/rc.conf.d
${INSTALL} -m0600 ${FILESDIR}/${PORTNAME}_conf.in ${STAGEDIR}/${LOCALBASE}/etc/rc.conf.d/${PORTNAME}.sample
${MKDIR} ${STAGEDIR}/${WWWDIR}/data
${ECHO_CMD} \
'@postexec chown -R ${WWWOWN}:${WWWGRP} %D/${WWWDIR_REL}/data' \
>> ${TMPPLIST}
.include <bsd.port.mk>
|