%global debug_package %{nil} %global client_homedir /var/lib/snapclient %global server_homedir /var/lib/snapserver Name: snapcast Version: 0.25.0 Release: 5%{?dist} Summary: Synchronous multi-room audio player License: GPLv3 URL: https://github.com/badaix/%{name} Source0: https://github.com/badaix/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz Source1: snapclient.sysconfig Source2: snapserver.sysconfig BuildRequires: cmake3 BuildRequires: devtoolset-10-gcc-c++ BuildRequires: devtoolset-10-binutils BuildRequires: alsa-lib-devel BuildRequires: asio-devel BuildRequires: avahi-devel BuildRequires: flac-devel BuildRequires: opus-devel BuildRequires: libatomic BuildRequires: libstdc++-static BuildRequires: libvorbis-devel BuildRequires: aixlog-devel BuildRequires: popl-devel BuildRequires: soxr-devel BuildRequires: pulseaudio-libs-devel BuildRequires: boost-devel >= 1.70.0 %description Snapcast is a multi-room client-server audio player, where all clients are time synchronized with the server to play perfectly synced audio. It's not a standalone player, but an extension that turns your existing audio player into a multi-room solution. %package client Summary: Snapcast multi-room audio client Requires: snapcast = %{version}-%{release} Requires(pre): /usr/sbin/useradd %description client Snapcast is a multi-room client-server audio player, where all clients are time synchronized with the server to play perfectly synced audio. It's not a standalone player, but an extension that turns your existing audio player into a multi-room solution. This package contains the snapcast client. %package server Summary: Snapcast multi-room audio server Requires: snapcast = %{version}-%{release} Requires(pre): /usr/sbin/useradd %description server Snapcast is a multi-room client-server audio player, where all clients are time synchronized with the server to play perfectly synced audio. It's not a standalone player, but an extension that turns your existing audio player into a multi-room solution. This package contains the snapcast server. %prep %setup -q rm -rf externals mkdir externals cd externals ln -s ../../aixlog-1.2.1 aixlog ln -s ../../popl-1.2.0 popl cd .. %build scl enable devtoolset-10 - << \EOF %cmake3 \ -DBOOST_INCLUDEDIR="%{_includedir}/boost175" \ -DBOOST_LIBRARYDIR="%{_libdir}/boost175" \ -D CMAKE_CXX_FLAGS="-std=c++0x" \ -U BUILD_WITH_VORBIS \ . EOF %make_build STRIP=echo %install install -D bin/snapclient %{buildroot}/%{_sbindir}/snapclient install -D bin/snapserver %{buildroot}/%{_sbindir}/snapserver sed -i -e 's/bin/sbin/g' debian/snap{client,server}.service install -D debian/snapclient.service %{buildroot}/%{_unitdir}/snapclient.service install -D debian/snapserver.service %{buildroot}/%{_unitdir}/snapserver.service install -D %{SOURCE1} %{buildroot}/%{_sysconfdir}/sysconfig/snapclient install -D %{SOURCE2} %{buildroot}/%{_sysconfdir}/sysconfig/snapserver install -D client/snapclient.1 %{buildroot}/%{_mandir}/man1/snapclient.1 install -D server/snapserver.1 %{buildroot}/%{_mandir}/man1/snapserver.1 %pre client getent group snapclient >/dev/null || groupadd -r snapclient getent passwd snapclient >/dev/null || \ useradd -g snapclient snapclient -s /sbin/nologin -r -d %{client_homedir} -G audio %pre server getent group snapserver >/dev/null || groupadd -r snapserver getent passwd snapserver >/dev/null || \ useradd -g snapserver snapserver -s /sbin/nologin -r -d %{server_homedir} %files %doc README.md %license LICENSE %files client %defattr(-,root,root,-) %{_sbindir}/snapclient %{_unitdir}/snapclient.service %{_sysconfdir}/sysconfig/snapclient %{_mandir}/man1/snapclient.1.gz %files server %defattr(-,root,root,-) %{_sbindir}/snapserver %{_unitdir}/snapserver.service %{_sysconfdir}/sysconfig/snapserver %{_mandir}/man1/snapserver.1.gz %changelog * Fri May 07 2021 Jakub Jelen - 0.24.0-1 - Initial release for Fedora