# Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=8 inherit systemd DESCRIPTION="Serviio DLNA Media Server" HOMEPAGE="http://serviio.org/" SRC_URI="http://download.serviio.org/releases/${P}-linux.tar.gz" LICENSE="Serviio-EULA" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="raw +transcode" RDEPEND=" acct-user/serviio acct-group/serviio >=virtual/jre-1.8.0 raw? ( media-gfx/dcraw ) transcode? ( media-video/ffmpeg[encode,libass,mp3,librtmp,x264,threads] ) " INSTALL_DIR="/opt/${PN}" DOCS=( LICENCE.txt NOTICE.txt README.txt RELEASE_NOTES.txt ) src_prepare() { # Prevent launcher shell scripts from persisting. Wasteful # plus systemd can't tell which process is the real one. sed -i '/^"\$JAVA" /s/^/exec /' bin/*.sh default } src_install() { default rm -f "${DOCS[@]}" # mv -f legal "${D}usr/share/doc/${P}/" dodir /opt mv "${S}" "${D}${INSTALL_DIR}" chown -R "${PN}:${PN}" "${D}${INSTALL_DIR}" newinitd "${FILESDIR}/initd" "${PN}" newconfd "${FILESDIR}/confd" "${PN}" systemd_newunit "${FILESDIR}/systemd.service" "${PN}.service" systemd_install_serviced "${FILESDIR}/systemd.service.conf" "${PN}.service" } pkg_postinst() { elog "Mounts needed for media library locations not on your root volume" elog "should be completed before Serviio starts. If you use systemd, see" elog "/etc/systemd/system/${PN}.service.d/00gentoo.conf." }