transmission-1.75

А тем временем net-p2p/transmission подрос до версии 1.75

Итак для тех кто жаждет ;)

transmission-1.75.ebuild

# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-p2p/transmission/transmission-1.75.ebuild,v 1.4 2009/01/02 21:00:15 ssuominen Exp $

EAPI=2

inherit autotools eutils fdo-mime gnome2-utils

DESCRIPTION="A Fast, Easy and Free BitTorrent client"
HOMEPAGE="http://www.transmissionbt.com"
SRC_URI="http://mirrors.m0k.org/transmission/files/${P}.tar.bz2"

LICENSE="MIT GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd"
IUSE="gtk libnotify"

RDEPEND=">=dev-libs/openssl-0.9.4
    || ( >=net-misc/curl-7.16.3[ssl] >=net-misc/curl-7.16.3[gnutls] )
    gtk? ( >=dev-libs/glib-2.15.5
    >=x11-libs/gtk+-2.6
    >=dev-libs/dbus-glib-0.70
    libnotify? ( >=x11-libs/libnotify-0.4.4 ) )"
DEPEND="${RDEPEND}
    sys-devel/gettext
    dev-util/intltool
    dev-util/pkgconfig"

src_prepare() {
    eautoreconf
}

src_configure() {
    local myconf="--disable-dependency-tracking --with-wx-config=no"

    econf \
    $(use_enable gtk) \
    $(use_enable libnotify) \
    ${myconf}
}

pkg_preinst() {
    gnome2_icon_savelist
}

src_install() {
    emake DESTDIR="${D}" install || die "emake install failed."
    dodoc AUTHORS NEWS
    rm -f "${D}"/usr/share/${PN}/web/LICENSE

    newinitd "${FILESDIR}"/${PN}.initd transmission
    newconfd "${FILESDIR}"/${PN}.confd transmission
}

pkg_postinst() {
    fdo-mime_desktop_database_update
    gnome2_icon_cache_update
}

pkg_postrm() {
    fdo-mime_desktop_database_update
    gnome2_icon_cache_update
}

files/transmission.confd

# For information on options, see the transmission-daemon(1) man page.
#
# The commented variables in this file are the defaults that are used
# in the init-script.  You don't need to uncomment them except to
# customize them to different values.

#
# ----- MAIN CONFIGURATION -----
#

# The folder where Transmission stores its config and .torrent files
# TR_HOME=/var/transmission/config

# The folder where Transmission stores downloads
# TR_DOWNLOAD=/var/transmission/downloads

# The port Transmission uses to connect to other peers
# TR_PORT=54318

# The name of the user that runs transmission-daemon and owns the files
# TR_USERNAME=nobody

# Login credentials for the Web- and the RPC-interface
# - default: leave commented/empty to disable access authentication
# REMOTE_USER=""
# REMOTE_PASS=""
# - alternative: set a user name and password
#REMOTE_USER=admin
#REMOTE_PASS=password

#
# ----- ADVANCED OPTIONS -----
#

# Acces control lists
# (machines/networks allowed to access transmission rpc -- comma separated)
# TR_ACL="127.0.0.1"

# Enable use of block lists
# (read the Wiki about what else needs to be done)
# TR_BLOCK=no

# Control port used
# only privileged users can use ports < 1024, this applies to TR_USERNAME
# CTL_PORT=9091

# Initial speed limits (in K/s)
# default: no limits? 100/100 seems to be the hardcoded default
# TR_UP_SPEED=unlimited
# TR_DN_SPEED=unlimited

# Peer exchange
# TR_PX=no

# Port mapping using NAT/UPnP
# TR_PMAP=no

# Encryption
# Any of :
# TR_ENCRYPT=tolerated
# TR_ENCRYPT=prefered
# TR_ENCRYPT=required

# Overall peer limit.
# TR_PEERS=240

# Peer limit per torrent.
# TR_PPT=60

files/transmission.initd

