blob: 6dd050a2681ba4d0dde74cffba616107d982beb7 (
plain)
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
77
78
79
80
81
82
83
84
85
86
87
|
PORTNAME= gitolite
PORTVERSION= 2.3.1
DISTVERSIONPREFIX= v
PORTREVISION= 1
CATEGORIES= devel
PKGNAMESUFFIX= 2
MAINTAINER= ports@FreeBSD.org
COMMENT= Access control layer on top of git
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/doc/COPYING
RUN_DEPENDS= git>=0:devel/git
USE_GITHUB= yes
GH_ACCOUNT= sitaramc
CONFLICTS= gitolite-[^2]*
USES= cpe perl5 shebangfix
CPE_VENDOR= sitaram_chamarty
SHEBANG_FILES= hooks/common/update \
src/gl-admin-push \
src/gl-auth-command \
src/gl-compile-conf \
src/gl-conf-convert \
src/gl-dryrun \
src/gl-install \
src/gl-mirror-push \
src/gl-mirror-shell \
src/gl-query-rc \
src/gl-setup \
src/gl-setup-authkeys \
src/gl-time \
src/gl-tool \
src/sshkeys-lint
NO_ARCH= yes
SUB_FILES= pkg-message
OPTIONS_DEFINE= GITUSER
OPTIONS_SUB= yes
GITUSER_DESC= Create git user as gitolite provider
GITUSER_VARS= USERS=git GROUPS=git
GLAUTHCOMMAND= \
\#!/bin/sh\n \
exec ${PREFIX}/libexec/gitolite/gl-auth-command \"\$$@\"\n
GLSETUP= \
\#!/bin/sh\n \
exec ${PREFIX}/libexec/gitolite/gl-setup \"\$$@\"\n
post-patch:
@${ECHO} -e "${GLAUTHCOMMAND}" > ${WRKDIR}/auth-command
@${ECHO} -e "${GLSETUP}" > ${WRKDIR}/setup
do-build:
echo "v${PORTVERSION}-0-g${GH_TAGNAME}" > ${WRKSRC}/conf/VERSION
-@${RM} ${WRKSRC}/src/gl-system-install
@${REINPLACE_CMD} \
-E 's%^GL_PACKAGE_CONF=.*%GL_PACKAGE_CONF=${DATADIR}/conf;%' \
${WRKSRC}/src/gl-setup
@${REINPLACE_CMD} \
-E "s%^[[:blank:]]*\\\$$GL_PACKAGE_CONF[[:blank:]]*=.*%\$$GL_PACKAGE_CONF = '${DATADIR}/conf';%" \
${WRKSRC}/conf/example.gitolite.rc
@${REINPLACE_CMD} \
-E "s%^[[:blank:]]*\\\$$GL_PACKAGE_HOOKS[[:blank:]]*=.*%\$$GL_PACKAGE_HOOKS = '${DATADIR}/hooks';%" \
${WRKSRC}/conf/example.gitolite.rc
post-build:
@${FIND} ${WRKSRC} -name "*.bak" -delete
@${FIND} ${WRKSRC} -name "*.orig" -delete
do-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/libexec/gitolite
${INSTALL_SCRIPT} ${WRKSRC}/src/* ${STAGEDIR}${PREFIX}/libexec/gitolite/
@${MKDIR} ${STAGEDIR}${DATADIR}/conf
${INSTALL_DATA} ${WRKSRC}/conf/* ${STAGEDIR}${DATADIR}/conf
@${MKDIR} ${STAGEDIR}${DATADIR}/hooks
(cd ${WRKSRC}/hooks && ${COPYTREE_BIN} \* ${STAGEDIR}${DATADIR}/hooks)
${INSTALL_SCRIPT} ${WRKDIR}/auth-command ${STAGEDIR}${PREFIX}/bin/gl-auth-command
${INSTALL_SCRIPT} ${WRKDIR}/setup ${STAGEDIR}${PREFIX}/bin/gl-setup
.include <bsd.port.mk>
|