aboutsummaryrefslogtreecommitdiff
path: root/www/gitea/Makefile
blob: 6e9746fda4cdcbe7d560542deee90d9784044713 (plain) (blame)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Created by: Stefan Bethke <stb@lassitu.de>
# $FreeBSD$

PORTNAME=	gitea
PORTVERSION=	1.1.4
DISTVERSIONPREFIX=	v
CATEGORIES=	www

MAINTAINER=	stb@lassitu.de
COMMENT=	Compact self-hosted Git service

LICENSE=	MIT
LICENSE_FILE=	${WRKSRC}/LICENSE

RUN_DEPENDS=	bash:shells/bash \
		git:devel/git

USES=		go
USE_GITHUB=	yes
GH_ACCOUNT=	go-gitea

GO_PKGNAME=	code.gitea.io/${PORTNAME}
GO_TARGET=	-tags "${GO_TAGS}"

USE_RC_SUBR=	gitea
SUB_FILES+=	app.ini.sample
SUB_LIST+=	GITUSER=${USERS}

USERS=		git
GROUPS=		git

OPTIONS_DEFINE=	CERT PAM SQLITE
CERT_DESC=	Automatic creation of self-signed certificates
PAM_DESC=	Authentication using PAM
SQLITE=		Add SQLite as database backend

OPTIONS_DEFAULT=	${OPTIONS_DEFINE}

CERT_VARS=	GO_TAGS+=cert
PAM_VARS=	GO_TAGS+=pam
SQLITE_VARS=	GO_TAGS+=sqlite

do-install:
	${INSTALL_PROGRAM} ${GO_WRKDIR_BIN}/${PORTNAME} ${STAGEDIR}${PREFIX}/sbin
	${MKDIR} ${STAGEDIR}${ETCDIR}/conf
	${INSTALL_DATA} ${WRKDIR}/app.ini.sample ${STAGEDIR}${ETCDIR}/conf/app.ini.sample
	${INSTALL_DATA} ${GO_WRKSRC}/conf/app.ini ${STAGEDIR}${ETCDIR}/conf/app.ini.defaults
	${MKDIR} ${STAGEDIR}${DATADIR}
	(cd ${GO_WRKSRC} && ${COPYTREE_SHARE} "options public templates" ${STAGEDIR}${DATADIR})

	${MKDIR} ${STAGEDIR}${DESTDIR}/var/db/${PORTNAME}
	${MKDIR} ${STAGEDIR}${DESTDIR}/var/log/${PORTNAME}
	${MKDIR} ${STAGEDIR}${DESTDIR}/var/run/${PORTNAME}

.include <bsd.port.mk>