aboutsummaryrefslogtreecommitdiff
path: root/devel/gitlist/Makefile
blob: 7eb6403270db3e682e75ff38e2f50064d8b5aecc (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
# Created by: Andre Rikkert de Koe - ARK-ICT <andre@ark-ict.nl>

PORTNAME=	gitlist
DISTVERSION=	1.1.1
CATEGORIES=	devel www
MASTER_SITES=	https://github.com/klaussilveira/gitlist/releases/download/${DISTVERSION}/ \
		https://freebsd.ark-ict.nl/ports/

MAINTAINER=	freebsd-ports@misc.ark-ict.nl
COMMENT=	Web based Git repository browser written in PHP

LICENSE=	BSD3CLAUSE
LICENSE_FILE=	${WRKSRC}/LICENSE.txt

RUN_DEPENDS=	git:devel/git

NO_BUILD=	yes
USES=		cpe php:web zip
USE_PHP=	ctype hash json simplexml

PLIST=		${WRKDIR}/plist
NO_WRKSUBDIR=	yes

USERS?=		${WWWOWN}
GROUPS?=	${WWWGRP}
SUB_FILES=	pkg-message

post-patch:
	${MKDIR} ${WRKSRC}/cache
	cd ${WRKSRC}; \
	${REINPLACE_CMD} -e 's|/usr/bin/git|/usr/local/bin/git|g' config.ini-example; \
	${FIND} . ! -type d | ${SORT} | ${SED} -e "s,^\.,%%WWWDIR%%," > ${PLIST};
	${ECHO} "@dir(${WWWOWN},${WWWGRP},) %%WWWDIR%%/vendor/twig/twig/doc" >> ${PLIST}
	${ECHO} "@dir(${WWWOWN},${WWWGRP},) %%WWWDIR%%/cache" >> ${PLIST}

do-install:
	cd ${WRKSRC}; \
	IFS="$$(printf '\n\t')"; \
	for src in $$( ${FIND} . ); do \
		dst="${STAGEDIR}${WWWDIR}$${src#.}"; \
		if ${TEST} -d "$$src"; then \
			${MKDIR} "$$dst"; \
		else \
			${INSTALL_DATA} "$$src" "$$dst"; \
		fi \
	done
	${RM} -r "${WWWDIR}/cache/views"

.include <bsd.port.mk>