Index: head/net-p2p/btpd/Makefile =================================================================== --- head/net-p2p/btpd/Makefile (revision 525824) +++ head/net-p2p/btpd/Makefile (revision 525825) @@ -1,27 +1,29 @@ # $FreeBSD$ PORTNAME= btpd DISTVERSIONPREFIX= v DISTVERSION= 0.16 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= net-p2p MAINTAINER= mat@FreeBSD.org COMMENT= Bittorrent client consisting of a daemon and client commands LICENSE= BSD2CLAUSE BSD3CLAUSE LICENSE_COMB= multi +USES= autoreconf ssl + USE_GITHUB= yes +USE_RC_SUBR= btpd -USES= autoreconf ssl GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-openssl=${OPENSSLBASE} OPTIONS_DEFINE= DOCS post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR} .include Index: head/net-p2p/btpd/files/btpd.in =================================================================== --- head/net-p2p/btpd/files/btpd.in (nonexistent) +++ head/net-p2p/btpd/files/btpd.in (revision 525825) @@ -0,0 +1,43 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: btpd +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# Add btpd_enable="YES" to /etc/rc.conf to enable btpd +# +# btpd_enable (bool): Set to "YES" to enable btpd +# +# btpd_flags (str): Additional flags for btpd +# +# btpd_user (str): Username to run btpd under + +. /etc/rc.subr + +name=btpd +desc="BTPD bittorrent daemon startup script" +rcvar=btpd_enable + +load_rc_config "${name}" + +start_precmd=btpd_prestart + +btpd_enable=${btpd_enable:-NO} +btpd_program=${btpd_program:-"%%PREFIX%%/bin/${name}"} +btpd_user=${btpd_user:-} + +btpd_prestart() +{ + if [ -n "${btpd_user}" ]; then + err 3 "btpd: btpd_user unset. Set it to an existing user and try again." + fi + + BTPD_HOME=$( /usr/sbin/pw usershow -7 -n "${btpd_user}" | /usr/bin/cut -d: -f6 ) + export BTPD_HOME +} + + +run_rc_command "$1" Property changes on: head/net-p2p/btpd/files/btpd.in ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property