blob: 554deabaaa920517295710e664779938c41c4c99 (
plain) (
blame)
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
56
57
58
59
|
PORTNAME= gotosocial
DISTVERSIONPREFIX= v
DISTVERSION= 0.3.4
PORTREVISION= 1
CATEGORIES= net-im
MAINTAINER= me+freebsd@igalic.co
COMMENT= Golang fediverse server
LICENSE= AGPLv3
LICENSE_FILE= ${WRKSRC}/LICENSE
ONLY_FOR_ARCHS= amd64
# Note: we don't use go:modules, because this project vendors all deps
USES= go
USE_RC_SUBR= ${PORTNAME}
USE_GITHUB= yes
GH_ACCOUNT= superseriousbusiness
# When rebuilding yourself, please set this:
#GH_TAGNAME= f848aaa81f04666dae29e0bb85ccf31d30574de7
USERS= gotosocial
GROUPS= gotosocial
DBDIR= /var/db/${PORTNAME}
SUB_LIST= DBDIR="${DBDIR}" \
GROUP="${GROUPS}" \
USER="${USERS}" \
WWWDIR="${WWWDIR}"
PLIST_SUB= WWWDIR="${WWWDIR}"
# patch sample config for people who set a custom prefix
.if "${PREFIX}" != "${LOCALBASE}"
post-patch:
@${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|g' \
${WRKSRC}/example/config.yaml
.endif
do-build:
@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
VERSION=${DISTVERSION} COMMIT=${GH_TAGNAME} scripts/build.sh )
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} \
${STAGEDIR}${PREFIX}/bin/
${MKDIR} ${STAGEDIR}${DOCSDIR}
.for x in LICENSE README.md
${INSTALL_DATA} ${WRKSRC}/${x} \
${STAGEDIR}${DOCSDIR}
.endfor
${MKDIR} ${STAGEDIR}${ETCDIR}
${INSTALL_DATA} ${WRKSRC}/example/config.yaml \
${STAGEDIR}${ETCDIR}/config.yaml.sample
(cd ${WRKSRC}/web && ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR}/ \
"! ( -path */gotosocial-styling* )")
.include <bsd.port.mk>
|