mystuff/www/forgejo/Makefile

56 lines
1.6 KiB
Makefile
Raw Normal View History

2023-01-10 11:45:28 +01:00
COMMENT = compact self-hosted Git service
VERSION = 1.18.0-1
DISTNAME = v${VERSION}
PKGNAME = forgejo-${VERSION}
MASTER_SITES = https://codeberg.org/forgejo/forgejo/archive/
CATEGORIES = www devel
HOMEPAGE = https://forgejo.org
MAINTAINER = Stefan Hagen <sh+ports@codevoid.de>
# MIT
PERMIT_PACKAGE = Yes
WANTLIB += c pthread
MODULES = lang/go
GO_TAGS = sqlite sqlite_unlock_notify
MODGO_FLAGS += -tags "${GO_TAGS}"
MODGO_LDFLAGS += -X code.forgejo.io/forgejo/modules/setting.AppWorkPath=${LOCALBASE}/share/forgejo
MODGO_LDFLAGS += -X code.forgejo.io/forgejo/modules/setting.CustomConf=${SYSCONFDIR}/forgejo/app.ini
MODGO_LDFLAGS += -X code.forgejo.io/forgejo/modules/setting.CustomPath=${LOCALSTATEDIR}/forgejo/custom
MODGO_LDFLAGS += -X code.forgejo.io/forgejo/modules/setting.StaticRootPath=${LOCALBASE}/share/forgejo
MODGO_LDFLAGS += -X main.Version=${VERSION}
MODGO_LDFLAGS += -X 'main.Tags=${GO_TAGS}'
RUN_DEPENDS = devel/git \
shells/bash
ALL_TARGET = code.forgejo.io/forgejo
WRKSRC = ${MODGO_WORKSPACE}/forgejo/${ALL_TARGET}
SUBST_VARS = VARBASE
pre-configure:
${SUBST_CMD} ${WRKDIST}/custom/conf/app.example.ini
do-install:
${INSTALL_PROGRAM} ${MODGO_WORKSPACE}/bin/forgejo ${PREFIX}/sbin
${INSTALL_DATA_DIR} ${PREFIX}/share/forgejo
.for _d in custom/conf options templates
cp -Rp ${WRKSRC}/${_d} ${PREFIX}/share/forgejo
.endfor
${INSTALL_DATA_DIR} ${WRKINST}${VARBASE}/www/forgejo
cp -Rp ${WRKSRC}/public ${WRKINST}${VARBASE}/www/forgejo
ln -s ${VARBASE}/www/forgejo/public ${PREFIX}/share/forgejo/public
post-install:
@find ${WRKINST}/ -type f \
\( -name '*.beforesubst' -o -name '*${PATCHORIG}' \) -delete
.include <bsd.port.mk>