freebsd-ports/devel/py-mercurialserver/Makefile

65 lines
1.8 KiB
Makefile
Raw Normal View History

mercurial-server gives your developers remote read/write access to centralized Mercurial repositories using SSH public key authentication; it provides convenient and fine-grained key management and access control. All of the repositories controlled by mercurial-server are owned by a single user (the "hg" user in what follows), but many remote users can act on them, and different users can have different permissions. We don't use file permissions to achieve that - instead, developers log in as the "hg" user when they connect to the repository host using SSH, using SSH URLs of the form "ssh://hg@repository-host/repository-name". A restricted shell prevents them from using this access for unauthorized purposes. Developers are authenticated only using SSH keys; no other form of authentication is supported. To give a user access to the repository, place their key in an appropriately-named subdirectory of "/usr/lcoal/etc/mercurialserver/keys" and run "refresh-auth". You can then control what access they have to what repositories by editing the control file "/usr/local/etc/mercurialserver/access.conf", which can match the names of these keys against a glob pattern. For convenient remote control of access, you can instead (if you have the privileges) make changes to a special repository called "hgadmin", which contains its own "access.conf" file and "keys" directory. Changes pushed to this repository take effect immediately. The two "access.conf" files are concatenated, and the keys directories merged. WWW: http://www.lshift.net/mercurial-server.html PR: ports/151993 Submitted by: Aldis Berjoza <aldis at bsdroot.lv>
2010-11-27 03:07:50 +01:00
# New ports collection Makefile for: mercurialserver
# Date Created: 12 Sep 2010
# Whom: Aldis Berjoza <aldis@bsdroot.lv>
#
# $FreeBSD$
#
PORTNAME= mercurialserver
PORTVERSION= 1.1.0
mercurial-server gives your developers remote read/write access to centralized Mercurial repositories using SSH public key authentication; it provides convenient and fine-grained key management and access control. All of the repositories controlled by mercurial-server are owned by a single user (the "hg" user in what follows), but many remote users can act on them, and different users can have different permissions. We don't use file permissions to achieve that - instead, developers log in as the "hg" user when they connect to the repository host using SSH, using SSH URLs of the form "ssh://hg@repository-host/repository-name". A restricted shell prevents them from using this access for unauthorized purposes. Developers are authenticated only using SSH keys; no other form of authentication is supported. To give a user access to the repository, place their key in an appropriately-named subdirectory of "/usr/lcoal/etc/mercurialserver/keys" and run "refresh-auth". You can then control what access they have to what repositories by editing the control file "/usr/local/etc/mercurialserver/access.conf", which can match the names of these keys against a glob pattern. For convenient remote control of access, you can instead (if you have the privileges) make changes to a special repository called "hgadmin", which contains its own "access.conf" file and "keys" directory. Changes pushed to this repository take effect immediately. The two "access.conf" files are concatenated, and the keys directories merged. WWW: http://www.lshift.net/mercurial-server.html PR: ports/151993 Submitted by: Aldis Berjoza <aldis at bsdroot.lv>
2010-11-27 03:07:50 +01:00
CATEGORIES= devel python
MASTER_SITES= http://dev.lshift.net/paul/mercurial-server/
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTNAME= ${SNAME}_${SVERSION}
mercurial-server gives your developers remote read/write access to centralized Mercurial repositories using SSH public key authentication; it provides convenient and fine-grained key management and access control. All of the repositories controlled by mercurial-server are owned by a single user (the "hg" user in what follows), but many remote users can act on them, and different users can have different permissions. We don't use file permissions to achieve that - instead, developers log in as the "hg" user when they connect to the repository host using SSH, using SSH URLs of the form "ssh://hg@repository-host/repository-name". A restricted shell prevents them from using this access for unauthorized purposes. Developers are authenticated only using SSH keys; no other form of authentication is supported. To give a user access to the repository, place their key in an appropriately-named subdirectory of "/usr/lcoal/etc/mercurialserver/keys" and run "refresh-auth". You can then control what access they have to what repositories by editing the control file "/usr/local/etc/mercurialserver/access.conf", which can match the names of these keys against a glob pattern. For convenient remote control of access, you can instead (if you have the privileges) make changes to a special repository called "hgadmin", which contains its own "access.conf" file and "keys" directory. Changes pushed to this repository take effect immediately. The two "access.conf" files are concatenated, and the keys directories merged. WWW: http://www.lshift.net/mercurial-server.html PR: ports/151993 Submitted by: Aldis Berjoza <aldis at bsdroot.lv>
2010-11-27 03:07:50 +01:00
MAINTAINER= aldis@bsdroot.lv
COMMENT= Software for hosting mercurial repositories
RUN_DEPENDS= hg:${PORTSDIR}/devel/mercurial
WRKSRC= ${WRKDIR}/${SNAME}_${SVERSION}
mercurial-server gives your developers remote read/write access to centralized Mercurial repositories using SSH public key authentication; it provides convenient and fine-grained key management and access control. All of the repositories controlled by mercurial-server are owned by a single user (the "hg" user in what follows), but many remote users can act on them, and different users can have different permissions. We don't use file permissions to achieve that - instead, developers log in as the "hg" user when they connect to the repository host using SSH, using SSH URLs of the form "ssh://hg@repository-host/repository-name". A restricted shell prevents them from using this access for unauthorized purposes. Developers are authenticated only using SSH keys; no other form of authentication is supported. To give a user access to the repository, place their key in an appropriately-named subdirectory of "/usr/lcoal/etc/mercurialserver/keys" and run "refresh-auth". You can then control what access they have to what repositories by editing the control file "/usr/local/etc/mercurialserver/access.conf", which can match the names of these keys against a glob pattern. For convenient remote control of access, you can instead (if you have the privileges) make changes to a special repository called "hgadmin", which contains its own "access.conf" file and "keys" directory. Changes pushed to this repository take effect immediately. The two "access.conf" files are concatenated, and the keys directories merged. WWW: http://www.lshift.net/mercurial-server.html PR: ports/151993 Submitted by: Aldis Berjoza <aldis at bsdroot.lv>
2010-11-27 03:07:50 +01:00
LICENSE= GPLv2
SNAME= mercurial-server
SVERSION= 1.1
mercurial-server gives your developers remote read/write access to centralized Mercurial repositories using SSH public key authentication; it provides convenient and fine-grained key management and access control. All of the repositories controlled by mercurial-server are owned by a single user (the "hg" user in what follows), but many remote users can act on them, and different users can have different permissions. We don't use file permissions to achieve that - instead, developers log in as the "hg" user when they connect to the repository host using SSH, using SSH URLs of the form "ssh://hg@repository-host/repository-name". A restricted shell prevents them from using this access for unauthorized purposes. Developers are authenticated only using SSH keys; no other form of authentication is supported. To give a user access to the repository, place their key in an appropriately-named subdirectory of "/usr/lcoal/etc/mercurialserver/keys" and run "refresh-auth". You can then control what access they have to what repositories by editing the control file "/usr/local/etc/mercurialserver/access.conf", which can match the names of these keys against a glob pattern. For convenient remote control of access, you can instead (if you have the privileges) make changes to a special repository called "hgadmin", which contains its own "access.conf" file and "keys" directory. Changes pushed to this repository take effect immediately. The two "access.conf" files are concatenated, and the keys directories merged. WWW: http://www.lshift.net/mercurial-server.html PR: ports/151993 Submitted by: Aldis Berjoza <aldis at bsdroot.lv>
2010-11-27 03:07:50 +01:00
HGUSER= hg
HGGROUP= hg
USE_PYTHON= 2.6+
USE_PYDISTUTILS=YES
PYDISTUTILS_PKGNAME=${SNAME}
PYDISTUTILS_PKGVERSION=${SVERSION}
mercurial-server gives your developers remote read/write access to centralized Mercurial repositories using SSH public key authentication; it provides convenient and fine-grained key management and access control. All of the repositories controlled by mercurial-server are owned by a single user (the "hg" user in what follows), but many remote users can act on them, and different users can have different permissions. We don't use file permissions to achieve that - instead, developers log in as the "hg" user when they connect to the repository host using SSH, using SSH URLs of the form "ssh://hg@repository-host/repository-name". A restricted shell prevents them from using this access for unauthorized purposes. Developers are authenticated only using SSH keys; no other form of authentication is supported. To give a user access to the repository, place their key in an appropriately-named subdirectory of "/usr/lcoal/etc/mercurialserver/keys" and run "refresh-auth". You can then control what access they have to what repositories by editing the control file "/usr/local/etc/mercurialserver/access.conf", which can match the names of these keys against a glob pattern. For convenient remote control of access, you can instead (if you have the privileges) make changes to a special repository called "hgadmin", which contains its own "access.conf" file and "keys" directory. Changes pushed to this repository take effect immediately. The two "access.conf" files are concatenated, and the keys directories merged. WWW: http://www.lshift.net/mercurial-server.html PR: ports/151993 Submitted by: Aldis Berjoza <aldis at bsdroot.lv>
2010-11-27 03:07:50 +01:00
CONF_FILES= access.conf \
remote-hgrc.d/access.rc \
remote-hgrc.d/logging.rc
.include <bsd.port.pre.mk>
pre-patch:
${SED} -I .orig -e "s#/etc/mercurial-server/#${PREFIX}/etc/${PORTNAME}/#" ${WRKSRC}/src/init/dot-mercurial-server
pre-su-install:
@${SETENV} PKG_PREFIX=${PREFIX} GITUSER=${HGUSER} \
GITGROUP=${HGGROUP} GITHOME=${HGHOME} \
${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
post-install:
${MKDIR} ${PREFIX}/etc/${PORTNAME}/remote-hgrc.d
${MKDIR} ${PREFIX}/etc/${PORTNAME}/keys/users
${MKDIR} ${PREFIX}/etc/${PORTNAME}/keys/root
.for i in ${CONF_FILES}
${INSTALL_DATA} ${WRKSRC}/src/init/conf/${i} ${PREFIX}/etc/${PORTNAME}/${i}
.endfor
${MV} ${PREFIX}/hg/dot-mercurial-server ${PREFIX}/hg/.mercurial-server
${MV} ${PREFIX}/hg/hgadmin-hgrc ${PREFIX}/hg/.hgadmin-hgrc
${RM} ${PREFIX}/hg/hginit
${MKDIR} ${PREFIX}/hg/.ssh
${MKDIR} ${PREFIX}/hg/repos
${CHOWN} -R ${HGUSER}:${HGGROUP} ${PREFIX}/hg
@${ECHO_MSG}
@${ECHO_MSG} "NOTE: ${PORTNAME} has been patched to use ${PREFIX}/etc/${PORTNAME}"
@${ECHO_MSG} " instead of /etc/mercurial-server"
@${ECHO_MSG}
.include <bsd.port.post.mk>