Changeset View
Changeset View
Standalone View
Standalone View
ftp/sftpgo/Makefile
- This file was added.
PORTNAME= sftpgo | |||||
PORTVERSION= 2.0.4 | |||||
CATEGORIES= ftp www | |||||
MASTER_SITES= https://github.com/drakkan/${PORTNAME}/releases/download/v${DISTVERSION}/ | |||||
DISTNAME= ${PORTNAME}_v${PORTVERSION}_src_with_deps | |||||
koobs: Not sure this is the best DISTNAME. I see upstream git repo tags with vX.Y.Z. Might be better… | |||||
Done Inline ActionsThis was the first thing I tried, but if I use the source from the tag - I have to download all the dependencies myself, add a gigantic GH_TUPLE into the Makefile, and make a huge distinfo. Also, for every new version I will most probably have to re-generate the GH_TUPLE. Instead, *_src_with_deps is a convenient package provided by the developers, that encapsulates all the deps into it, so it becomes much easier to download and build it. skozlov: This was the first thing I tried, but if I use the source from the tag - I have to download all… | |||||
MAINTAINER= skozlov@FreeBSD.org | |||||
COMMENT= Fully featured and highly configurable SFTP, FTP/S, and WebDAV server | |||||
LICENSE= AGPLv3 | |||||
LICENSE_FILE= ${WRKSRC}/LICENSE | |||||
USES= go:modules tar:xz | |||||
USE_RC_SUBR= ${PORTNAME} | |||||
NO_WRKSUBDIR= yes | |||||
OPTIONS_DEFINE= BASH FISH ZSH MANPAGES | |||||
OPTIONS_DEFAULT= BASH FISH ZSH MANPAGES | |||||
OPTIONS_SUB= yes | |||||
USERS= sftpgo | |||||
GROUPS= sftpgo | |||||
post-patch: | |||||
${REINPLACE_CMD} -e 's|"templates"|"${DATADIR}/templates"|; \ | |||||
s|"static"|"${DATADIR}/static"|; \ | |||||
s|"sftpgo.db"|"/var/db/${PORTNAME}/${PORTNAME}.db"|' \ | |||||
${WRKSRC}/${PORTNAME}.json | |||||
post-build-BASH-on: | |||||
${GO_WRKDIR_BIN}/${PORTNAME} gen completion bash > ${WRKDIR}/bash_completions | |||||
post-build-FISH-on: | |||||
${GO_WRKDIR_BIN}/${PORTNAME} gen completion fish > ${WRKDIR}/fish_completions | |||||
post-build-ZSH-on: | |||||
${GO_WRKDIR_BIN}/${PORTNAME} gen completion zsh > ${WRKDIR}/zsh_completions | |||||
post-build-MANPAGES-on: | |||||
${MKDIR} ${WRKDIR}/manpages | |||||
${GO_WRKDIR_BIN}/${PORTNAME} gen man --dir ${WRKDIR}/manpages | |||||
post-install: | |||||
@${MKDIR} ${STAGEDIR}${DATADIR} | |||||
cd ${WRKSRC} && \ | |||||
${COPYTREE_SHARE} templates ${STAGEDIR}${DATADIR} && \ | |||||
${COPYTREE_SHARE} static ${STAGEDIR}${DATADIR} | |||||
${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.json ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.json.sample | |||||
post-install-BASH-on: | |||||
@${MKDIR} ${STAGEDIR}${PREFIX}/etc/bash_completion.d | |||||
${INSTALL_DATA} ${WRKDIR}/bash_completions ${STAGEDIR}${PREFIX}/etc/bash_completion.d/${PORTNAME} | |||||
post-install-FISH-on: | |||||
@${MKDIR} ${STAGEDIR}${PREFIX}/share/fish/completions | |||||
${INSTALL_DATA} ${WRKDIR}/fish_completions ${STAGEDIR}${PREFIX}/share/fish/completions/${PORTNAME}.fish | |||||
post-install-ZSH-on: | |||||
@${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions | |||||
${INSTALL_DATA} ${WRKDIR}/zsh_completions ${STAGEDIR}${PREFIX}/share/zsh/site-functions/_${PORTNAME} | |||||
post-install-MANPAGES-on: | |||||
${FIND} ${WRKDIR}/manpages -type f -execdir ${INSTALL_MAN} {} ${STAGEDIR}${MANPREFIX}/man/man1 \; | |||||
.include <bsd.port.mk> |
Not sure this is the best DISTNAME. I see upstream git repo tags with vX.Y.Z. Might be better just to USE_GITHUB=yes for this, letting that handle the distname bits.