alpha-quadrant/media-sound/forked-daapd/forked-daapd-23.2.ebuild

85 lines
2.0 KiB
Bash
Raw Normal View History

2015-07-23 15:58:51 +02:00
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=5
inherit user eutils autotools
DESCRIPTION="DAAP and RSP media server. It is a complete rewrite of mt-daapd (Firefly Media Server)."
GITHUB_USER="ejurgensen"
GITHUB_TAG="${PV}"
HOMEPAGE="https://github.com/ejurgensen/forked-daapd"
SRC_URI="https://github.com/${GITHUB_USER}/${PN}/archive/${GITHUB_TAG}.tar.gz -> ${GITHUB_USER}-${P}.tar.gz"
S="${WORKDIR}/${PN}-${GITHUB_TAG}"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="flac itunes musepack lastfm mpd spotify"
RDEPEND="itunes? ( >=app-pda/libplist-0.16 )
dev-db/sqlite:3
>dev-libs/antlr-c-3.0
>=dev-libs/avl-0.3.5
dev-libs/confuse
dev-libs/libgcrypt
>=net-dns/avahi-0.6.24[dbus]
>=dev-libs/libunistring-0.9.3
dev-libs/mini-xml[threads]
media-libs/alsa-lib
flac? ( media-libs/flac )
media-libs/taglib
app-pda/libplist
>=sys-libs/zlib-1.2.5-r2
virtual/ffmpeg"
DEPEND="${RDEPEND}
>dev-java/antlr-3.0
dev-util/gperf
dev-util/pkgconfig"
RESTRICT="primaryuri"
src_prepare() {
eautoreconf -i
}
src_configure() {
econf \
$(use_enable flac ) \
$(use_enable itunes ) \
$(use_enable mpd ) \
$(use_enable lastfm ) \
$(use_enable musepack )
}
src_install() {
emake DESTDIR="${D}" localstatedir="${EPREFIX}/var" install
newinitd "${FILESDIR}/${PN}.init.d" ${PN}
keepdir /etc/forked-daapd.d
mv "${D}etc/forked-daapd.conf" "${D}etc/forked-daapd.d/"
fperms 0600 /etc/forked-daapd.d/forked-daapd.conf
insinto /etc/logrotate.d
newins "${FILESDIR}/forked-daapd.logrotate" forked-daapd
dodoc AUTHORS ChangeLog README.md NEWS
}
pkg_preinst() {
enewgroup daapd
enewuser daapd -1 -1 -1 daapd
fowners -R daapd:daapd /etc/forked-daapd.d
fperms -R 0700 /etc/forked-daapd.d
}
pkg_postinst() {
einfo
elog "If you want to start more than one ${PN} service, symlink"
elog "/etc/init.d/${PN} to /etc/init.d/${PN}.<name>, and it will"
elog "load the data from /etc/${PN}.d/<name>.conf."
elog "Make sure that you have different cache directories for them."
einfo
}