#!/sbin/runscript
#

# DO NOT EDIT!
# ------------
# All configurable options are set in /etc/conf.d/transmission

NAME=transmission-daemon
DAEMON=$(which $NAME)
PIDFILE=/var/run/$NAME.pid

declare -a OPTIONS
OPTIONS+=" -a ${TR_ACL:=127.0.0.1}"
if [ -z "$TR_BLOCK" -o "$TR_BLOCK" = "no" ]; then
   OPTIONS+=" -B"
else
   OPTIONS+=" -b"
fi
OPTIONS+=" -g ${TR_HOME:-/var/transmission/config}"
OPTIONS+=" -l ${TR_PPT:-60}"
OPTIONS+=" -L ${TR_PEERS:-240}"
if [ -z "$TR_PMAP" -o "$TR_PMAP" = "no" ]; then
  OPTIONS+=" -M"
else
  OPTIONS+=" -m"
fi
if [ -z "$TR_ENCRYPT" -o "$TR_ENCRYPT" = "tolerated" ]; then
  OPTIONS+=" -et"
elif [ "$TR_ENCRYPT" = "prefered" ]; then
  OPTIONS+=" -ep"
elif [ "$TR_ENCRYPT" = "required" ]; then
  OPTIONS+=" -er"
else
  OPTIONS+=" -et"
fi
OPTIONS+=" -p ${CTL_PORT:-9091}"
OPTIONS+=" -P ${TR_PORT:-54318}"
if [ -z "$REMOTE_USER" -o -z "$REMOTE_PASS" ]; then
   OPTIONS+=" -T"
else
   OPTIONS+=" -t"
   OPTIONS+=" -u $REMOTE_USER"
   OPTIONS+=" -v $REMOTE_PASS"
fi
OPTIONS+=" -w ${TR_DOWNLOAD:-/var/transmission/downloads}"
declare -a EXTRA_OPT
if [ -z "$TR_UP_SPEED" -o "$TR_UP_SPEED" = "unlimited" ]; then
   EXTRA_OPT+=" -U"
else
   EXTRA_OPT+=" -u $TR_UP_SPEED"
fi
if [ -z "$TR_DN_SPEED" -o "$TR_DN_SPEED" = "unlimited" ]; then
   EXTRA_OPT+=" -D"
else
   EXTRA_OPT+=" -d $TR_DN_SPEED"
fi
if [ -z "$TR_PX" -o "$TR_PX" = "no" ]; then
  EXTRA_OPT+=" -X"
else
  EXTRA_OPT+=" -x"
fi

E_MSG="ERROR starting transmission, check configuration."

depend() {
   need net
}

start() {
   ebegin "Starting transmission daemon"
   start-stop-daemon --start --quiet \
      --chuid ${TR_USERNAME:-nobody} \
      --exec $DAEMON -- ${OPTIONS[@]} \
   || { eerror $E_MSG; eend 1; return 1; }
   sleep 2
   /usr/bin/transmission-remote ${CTL_PORT:-9091} \
      ${REMOTE_PASS:+-n $REMOTE_USER:$REMOTE_PASS} \
      ${EXTRA_OPT[@]} > /dev/null
   eend $?
}

stop() {
   ebegin "Stopping transmission daemon"
   pidof $NAME > $PIDFILE
   start-stop-daemon --stop --quiet --retry TERM/45/QUIT/15 \
      --pidfile $PIDFILE && rm -f $PIDFILE
   eend $RETVAL
}

# vim: set ft=gentoo-init-d ts=3 sw=3 et:

Сохраняем файлы в локальный оверлей /usr/local/portage/net-p2p/transmission далее после

cd /usr/local/portage/net-p2p/transmission;
ebuild transmission-1.75.ebuild digest;
emerge =transmission-1.75

не забудьте отредактировать файлы /etc/conf.d/transmission и /etc/init.d/transmission по своему вкусу.

Ну а запускать как и обычно.

Comments