freebsd-ports/devel/gitolite/Makefile
Dmitry Marakasov 12c44ab97f - Add LICENSE_FILE
- Add CPE info
- Fix whitespace

Approved by:	portmgr blanket
2015-05-08 08:24:03 +00:00

76 lines
1.8 KiB
Makefile

# $FreeBSD$
PORTNAME= gitolite
PORTVERSION= 3.6.1
PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= devel
MASTER_SITES= GH \
LOCAL/milki \
LOCAL/tdb
MAINTAINER= milki@FreeBSD.org
COMMENT= Access control layer on top of git
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
RUN_DEPENDS= git>=0:${PORTSDIR}/devel/git \
p5-JSON>=0:${PORTSDIR}/converters/p5-JSON
USE_GITHUB= yes
GH_ACCOUNT= sitaramc
GH_TAGNAME= 3455375
CONFLICTS= gitolite-[^3]*
USES= cpe perl5
CPE_VENDOR= sitaram_chamarty
SUB_FILES= pkg-message
OPTIONS_DEFINE= GITUSER DOCS
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_TAGNAME}" > ${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
${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_MAN} ${WRKSRC}/README.txt ${STAGEDIR}${DOCSDIR}
${INSTALL_MAN} ${WRKSRC}/CHANGELOG ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>