2024-03-22 11:16:11 +01:00
|
|
|
# Copyright 2024 Gentoo Authors
|
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
|
|
|
EAPI=8
|
|
|
|
|
|
|
|
inherit systemd
|
|
|
|
|
|
|
|
DESCRIPTION="Music Server and Streamer compatible with Subsonic/Airsonic"
|
|
|
|
HOMEPAGE="https://www.navidrome.org/"
|
|
|
|
SRC_URI="https://github.com/navidrome/navidrome/releases/download/v${PV}/navidrome_${PV}_linux_amd64.tar.gz"
|
|
|
|
S="${WORKDIR}"
|
|
|
|
|
|
|
|
LICENSE="GPL-3"
|
|
|
|
SLOT="0"
|
2024-03-22 13:33:21 +01:00
|
|
|
KEYWORDS="~amd64"
|
|
|
|
IUSE="taglib"
|
2024-03-22 11:16:11 +01:00
|
|
|
|
2024-03-22 13:33:21 +01:00
|
|
|
# TODO: ffmpeg USE-flags?
|
|
|
|
RDEPEND="
|
|
|
|
media-video/ffmpeg
|
|
|
|
taglib? ( media-libs/taglib )
|
|
|
|
"
|
2024-03-22 11:27:15 +01:00
|
|
|
BDEPEND="acct-user/navidrome"
|
2024-03-22 11:16:11 +01:00
|
|
|
|
|
|
|
src_prepare() {
|
2024-03-22 13:41:18 +01:00
|
|
|
cat << EOF > navidrome.toml.example
|
2024-03-22 11:16:11 +01:00
|
|
|
# see <https://www.navidrome.org/docs/usage/configuration-options/#available-options> for more options
|
|
|
|
|
|
|
|
# MusicFolder = '/media/music'
|
|
|
|
EOF
|
|
|
|
|
|
|
|
default
|
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
|
|
|
dobin navidrome
|
|
|
|
dodoc README.md
|
|
|
|
insinto /var/lib/navidrome
|
2024-03-22 14:44:17 +01:00
|
|
|
doins navidrome.toml.example
|
2024-03-22 11:16:11 +01:00
|
|
|
fowners -R navidrome:navidrome /var/lib/navidrome
|
2024-03-22 13:45:31 +01:00
|
|
|
keepdir /var/log/navidrome
|
|
|
|
fowners navidrome:navidrome /var/log/navidrome
|
2024-03-22 11:16:11 +01:00
|
|
|
|
|
|
|
systemd_dounit "${FILESDIR}"/navidrome.service
|
2024-03-22 13:01:45 +01:00
|
|
|
newinitd "${FILESDIR}"/navidrome.initd navidrome
|
2024-03-22 11:16:11 +01:00
|
|
|
}
|