Changeset View
Changeset View
Standalone View
Standalone View
www/gitea/Makefile
Show All 14 Lines | |||||
RUN_DEPENDS= git:devel/git | RUN_DEPENDS= git:devel/git | ||||
USES= go:modules | USES= go:modules | ||||
USE_GITHUB= yes | USE_GITHUB= yes | ||||
GH_ACCOUNT= go-gitea | GH_ACCOUNT= go-gitea | ||||
USE_RC_SUBR= gitea | USE_RC_SUBR= gitea | ||||
GO_BUILDFLAGS= -tags "${GO_TAGS}" | GO_BUILDFLAGS= -tags "${GO_TAGS}" | ||||
GO_TARGET= :${PREFIX}/sbin/${PORTNAME} | |||||
SUB_FILES+= app.ini.sample | SUB_FILES+= app.ini.sample | ||||
SUB_LIST+= GITUSER=${USERS} | SUB_LIST+= GITUSER=${USERS} | ||||
USERS= git | USERS= git | ||||
GROUPS= git | GROUPS= git | ||||
OPTIONS_DEFINE= CERT PAM SQLITE | OPTIONS_DEFINE= CERT PAM SQLITE | ||||
Show All 20 Lines | post-patch: | ||||
# Gitea releases don't supply the release version number; the | # Gitea releases don't supply the release version number; the | ||||
# automatic method to obtain the version number in the Gitea build | # automatic method to obtain the version number in the Gitea build | ||||
# system only works when sources are checked out from git. | # system only works when sources are checked out from git. | ||||
# See https://github.com/go-gitea/gitea/issues/1136#issuecomment-311622745 | # See https://github.com/go-gitea/gitea/issues/1136#issuecomment-311622745 | ||||
@${SED} -Ei .orig \ | @${SED} -Ei .orig \ | ||||
-e 's#^(var Version = )"[^"]+"#\1"${PORTVERSION}"#' \ | -e 's#^(var Version = )"[^"]+"#\1"${PORTVERSION}"#' \ | ||||
${GO_WRKSRC}/main.go | ${GO_WRKSRC}/main.go | ||||
do-install: | post-install: | ||||
${INSTALL_PROGRAM} ${GO_WRKDIR_BIN}/${PORTNAME} ${STAGEDIR}${PREFIX}/sbin | |||||
@${MKDIR} ${STAGEDIR}${ETCDIR}/conf | @${MKDIR} ${STAGEDIR}${ETCDIR}/conf | ||||
${INSTALL_DATA} ${WRKDIR}/app.ini.sample ${STAGEDIR}${ETCDIR}/conf/app.ini.sample | ${INSTALL_DATA} ${WRKDIR}/app.ini.sample ${STAGEDIR}${ETCDIR}/conf/app.ini.sample | ||||
${INSTALL_DATA} ${GO_WRKSRC}/custom/conf/app.ini.sample ${STAGEDIR}${ETCDIR}/conf/app.ini.defaults | ${INSTALL_DATA} ${GO_WRKSRC}/custom/conf/app.ini.sample ${STAGEDIR}${ETCDIR}/conf/app.ini.defaults | ||||
cd ${GO_WRKSRC} && ${COPYTREE_SHARE} "options public templates" ${STAGEDIR}${DATADIR} | cd ${GO_WRKSRC} && ${COPYTREE_SHARE} "options public templates" ${STAGEDIR}${DATADIR} | ||||
@${MKDIR} ${STAGEDIR}${DESTDIR}/var/db/${PORTNAME} | @${MKDIR} ${STAGEDIR}${DESTDIR}/var/db/${PORTNAME} | ||||
@${MKDIR} ${STAGEDIR}${DESTDIR}/var/log/${PORTNAME} | @${MKDIR} ${STAGEDIR}${DESTDIR}/var/log/${PORTNAME} | ||||
@${MKDIR} ${STAGEDIR}${DESTDIR}/var/run/${PORTNAME} | @${MKDIR} ${STAGEDIR}${DESTDIR}/var/run/${PORTNAME} | ||||
.include <bsd.port.mk> | .include <bsd.port.mk> |