Files
rpms/fedora/SPECS/navidrome.spec

132 lines
4.6 KiB
RPMSpec
Raw Normal View History

2021-12-28 12:11:43 +01:00
%define gitSha 8bbb878b
2021-12-28 13:15:26 +01:00
%define navidrome_user navidrome
%define debug_package %{nil}
2021-12-28 12:11:43 +01:00
Name: navidrome
2024-04-13 08:47:11 +02:00
Version: 0.51.1
2023-11-24 11:59:44 +01:00
Release: 1%{?dist}
2021-12-28 12:11:43 +01:00
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
2022-11-05 10:44:30 +01:00
#Patch0: nagidrom-wader-tag.patch
2021-12-28 12:11:43 +01:00
BuildRequires: nodejs >= 16
BuildRequires: npm
BuildRequires: go
BuildRequires: taglib-devel
Requires: ffmpeg
Requires: taglib
2022-08-26 08:01:57 +02:00
Requires: nodejs >= 16
2021-12-28 12:11:43 +01:00
%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}
2022-11-05 10:44:30 +01:00
#patch0 -p0
2021-12-28 12:11:43 +01:00
%build
2022-06-24 19:49:18 +02:00
export NODE_OPTIONS='--openssl-legacy-provider'
2021-12-28 12:11:43 +01:00
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"
2022-06-24 19:49:18 +02:00
go build -ldflags="-X github.com/%{name}/%{name}/consts.gitSha=%{gitSha} -X github.com/%{name}/%{name}/consts.gitTag=v%{version}" -tags=netgo -buildvcs=false
2021-12-28 12:11:43 +01:00
%install
install -Dm755 %{name} %{buildroot}%{_bindir}/%{name}
install -Dm0644 %{S:3} %{buildroot}%{_systemd_util_dir}/system/%{name}.service
2021-12-28 13:15:26 +01:00
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}/*
2021-12-28 12:11:43 +01:00
%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}
2021-12-28 13:15:26 +01:00
%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
2021-12-28 12:11:43 +01:00
%{_systemd_util_dir}/system/%{name}.service
%changelog
2024-04-13 08:47:11 +02:00
* Sat Apr 13 2024 Daniel Steiner <daniel.steiner@dsteiner.ch>
- Update to 0.51.1.
2024-01-31 08:54:35 +01:00
* Wed Jan 31 2024 Daniel Steiner <daniel.steiner@dsteiner.ch>
- Update to 0.51.0.
2023-12-14 22:25:12 +01:00
* Thu Dec 14 2023 Daniel Steiner <daniel.steiner@dsteiner.ch>
- Update to 0.50.2.
2023-11-24 11:59:44 +01:00
* Thu Nov 23 2023 Daniel Steiner <daniel.steiner@dsteiner.ch>
- Update to 0.50.1.
2023-02-23 21:56:39 +01:00
* Thu Feb 23 2023 Daniel Steiner <daniel.steiner@dsteiner.ch>
- Update to 0.49.3.
* Fri Nov 25 2022 Daniel Steiner <daniel.steiner@dsteiner.ch>
- Fix for systemd configuration.
2022-11-25 10:33:47 +01:00
* Fri Nov 25 2022 Daniel Steiner <daniel.steiner@dsteiner.ch>
- First build for Fedora 37.
2022-11-05 10:44:30 +01:00
* Sat Oct 29 2022 Daniel Steiner <daniel.steiner@dsteiner.ch>
- Update to 0.48.0.
2022-01-29 11:32:47 +01:00
* Sat Jan 29 2022 Daniel Steiner <daniel.steiner@dsteiner.ch>
- Update to 0.47.5.
2021-12-28 13:15:26 +01:00
* Tue Dec 28 2021 Daniel Steiner <daniel.steiner@dsteiner.ch>
2021-12-28 12:11:43 +01:00
- Initial version.