# Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: Exp $ EAPI=5 inherit eutils multilib-minimal user versionator MY_P="${PN}-alpha-v$(get_major_version)_$(get_version_component_range 2)" DESCRIPTION="Headless version of popular Windows bittorrent client" HOMEPAGE="http://www.utorrent.com/downloads/linux" SRC_URI=" x86? ( http://download.ap.bittorrent.com/track/beta/endpoint/utserver/os/linux-i386-ubuntu-13-04 -> "${MY_P}-x86".tar.gz ) amd64? ( http://download.ap.bittorrent.com/track/beta/endpoint/utserver/os/linux-x64-ubuntu-13-04 -> "${MY_P}-amd64".tar.gz ) " LICENSE="EULA" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="" RESTRICT="strip" RDEPEND="dev-libs/openssl:0 >=sys-libs/glibc-2.14" S="${WORKDIR}/${MY_P}" src_unpack() { unpack ${MY_P}-$(usex amd64 "amd64" "x86").tar.gz } pkg_setup() { enewgroup utserver enewuser utserver -1 -1 /var/lib/utorrent-server utserver } src_install() { insinto "/usr/share/${PN}" doins "${S}/webui.zip" doins "${FILESDIR}/utorrent-server.conf" doexe "${S}/utserver" cd docs dodoc Changes.txt Server_Changes.txt uTorrent_Server.txt dohtml Server_Changes.html uTorrent_Server.html insinto /usr/share/doc/${PF}/html doins footer_ut_address.gif style.css ut-logo.gif insinto "/etc" doins "${FILESDIR}/utorrent-server.conf" newinitd "${FILESDIR}/utorrent-server.init" utorrent-server dodir \ var/lib/${PN} \ var/log/${PN} \ var/run/${PN} fowners utserver:utserver \ /etc/${PN}.conf \ /var/lib/${PN} \ /var/log/${PN} \ /var/run/${PN} fperms 0750 \ /etc/${PN}.conf \ /var/lib/${PN} \ /var/log/${PN} \ /var/run/${PN} } pkg_postinst() { ewarn ewarn "Don't forget to review /etc/utorrent-server.conf. At the very least," ewarn "webui login/password and torrents data location must be configured." ewarn elog elog "Browse http://admin:admin@localhost:8080/gui to access webui." elog "Try alternative web interface: http://forum.utorrent.com/viewtopic.php?id=58156" elog }