ports-local/www/rustypaste-pretty/Makefile

44 lines
1,019 B
Makefile
Raw Normal View History

2023-03-01 10:39:42 -05:00
PORTNAME= rustypaste
2023-03-01 10:49:09 -05:00
PKGNAMESUFFIX=-pretty
2023-03-01 00:05:09 -05:00
DISTVERSIONPREFIX= v
DISTVERSION= 0.8.4
2023-03-01 11:22:18 -05:00
PORTREVISION= 2
2023-03-01 00:05:09 -05:00
CATEGORIES= www
2023-03-01 00:07:47 -05:00
CONFLICTS_INSTALL= rustypaste
2023-03-01 00:05:09 -05:00
MAINTAINER= DtxdF@disroot.org
COMMENT= Minimal file upload/pastebin service
WWW= https://github.com/amigan/rustypaste-pretty/
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= cargo
USE_GITHUB= yes
GH_ACCOUNT= amigan
2023-03-01 10:53:47 -05:00
GH_PROJECT= rustypaste-pretty
2023-03-01 00:05:09 -05:00
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>