%global forgeurl https://github.com/ralph-irving/squeezelite/ %global commit a1dd79daccc5a53e34a4926603e1bb54ca0cd718 %forgemeta # Raspberry Pi-specific GPIO support depends on the WiringPi library, # which is not currently packaged for Fedora, only for FedBerry. %ifarch aarch64 armhfp armv7l %bcond_with wiringpi %endif # Allow AAC and ALAC, WMA to be played directly in the client rather than # first being transcoded on the server. Requires libraries not included # in Fedora for legal reasons. %bcond_with faad %bcond_with ffmpeg Name: squeezelite Version: 1.9.0.1126 Release: 3%{?dist} Summary: Headless music player for streaming from Logitech Media Server # Squeezelite is released under the GPLv3 licence. # It incorporates dsd2pcm, which is BSD licenced. License: GPLv3 and BSD URL: %{forgeurl} Source0: %{forgesource} Source1: %{name}.system.service Source2: %{name}.user.service Source3: %{name}.service.7.md Source4: %{name}.sysconfig Source5: %{name}.user.preset BuildRequires: alsa-lib-devel %if %{with faad} BuildRequires: faad2-devel %endif %if %{with ffmpeg} BuildRequires: ffmpeg-devel %endif BuildRequires: flac-devel BuildRequires: gcc BuildRequires: libmad-devel BuildRequires: libvorbis-devel BuildRequires: lirc-devel BuildRequires: mpg123-devel BuildRequires: pandoc BuildRequires: soxr-devel BuildRequires: systemd %if %{with wiringpi} BuildRequires: wiringpi %endif Requires(pre): shadow-utils %{?systemd_requires} %description Squeezelite is a headless client for Logitech Media Server, and can be used in place of dedicated Squeezebox network music playing hardware. %prep %forgesetup %build %set_build_flags %make_build %{?with_ffmpeg:CPPFLAGS+="-I/usr/include/ffmpeg"} OPTS="-DDSD -DLINKALL -DRESAMPLE -DVISEXPORT -DIR -DGPIO %{?with_wiringpi:-DRPI} %{?with_ffmpeg:-DFFMPEG} %{?!with_faad:-DNO_FAAD}" pandoc --to=man --standalone --output=%{name}.service.7 %{SOURCE3} %install install -p -D -t %{buildroot}/%{_bindir} %{name} install -p -D -m 0644 %{SOURCE1} %{buildroot}/%{_unitdir}/%{name}.service install -p -D -m 0644 %{SOURCE2} %{buildroot}/%{_userunitdir}/%{name}.service # Change this to %%{_userpresetdir} once Fedora 27 is retired: install -p -D -m 0644 %{SOURCE5} \ %{buildroot}/%{_userunitdir}/../preset/70-%{name}.preset install -p -D -m 0644 %{SOURCE4} %{buildroot}/%{_sysconfdir}/sysconfig/%{name} install -p -D -t %{buildroot}/%{_mandir}/man1 -m 0644 doc/%{name}.1 install -p -D -t %{buildroot}/%{_mandir}/man7 -m 0644 %{name}.service.7 mkdir -p %{buildroot}/%{_sharedstatedir}/%{name} %files %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %dir %attr(-,%{name},%{name}) %{_sharedstatedir}/%{name} %doc %{_mandir}/*/* %doc README.md %license LICENSE.txt %{_bindir}/%{name} %{_unitdir}/%{name}.service %{_userunitdir}/%{name}.service %{_userunitdir}/../preset/70-%{name}.preset %pre getent group %{name} >/dev/null || groupadd -r %{name} getent passwd %{name} >/dev/null || \ useradd -r -g %{name} -G audio -d %{_sharedstatedir}/%{name} \ -s /sbin/nologin -c "Squeezelite headless streaming music client" \ %{name} exit 0 %post %systemd_post %{name}.service %systemd_user_post %{name}.service %preun %systemd_preun %{name}.service %systemd_user_preun %{name}.service %postun %systemd_postun_with_restart %{name}.service %changelog * Sun Dec 23 2018 Peter Oliver - 1.9.0.1126-3 - Update to revision 1126. * Tue Jul 31 2018 Peter Oliver - 1.9.0.1104-3 - Require gcc for build. * Sat Jul 14 2018 Fedora Release Engineering - 1.9.0.1104-2.gitc56dbb0 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Fri Jun 15 2018 Peter Oliver - 1.9.0.1104-1 - Update to version 1.9.0.1104. * Mon Apr 30 2018 Peter Oliver - 1.9.0.1093-7 - Update to 1.9.0.1093. * Thu Apr 26 2018 Peter Oliver - 1.8.7.1083-6 - Don't replace config file on update. * Thu Apr 26 2018 Peter Oliver - 1.8.7.1083-5 - Mark sysconfig file as config. - Update man page to mention sysconfig file. * Thu Apr 26 2018 Peter Oliver - 1.8.7.1083-4 - Optionally BuildRequire wiringpi on FedBerry. - Allow passing of command line args to system service via /etc/sysconfig/squeezelite. - Add missing BSD licence tag. - Disable user service by default. - Create config directory before starting user service. * Thu Apr 26 2018 Peter Oliver - 1.8.7.1083-3 - Include systemd scriptlets to restart service on update. * Wed Apr 25 2018 Peter Oliver - 1.8.7.1083-2 - Make Raspberry Pi support optional. * Wed Apr 25 2018 Peter Oliver - 1.8.7.1083-1 - Update to version 1.8.7-1083. * Tue Apr 24 2018 Peter Oliver - 1.8.7.1078-2 - Make optional legally problematic codecs. * Sun Apr 22 2018 Peter Oliver - 1.8.7.1078-1 - Initial package.