diff options
Diffstat (limited to 'net/tor/Makefile')
-rw-r--r-- | net/tor/Makefile | 43 |
1 files changed, 35 insertions, 8 deletions
diff --git a/net/tor/Makefile b/net/tor/Makefile index 54880677890..ced22199200 100644 --- a/net/tor/Makefile +++ b/net/tor/Makefile @@ -1,18 +1,33 @@ -# $NetBSD: Makefile,v 1.5 2005/02/02 16:41:22 jschauma Exp $ +# $NetBSD: Makefile,v 1.6 2005/02/13 20:27:53 jschauma Exp $ # -DISTNAME= tor-0.0.9.3 +DISTNAME= tor-0.0.9.4 CATEGORIES= net security MASTER_SITES= http://tor.eff.org/dist/ MAINTAINER= jschauma@NetBSD.org -HOMEPAGE= http://tor.eff.org +HOMEPAGE= http://tor.eff.org/ COMMENT= Anonymizing overlay network for TCP +DEPENDS+= tsocks>=1.7:../../net/tsocks + +.include "../../mk/bsd.prefs.mk" + USE_BUILDLINK3= yes USE_PKGLOCALEDIR= yes GNU_CONFIGURE= yes + +TOR_USER?= tor +TOR_GROUP?= tor +PKG_HOME?= /var/chroot/tor + USE_PKGINSTALL= yes +RCD_SCRIPTS= tor +PKG_GROUPS= ${TOR_GROUP} +PKG_USERS= ${TOR_USER}:${TOR_GROUP}::Torifier:${PKG_HOME} +USER_GROUP= ${TOR_USER} ${TOR_GROUP} + +OWN_DIR_PERMS+= ${PKG_HOME} ${USER_GROUP} 0755 CONFIGURE_ARGS+= --localstatedir=${VARBASE} @@ -21,23 +36,35 @@ CONF_FILES+= ${PREFIX}/share/examples/tor/tor-tsocks.conf \ CONF_FILES+= ${PREFIX}/share/examples/tor/torrc.sample \ ${PKG_SYSCONFDIR}/tor/torrc +RCD_SCRIPT= tor + .include "../../mk/bsd.prefs.mk" .if !empty(PKGSRC_COMPILER:Mmipspro) CFLAGS+= -c99 .endif -do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/src/or/tor ${PREFIX}/bin/tor - ${INSTALL_SCRIPT} ${WRKSRC}/contrib/torify ${PREFIX}/bin/torify +post-patch: + ${SED} -e 's|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g' \ + -e 's|@PREFIX@|${PREFIX}|g' \ + -e 's|@PKG_HOME@|${PKG_HOME}|g' \ + -e 's|@TOR_USER@|${TOR_USER}|g' \ + -e 's|@TOR_GROUP@|${TOR_GROUP}|g' \ + -e 's|@RCD_SCRIPTS_SHELL@|${RCD_SCRIPTS_SHELL}|g' \ + ${FILESDIR}/tor.in > ${WRKSRC}/tor.pkgsrc.rc + +pre-install: + ${MKDIR} -m 0700 ${PKG_HOME} + +post-install: ${INSTALL_DATA_DIR} ${PKG_SYSCONFDIR}/tor ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/tor ${INSTALL_DATA} ${WRKSRC}/src/config/torrc.sample \ ${PREFIX}/share/examples/tor/torrc.sample ${INSTALL_DATA} ${WRKSRC}/contrib/tor-tsocks.conf \ ${PREFIX}/share/examples/tor/tor-tsocks.conf - ${INSTALL_MAN} ${WRKSRC}/doc/tor.1 ${PREFIX}/man/man1/tor.1 - ${INSTALL_MAN} ${WRKSRC}/contrib/torify.1 ${PREFIX}/man/man1/torify.1 + ${INSTALL_DATA} ${WRKSRC}/tor.pkgsrc.rc ${PREFIX}/${RCD_SCRIPTS_EXAMPLEDIR}/tor + ${CHOWN} ${TOR_USER}:${TOR_GROUP} ${PKG_HOME} .include "../../security/openssl/buildlink3.mk" .include "../../mk/bsd.pkg.mk" |