overlay/net-misc/twonkymedia/twonkymedia-8.2.ebuild
Mario Fetka 88d7aa84f9 Bump
Package-Manager: portage-2.2.20
RepoMan-Options: --force
2016-01-10 18:09:56 +01:00

89 lines
2.0 KiB
Bash

# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit eutils multilib systemd
PV86_AT="7.3"
SUFFIX="zip"
X86_AT="twonky-i686-glibc-2.9-${PV}.${SUFFIX}"
AMD64_AT="twonky-x86-64-glibc-2.9-${PV}.${SUFFIX}"
ARMV5_AT="twonky-kirkwood-${PV}.${SUFFIX}"
# not tested on armv6
ARMV6_AT="twonky-armel-glibc-2.2.5-${PV}.${SUFFIX}"
ARMV7_AT="twonky-armel-glibc-2.15-hf-${PV}.${SUFFIX}"
DESCRIPTION="Stream your Media to the devices on your Netowrk"
HOMEPAGE="http://www.twonky.com/"
URL_BASE="http://www.twonkyforum.com/downloads/${PV}"
URL_SPECIAL="http://www.twonkyforum.com/downloads/${PV}-special"
SRC_URI="arm? ( ${URL_BASE}/${ARMV5_AT}
${URL_BASE}/${ARMV6_AT}
${URL_BASE}/${ARMV7_AT} )
x86? ( ${URL_BASE}/${X86_AT} )
amd64? ( ${URL_BASE}/${AMD64_AT} )"
SLOT="0"
LICENSE="as-is"
KEYWORDS="~amd64 ~arm ~x86"
RESTRICT="strip"
IUSE=""
DEPEND="app-arch/unzip"
RDEPEND="sys-libs/glibc
sys-devel/gcc"
QA_EXECSTACK="opt/twonkymedia/twonkystarter
opt/twonkymedia/cgi-bin/convert
opt/twonkymedia/cgi-bin/cgi-jpegscale
opt/twonkymedia/twonkywebdav
opt/twonkymedia/twonkyproxy
opt/twonkymedia/plugins/itunes-import
opt/twonkymedia/twonkyserver"
S="${WORKDIR}"
src_unpack() {
einfo "Unpacking for arch ${CHOST/-*/}"
if [[ ${CHOST/-*/} = "armv5tel" ]]; then
unpack ${ARMV5_AT}
elif [[ ${CHOST/-*/} = "armv6j" ]]; then
unpack ${ARMV6_AT}
elif [[ ${CHOST/-*/} = "armv7a" ]]; then
unpack ${ARMV7_AT}
elif [[ ${ARCH} = "x86" ]]; then
unpack ${X86_AT}
elif [[ ${ARCH} = "amd64" ]]; then
unpack ${AMD64_AT}
fi
}
src_compile() { :; }
src_install() {
local dirs="cgi-bin plugins resources"
dodir /opt/${PN}
cp -pPR $dirs "${D}/opt/${PN}/" || die "failed to copy"
insinto /opt/${PN}
doins radio.m3u *.dat *.html *.ini *.gif *.license
exeinto /opt/${PN}
doexe twonkyserver twonkystarter
dodoc Linux-HowTo.txt twonky.sh *.pdf || die
newinitd "${FILESDIR}"/twonkymedia7.initd twonkymedia
keepdir /var/twonky
systemd_dounit "${FILESDIR}"/twonkymedia.service
}
#pkg_postinst() {
#}