FreeBSD Bugzilla – Attachment 255336 Details for
Bug 256694
net-p2p/rtorrent: drop EXAMPLES, add rc.d script.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
6c34e8ea60.patch (text/plain), 4.99 KB, created by
Ivan Rozhuk
on 2024-11-20 22:55:08 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Ivan Rozhuk
Created:
2024-11-20 22:55:08 UTC
Size:
4.99 KB
patch
obsolete
>From 6c34e8ea60e8050900455d37ba4698f404ba86b3 Mon Sep 17 00:00:00 2001 >From: Rozhuk Ivan <rozhuk.im@gmail.com> >Date: Wed, 23 Dec 2020 03:31:45 +0300 >Subject: [PATCH] net-p2p/rtorrent: drop EXAMPLES, add rc.d script. > >Private patch. >--- > net-p2p/rtorrent/Makefile | 17 +++--- > net-p2p/rtorrent/files/rtorrent.in | 97 ++++++++++++++++++++++++++++++ > 2 files changed, 107 insertions(+), 7 deletions(-) > create mode 100755 net-p2p/rtorrent/files/rtorrent.in > >diff --git a/net-p2p/rtorrent/Makefile b/net-p2p/rtorrent/Makefile >index 97464b276bcc..df3d0953ce62 100644 >--- a/net-p2p/rtorrent/Makefile >+++ b/net-p2p/rtorrent/Makefile >@@ -22,11 +22,13 @@ LDFLAGS+= -lexecinfo -pthread > > SUB_FILES= pkg-message > >-PLIST_FILES= bin/rtorrent >+PLIST_FILES= bin/rtorrent \ >+ "@dir ${ETCDIR}" \ >+ "@sample ${ETCDIR}/rtorrent.config.sample" > PORTDOCS= README >-PORTEXAMPLES= rtorrent.rc >+USE_RC_SUBR= rtorrent > >-OPTIONS_DEFINE= DOCS EXAMPLES IPV6 XMLRPC >+OPTIONS_DEFINE= DOCS IPV6 XMLRPC > OPTIONS_DEFAULT= XMLRPC > XMLRPC_DESC= Compile with xmlrpc-c support > >@@ -35,12 +37,13 @@ XMLRPC_LIB_DEPENDS= libxmlrpc.so:net/xmlrpc-c > XMLRPC_CONFIGURE_ON= --with-xmlrpc-c > XMLRPC_CONFIGURE_OFF= --with-xmlrpc-c=no > >+post-install: >+ ${MKDIR} ${STAGEDIR}${ETCDIR} >+ ${INSTALL_DATA} ${WRKSRC}/doc/rtorrent.rc \ >+ ${STAGEDIR}${ETCDIR}/rtorrent.config.sample >+ > post-install-DOCS-on: > @${MKDIR} ${STAGEDIR}${DOCSDIR}/ > ${INSTALL_DATA} ${WRKSRC}/${PORTDOCS} ${STAGEDIR}${DOCSDIR}/ > >-post-install-EXAMPLES-on: >- @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/ >- ${INSTALL_DATA} ${WRKSRC}/doc/rtorrent.rc ${STAGEDIR}${EXAMPLESDIR}/ >- > .include <bsd.port.mk> >diff --git a/net-p2p/rtorrent/files/rtorrent.in b/net-p2p/rtorrent/files/rtorrent.in >new file mode 100755 >index 000000000000..4e1812ea4956 >--- /dev/null >+++ b/net-p2p/rtorrent/files/rtorrent.in >@@ -0,0 +1,97 @@ >+#!/bin/sh >+### Rozhuk Ivan 2009.12-2024 >+### startup script file for rtorrent >+### >+ >+# PROVIDE: rtorrent >+# REQUIRE: LOGIN >+# KEYWORD: shutdown >+ >+. /etc/rc.subr >+ >+name="rtorrent" >+rcvar=rtorrent_enable >+ >+load_rc_config $name >+ >+: ${rtorrent_enable='NO'} >+: ${rtorrent_pidfile="/var/run/${name}.pid"} >+: ${rtorrent_user='www'} >+: ${rtorrent_group='www'} >+: ${rtorrent_args=''} >+: ${rtorrent_bindaddr=''} # Bind listening socket and outgoing connections to this network interface address. >+: ${rtorrent_bindport=''} # Try to open a listening port in the range a up to and including b >+: ${rtorrent_download_dir=''} # Set the default download directory. >+: ${rtorrent_session_dir="/var/db/${name}"} # Session management will be enabled and the torrent files for all open downloads will be stored in this directory. >+: ${rtorrent_config="%%PREFIX%%/etc/${name}/${name}.conf"} # .rtorrent.rc config file name. >+: ${rtorrent_rpc_bindaddr=''} # tcp (ip:port) socket for scgi/rpc connect. >+: ${rtorrent_rpc_bindsocket="/var/run/${name}-rpc.sock"} # Unix domain socket for scgi/rpc connect. >+: ${rtorrent_rpc_bindsocket_mode='0660'} # Only for unix domain socket. >+ >+ >+command='/usr/sbin/daemon' >+procname='%%PREFIX%%/bin/rtorrent' >+command_args='-n' >+ >+if [ -n "${rtorrent_bindaddr}" ]; then >+ command_args="${command_args} -b ${rtorrent_bindaddr}" >+fi >+if [ -n "${rtorrent_bindport}" ]; then >+ command_args="${command_args} -p ${rtorrent_bindport}" >+fi >+if [ -n "${rtorrent_download_dir}" ]; then >+ command_args="${command_args} -d ${rtorrent_download_dir}" >+fi >+if [ -n "${rtorrent_session_dir}" ]; then >+ command_args="${command_args} -s ${rtorrent_session_dir}" >+fi >+if [ -n "${rtorrent_config}" ]; then >+ command_args="${command_args} -o import=${rtorrent_config}" >+fi >+if [ -n "${rtorrent_rpc_bindsocket}" ]; then >+ command_args="${command_args} -o scgi_local=${rtorrent_rpc_bindsocket}" >+else >+ if [ -n "${rtorrent_rpc_bindaddr}" ]; then >+ command_args="${command_args} -o scgi_local=${rtorrent_rpc_bindaddr}" >+ fi >+fi >+command_args="-p ${rtorrent_pidfile} -S -T ${name} ${procname} ${command_args} -o session.path.set=${rtorrent_session_dir} -o system.daemon.set=yes ${rtorrent_args}" >+ >+ >+pidfile="${rtorrent_pidfile}" >+required_dirs="${rtorrent_download_dir}" >+required_files="${command} ${procname}" >+ >+ >+start_precmd="${name}_start_precmd" >+start_postcmd="${name}_start_postcmd" >+stop_postcmd="${name}_clean_cmd" >+ >+rtorrent_start_precmd() >+{ >+ # create the file pid, and directory, with correct permissions >+ if [ ! -e "${pidfile}" ]; then >+ install -o "${rtorrent_user}" -g "${rtorrent_group}" /dev/null "${pidfile}"; >+ else >+ chown "${rtorrent_user}:${rtorrent_group}" "${pidfile}"; >+ fi >+ mkdir -p "${rtorrent_session_dir}" >+ chown -R "${rtorrent_user}:${rtorrent_group}" "${rtorrent_session_dir}" >+ if [ -n "${rtorrent_session_dir}" ]; then >+ rm -f "${rtorrent_session_dir}/rtorrent.lock" >+ fi >+ if [ -e "${rtorrent_rpc_bindsocket}" ]; then >+ rm -f "${rtorrent_rpc_bindsocket}" >+ fi >+} >+ >+rtorrent_start_postcmd() >+{ >+ if [ -S "${rtorrent_rpc_bindsocket}" ]; then >+ sleep 2 >+ chown "${rtorrent_user}:${rtorrent_group} ${rtorrent_rpc_bindsocket}" >+ chmod "${rtorrent_rpc_bindsocket_mode} ${rtorrent_rpc_bindsocket}" >+ fi >+} >+ >+run_rc_command "$1"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
rozhuk.im
:
maintainer-approval?
Actions:
View
|
Diff
Attachments on
bug 256694
:
225906
|
255214
| 255336