New navidrome package
This commit is contained in:
92
fedora/SPECS/navidrome.spec
Normal file
92
fedora/SPECS/navidrome.spec
Normal file
@@ -0,0 +1,92 @@
|
||||
%define gitSha 8bbb878b
|
||||
%define. navidrome_user navidrome
|
||||
Name: navidrome
|
||||
Version: 0.47.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Navidrome is a self-hosted, open source music server and streamer
|
||||
|
||||
Group: System
|
||||
License: GPL-3.0
|
||||
URL: https://www.navidrome.org
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
Source1: %{name}.toml
|
||||
Source2: navidrome.sysuser
|
||||
|
||||
BuildRequires: nodejs >= 16
|
||||
BuildRequires: npm
|
||||
BuildRequires: go
|
||||
BuildRequires: taglib-devel
|
||||
Requires: ffmpeg
|
||||
Requires: taglib
|
||||
|
||||
%description
|
||||
Navidrome can be used as a standalone server, that allows you to browse and listen to your music collection using a web browser.
|
||||
|
||||
It can also work as a lightweight Subsonic-API compatible server, that can be used with any Subsonic compatible client.
|
||||
Features
|
||||
|
||||
- Very low resource usage. Runs well even on simple Raspberry Pi Zero and old hardware setups
|
||||
- Handles very large music collections
|
||||
- Streams virtually any audio format available
|
||||
- Reads and uses all your beautifully curated metadata
|
||||
- Great support for compilations (Various Artists albums) and box sets (multi-disc albums)
|
||||
- Multi-user, each user has their own play counts, playlists, favorites, etc..
|
||||
- Multi-platform, runs on macOS, Linux and Windows. Docker images are also provided
|
||||
- Ready to use, official, Raspberry Pi binaries and Docker images available
|
||||
- Automatically monitors your library for changes, importing new files and reloading new metadata
|
||||
- Themeable, modern and responsive Web interface based on Material UI
|
||||
- Compatible with all Subsonic/Madsonic/Airsonic clients. See below for a list of tested clients
|
||||
- Transcoding on the fly. Can be set per user/player. Opus encoding is supported
|
||||
- Translated to 17 languages (and counting)
|
||||
- Full support for playlists, with option to auto-import .m3u files and to keep them in sync
|
||||
- Last.fm and ListenBrainz scrobbling
|
||||
|
||||
%prep
|
||||
%setup -q -n %name-%{version}
|
||||
|
||||
%build
|
||||
make setup
|
||||
make buildjs
|
||||
export CGO_LDFLAGS="${LDFLAGS}"
|
||||
export CGO_CFLAGS="${CFLAGS}"
|
||||
export CGO_CPPFLAGS="${CPPFLAGS}"
|
||||
export CGO_CXXFLAGS="${CXXFLAGS}"
|
||||
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
|
||||
go build -ldflags="-X github.com/%{name}/%{name}/consts.gitSha=%{gitSha} -X github.com/%{name}/%{name}/consts.gitTag=v%{version}" -tags=netgo
|
||||
|
||||
%install
|
||||
make install DESTDIR=%{buildroot}
|
||||
install -Dm755 %{name} %{buildroot}%{_bindir}/%{name}
|
||||
install -Dm0644 contrib/%{name}.service %{buildroot}%{_systemd_util_dir}/system/%{name}.service
|
||||
install -Dm0644 %{S1}/%{name}.toml %{buildroot}/%{_sysconfdir}/%{name}/%{name}.toml
|
||||
install -Dm0644 %{S2}/navidrome.sysuser %{buildroot}%{_prefix}/lib/sysusers.d/%{name}.conf
|
||||
|
||||
%pre
|
||||
if [ $1 -eq 1 ]; then
|
||||
getent group %{navidrome_user} > /dev/null || groupadd -r %{navidrome_user}
|
||||
getent passwd %{navidrome_user} > /dev/null || \
|
||||
useradd -r -d %{_localstatedir}/lib/nginx -g %{navidrome_user} \
|
||||
-s /sbin/nologin -c "Nginx web server" %{navidrome_user}
|
||||
exit 0
|
||||
fi
|
||||
|
||||
%post
|
||||
if [ $1 -eq 1 ]; then
|
||||
%systemd_post %{name}.service
|
||||
fi
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ]; then
|
||||
%systemd_preun %{name}.service
|
||||
fi
|
||||
|
||||
%files
|
||||
%doc LICENSE CONTRIBUTING.md CODE_OF_CONDUCT.md README.md
|
||||
%{_bindir}/%{name}
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.toml
|
||||
%{_libdir}/sysusers.d/%{name}.conf
|
||||
%{_systemd_util_dir}/system/%{name}.service
|
||||
|
||||
%changelog
|
||||
* Wed Dec 28 2021 Daniel Steiner <daniel.steiner@dsteiner.ch>
|
||||
- Initial version.
|
||||
Reference in New Issue
Block a user