overlay/media-sound/navidrome-bin/navidrome-bin-0.51.1.ebuild
tastytea 0e2e28008b
media-sound/navidrome-bin: create log dir
Signed-off-by: tastytea <tastytea@tastytea.de>
2024-03-22 13:45:31 +01:00

48 lines
1.1 KiB
Bash

# 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"
KEYWORDS="~amd64"
IUSE="taglib"
DEPEND=""
# TODO: ffmpeg USE-flags?
RDEPEND="
media-video/ffmpeg
taglib? ( media-libs/taglib )
"
BDEPEND="acct-user/navidrome"
src_prepare() {
cat << EOF > navidrome.toml.example
# 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
doins navidrome.toml
fowners -R navidrome:navidrome /var/lib/navidrome
keepdir /var/log/navidrome
fowners navidrome:navidrome /var/log/navidrome
systemd_dounit "${FILESDIR}"/navidrome.service
newinitd "${FILESDIR}"/navidrome.initd navidrome
}