blob: 3ccc00984fbf260d558c90b4bf54c663215766aa (
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
# $FreeBSD$
PORTNAME= gitolite
PORTVERSION= 3.6.1
PORTEPOCH= 1
CATEGORIES= devel
MASTER_SITES= GH \
LOCAL/milki \
LOCAL/tdb
DISTNAME= g-${GH_ACCOUNT}-${GH_PROJECT}-${PORTVERSION}-${GH_COMMIT}
MAINTAINER= milki@FreeBSD.org
COMMENT= Access control layer on top of git
LICENSE= GPLv2
RUN_DEPENDS= git>=0:${PORTSDIR}/devel/git \
p5-JSON>=0:${PORTSDIR}/converters/p5-JSON
USE_GITHUB= yes
GH_ACCOUNT= sitaramc
GH_COMMIT= 3455375
GH_TAGNAME= ${GH_COMMIT}
CONFLICTS= gitolite-[^3]*
USES= perl5
SUB_FILES= pkg-message
OPTIONS_DEFINE= GITUSER
GITUSER_DESC= Create git user as gitolite provider
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MGITUSER}
USERS= git
GROUPS= ${USERS}
PLIST_SUB+= GITUSER=""
.else
PLIST_SUB+= GITUSER="@comment "
.endif
post-patch:
@${FIND} ${WRKSRC} \
-exec ${GREP} -qs \#\!/usr/bin/perl {} \; \
-exec ${REINPLACE_CMD} -Ee 's|#!/usr/bin/perl|#!${PERL}|' {} \;
@${FIND} ${WRKSRC} \
-exec ${GREP} -qs \#\!/bin/bash {} \; \
-exec ${REINPLACE_CMD} -Ee 's|#!/bin/bash|#!${LOCALBASE}/bin/bash|' {} \;
do-build:
echo "v${PORTVERSION}-0-g${GH_COMMIT}" > ${WRKSRC}/src/VERSION
@${MKDIR} ${WRKSRC}/lib
@${MV} ${WRKSRC}/src/lib/Gitolite ${WRKSRC}/lib/
@${RMDIR} ${WRKSRC}/src/lib
@${MV} ${WRKSRC}/check-g2-compat ${WRKSRC}/src/
@${MV} ${WRKSRC}/convert-gitosis-conf ${WRKSRC}/src/
post-build:
@${FIND} ${WRKSRC} -name "*.bak" -delete
@${FIND} ${WRKSRC} -name "*.orig" -delete
do-install:
@(cd ${WRKSRC}/src && ${COPYTREE_BIN} \* ${STAGEDIR}${PREFIX}/libexec/gitolite)
@(cd ${WRKSRC}/lib && ${COPYTREE_SHARE} Gitolite ${STAGEDIR}${PREFIX}/${SITE_PERL_REL}/)
@${LN} -s ${PREFIX}/libexec/gitolite/gitolite ${STAGEDIR}${PREFIX}/bin/gitolite
.if ${PORT_OPTIONS:MDOCS}
-@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_MAN} ${WRKSRC}/README.txt ${STAGEDIR}${DOCSDIR}
${INSTALL_MAN} ${WRKSRC}/CHANGELOG ${STAGEDIR}${DOCSDIR}
.endif
.include <bsd.port.mk>
|