blob: d5f25ab3f15b1771acd0646a7e03518555c271de (
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
|
PORTNAME= rustypaste
DISTVERSIONPREFIX= v
DISTVERSION= 0.8.2
PORTREVISION= 2
CATEGORIES= www
MAINTAINER= DtxdF@disroot.org
COMMENT= Minimal file upload/pastebin service
WWW= https://github.com/orhun/rustypaste/
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= cargo
USE_GITHUB= yes
GH_ACCOUNT= orhun
USE_RC_SUBR= ${PORTNAME}
SUB_LIST+= USER="${USERS:[0]}"
USERS= ${PORTNAME}
GROUPS= ${PORTNAME}
PLIST_SUB+= USER="${USERS:[0]}" \
GROUP="${GROUPS:[0]}"
UPLOAD_PATH= /var/db/${PORTNAME}
post-patch:
@${REINPLACE_CMD} -e '/^upload_path=/s#=.*#="${UPLOAD_PATH}"#' ${WRKSRC}/config.toml
post-install:
${MKDIR} ${STAGEDIR}${ETCDIR}
${MKDIR} ${STAGEDIR}/${UPLOAD_PATH}
${ECHO_CMD} 'CONFIG="${ETCDIR}/${PORTNAME}.toml"' > ${STAGEDIR}${ETCDIR}/${PORTNAME}.env.sample
${CP} ${WRKSRC}/config.toml ${STAGEDIR}${ETCDIR}/${PORTNAME}.toml.sample
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
.include <bsd.port.mk>
|