overlay/net-misc/twonkymedia/twonkymedia-7.0.9.ebuild
Mario Fetka d58d3e5508 Add systemd start file
Package-Manager: portage-2.2.7
RepoMan-Options: --force
2014-01-18 14:31:56 +01:00

88 lines
2.1 KiB
Bash

# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit eutils multilib systemd
SUFFIX="zip"
X86_AT="twonky-i386-glibc-2.2.5-free-${PV}.${SUFFIX}"
AMD64_AT="twonky-i386-glibc-2.2.5-free-${PV}.${SUFFIX}"
ARMV5_AT="twonky-kirkwood-special-${PV}.${SUFFIX}"
# not tested on armv6
ARMV6_AT="twonky-armel-glibc-2.2.5-special-${PV}.${SUFFIX}"
ARMV7_AT="twonky-armel-glibc-2.2.5-special-${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_SPECIAL}/${ARMV5_AT}
${URL_SPECIAL}/${ARMV6_AT}
${URL_SPECIAL}/${ARMV7_AT} )
x86? ( ${URL_BASE}/${X86_AT} )
amd64? ( ${URL_BASE}/${X86_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 ${X86_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 *.xml *.html *.ini
exeinto /opt/${PN}
doexe twonkyproxy twonkyserver twonkystarter twonkywebdav
dodoc Linux-HowTo.txt twonky.sh *.pdf || die
newinitd "${FILESDIR}"/twonkymedia7.initd twonkymedia
keepdir /var/twonky
systemd_dounit "${FILESDIR}"/twonkymedia.service
}
#pkg_postinst() {
#}