%define gitSha 8bbb878b %define navidrome_user navidrome %define debug_package %{nil} Name: navidrome Version: 0.48.0 Release: 2%{?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 Source3: navidrome.service #Patch0: nagidrom-wader-tag.patch BuildRequires: nodejs >= 16 BuildRequires: npm BuildRequires: go BuildRequires: taglib-devel Requires: ffmpeg Requires: taglib Requires: nodejs >= 16 %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} #patch0 -p0 %build export NODE_OPTIONS='--openssl-legacy-provider' 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 -buildvcs=false %install install -Dm755 %{name} %{buildroot}%{_bindir}/%{name} install -Dm0644 %{S:3} %{buildroot}%{_systemd_util_dir}/system/%{name}.service install -Dm0644 %{S:1} %{buildroot}/%{_sysconfdir}/%{name}/%{name}.toml install -Dm0644 %{S:2} %{buildroot}%{_prefix}/lib/sysusers.d/%{name}.conf install -dm0750 %{buildroot}%{_sharedstatedir}/%{name} %clean [ "%{buildroot}" != "/" ] && [ -d "%{buildroot}" ] && rm -rf %{buildroot} [ "%{_builddir}" != "/" ] && [ -d "%{_builddir}" ] && rm -rf %{_builddir}/* %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} %attr(0750, %{navidrome_user}, %{navidrome_user}) %dir %{_sharedstatedir}/%{name} %attr(0750, %{navidrome_user}, %{navidrome_user}) %dir %{_sysconfdir}/%{name} %attr(0640, %{navidrome_user}, %{navidrome_user}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.toml %{_prefix}/lib/sysusers.d/%{name}.conf %{_systemd_util_dir}/system/%{name}.service %changelog * Fri Nov 25 2022 Daniel Steiner - Fix for systemd configuration. * Fri Nov 25 2022 Daniel Steiner - First build for Fedora 37. * Sat Oct 29 2022 Daniel Steiner - Update to 0.48.0. * Sat Jan 29 2022 Daniel Steiner - Update to 0.47.5. * Tue Dec 28 2021 Daniel Steiner - Initial version.