The package rpms/squeezelite.git has added or updated architecture specific content in
its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/squeezelite.git/commit/?id=7b969f...
https://src.fedoraproject.org/cgit/rpms/squeezelite.git/commit/?id=2a0ca7....
Change:
+%ifarch aarch64 armhfp
+%ifarch aarch64 armhfp armv7l
Thanks.
Full change:
============
commit cd79b5c343e99d7f14e2e679aa9e3a10f683b22e
Author: Peter Oliver <git(a)mavit.org.uk>
Date: Thu Apr 26 22:29:01 2018 +0100
Add sources.
diff --git a/sources b/sources
new file mode 100644
index 0000000..c534775
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (squeezelite-8386ece5d705c695afcd68ace1996b4818c65eb1.tar.gz) =
9e5ba24da33a8ff495259ef29bee3b6a8707cc6124912435cf8ca4ca983bc42d0791bfcbf137a33a73324eef863b2a1a908959981f063bc5238414f4a42a3192
commit cd700502598f61cb23fb2d503c3aea79310955da
Merge: c0063ba f610493
Author: Peter Oliver <git(a)mavit.org.uk>
Date: Thu Apr 26 22:26:33 2018 +0100
Merge remote-tracking branch 'pagure/master'
commit f61049352ceb963fa3b21faea86ac832796ef032
Author: Peter Oliver <git(a)mavit.org.uk>
Date: Thu Apr 26 16:22:26 2018 +0100
Don't replace config file on update.
diff --git a/squeezelite.spec b/squeezelite.spec
index 706ba4f..2fd3661 100644
--- a/squeezelite.spec
+++ b/squeezelite.spec
@@ -17,7 +17,7 @@
Name: squeezelite
Version: 1.8.7.1083
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: Headless music player for streaming from Logitech Media Server
# Squeezelite is released under the GPLv3 licence.
@@ -90,7 +90,7 @@ mkdir -p %{buildroot}/%{_sharedstatedir}/%{name}
%files
-%config %{_sysconfdir}/sysconfig/%{name}
+%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%dir %attr(-,%{name},%{name}) %{_sharedstatedir}/%{name}
%doc %{_mandir}/*/*
%doc README.md
@@ -125,6 +125,9 @@ exit 0
%changelog
+* Thu Apr 26 2018 Peter Oliver <rpm(a)mavit.org.uk> - 1.8.7.1083-6
+- Don't replace config file on update.
+
* Thu Apr 26 2018 Peter Oliver <rpm(a)mavit.org.uk> - 1.8.7.1083-5
- Mark sysconfig file as config.
- Update man page to mention sysconfig file.
commit 93015a747c579a23b2b5fb4839186bc1c96c72db
Author: Peter Oliver <git(a)mavit.org.uk>
Date: Thu Apr 26 15:50:14 2018 +0100
Update man page to mention sysconfig file.
diff --git a/squeezelite.service.7.md b/squeezelite.service.7.md
index 38bd820..ba66cb1 100644
--- a/squeezelite.service.7.md
+++ b/squeezelite.service.7.md
@@ -13,18 +13,16 @@ To run `squeezelite` as part of your user desktop session:
systemctl --user enable squeezelite
systemctl --user start squeezelite
-To run `squeezelite` at system boot:
+To configure `squeezelite` as part of your user desktop session, edit the command line
options passed to it:
- systemctl enable squeezelite
- systemctl start squeezelite
+ systemctl --user edit --full squeezelite
-To configure `squeezelite`, edit the command line options passed to it:
+To start `squeezelite` at system boot:
- systemctl --user edit --full squeezelite
-
-or:
+ systemctl enable squeezelite
+ systemctl start squeezelite
- systemctl edit --full squeezelite
+To configure `squeezelite` started at system boot, edit the file
`/etc/sysconfig/squeezelite`.
If running outside of a user session, you will probably need to specify the ALSA output
device using `squeezelite`’s `-o` option. Get a list of available devices with:
diff --git a/squeezelite.spec b/squeezelite.spec
index 741eda0..706ba4f 100644
--- a/squeezelite.spec
+++ b/squeezelite.spec
@@ -17,7 +17,7 @@
Name: squeezelite
Version: 1.8.7.1083
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Headless music player for streaming from Logitech Media Server
# Squeezelite is released under the GPLv3 licence.
@@ -90,15 +90,15 @@ mkdir -p %{buildroot}/%{_sharedstatedir}/%{name}
%files
+%config %{_sysconfdir}/sysconfig/%{name}
%dir %attr(-,%{name},%{name}) %{_sharedstatedir}/%{name}
%doc %{_mandir}/*/*
%doc README.md
%license LICENSE.txt
%{_bindir}/%{name}
-%{_sysconfdir}/sysconfig/%{name}
%{_unitdir}/%{name}.service
-%{_userunitdir}/../preset/70-%{name}.preset
%{_userunitdir}/%{name}.service
+%{_userunitdir}/../preset/70-%{name}.preset
%pre
@@ -125,6 +125,10 @@ exit 0
%changelog
+* Thu Apr 26 2018 Peter Oliver <rpm(a)mavit.org.uk> - 1.8.7.1083-5
+- Mark sysconfig file as config.
+- Update man page to mention sysconfig file.
+
* Thu Apr 26 2018 Peter Oliver <rpm(a)mavit.org.uk> - 1.8.7.1083-4
- Optionally BuildRequire wiringpi on FedBerry.
- Allow passing of command line args to system service via
commit fcbefd7848d7994918800dd03bf50f7eafe2afc8
Author: Peter Oliver <git(a)mavit.org.uk>
Date: Thu Apr 26 15:43:02 2018 +0100
Add missing files.
diff --git a/squeezelite.sysconfig b/squeezelite.sysconfig
new file mode 100644
index 0000000..503927c
--- /dev/null
+++ b/squeezelite.sysconfig
@@ -0,0 +1,2 @@
+## Optional command line arguments passed to squeezelite(1) system service.
+ARGS=
diff --git a/squeezelite.user.preset b/squeezelite.user.preset
new file mode 100644
index 0000000..4dfd226
--- /dev/null
+++ b/squeezelite.user.preset
@@ -0,0 +1 @@
+disable squeezelite.service
commit 3a1142e84b8d26ebf852743999c47ff31c59e372
Author: Peter Oliver <git(a)mavit.org.uk>
Date: Thu Apr 26 15:41:05 2018 +0100
%{_userpresetdir} macro is only in Fedora 28 and newer.
diff --git a/squeezelite.spec b/squeezelite.spec
index 9b10648..741eda0 100644
--- a/squeezelite.spec
+++ b/squeezelite.spec
@@ -80,8 +80,9 @@ pandoc --to=man --standalone --output=%{name}.service.7 %{SOURCE3}
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}/%{_userpresetdir}/70-%{name}.preset
+ %{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
@@ -96,7 +97,7 @@ mkdir -p %{buildroot}/%{_sharedstatedir}/%{name}
%{_bindir}/%{name}
%{_sysconfdir}/sysconfig/%{name}
%{_unitdir}/%{name}.service
-%{_userpresetdir}/70-%{name}.preset
+%{_userunitdir}/../preset/70-%{name}.preset
%{_userunitdir}/%{name}.service
@@ -130,7 +131,7 @@ exit 0
/etc/sysconfig/squeezelite.
- Add missing BSD licence tag.
- Disable user service by default.
-- Create config directory in user service.
+- Create config directory before starting user service.
* Thu Apr 26 2018 Peter Oliver <rpm(a)mavit.org.uk> - 1.8.7.1083-3
- Include systemd scriptlets to restart service on update.
commit b71f24d6e8b971cc262fa85491f06d508896e86c
Author: Peter Oliver <git(a)mavit.org.uk>
Date: Thu Apr 26 15:08:00 2018 +0100
Create config directory before starting user service.
diff --git a/squeezelite.spec b/squeezelite.spec
index 874b3e7..9b10648 100644
--- a/squeezelite.spec
+++ b/squeezelite.spec
@@ -130,6 +130,7 @@ exit 0
/etc/sysconfig/squeezelite.
- Add missing BSD licence tag.
- Disable user service by default.
+- Create config directory in user service.
* Thu Apr 26 2018 Peter Oliver <rpm(a)mavit.org.uk> - 1.8.7.1083-3
- Include systemd scriptlets to restart service on update.
diff --git a/squeezelite.user.service b/squeezelite.user.service
index 31f0969..4fbdde6 100644
--- a/squeezelite.user.service
+++ b/squeezelite.user.service
@@ -3,7 +3,8 @@ Description=Squeezelite headless streaming music client
Documentation=man:squeezelite.service(7)
[Service]
-ExecStart=/usr/bin/squeezelite -N ~/.local/share/squeezelite/player-name
+ExecStartPre=/usr/bin/mkdir -p .local/share/squeezelite
+ExecStart=/usr/bin/squeezelite -N .local/share/squeezelite/player-name
[Install]
WantedBy=default.target
commit 5bdf0006aee5be624412f6c7535806d36c84359f
Author: Peter Oliver <git(a)mavit.org.uk>
Date: Thu Apr 26 14:16:56 2018 +0100
Disable user service by default.
diff --git a/squeezelite.spec b/squeezelite.spec
index d5f1004..874b3e7 100644
--- a/squeezelite.spec
+++ b/squeezelite.spec
@@ -30,6 +30,7 @@ Source1: %{name}.system.service
Source2: %{name}.user.service
Source3: %{name}.service.7.md
Source4: %{name}.sysconfig
+Source5: %{name}.user.preset
#
https://github.com/ralph-irving/squeezelite/pull/44
Patch0: 0001-Make-optional-AAC-support-via-libfaad.patch
@@ -79,6 +80,8 @@ pandoc --to=man --standalone --output=%{name}.service.7 %{SOURCE3}
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
+install -p -D -m 0644 %{SOURCE5} \
+ %{buildroot}/%{_userpresetdir}/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
@@ -93,6 +96,7 @@ mkdir -p %{buildroot}/%{_sharedstatedir}/%{name}
%{_bindir}/%{name}
%{_sysconfdir}/sysconfig/%{name}
%{_unitdir}/%{name}.service
+%{_userpresetdir}/70-%{name}.preset
%{_userunitdir}/%{name}.service
@@ -125,6 +129,7 @@ exit 0
- Allow passing of command line args to system service via
/etc/sysconfig/squeezelite.
- Add missing BSD licence tag.
+- Disable user service by default.
* Thu Apr 26 2018 Peter Oliver <rpm(a)mavit.org.uk> - 1.8.7.1083-3
- Include systemd scriptlets to restart service on update.
commit b67f0e44fc5a51fef5db4f5872a55338da7b35c6
Author: Peter Oliver <git(a)mavit.org.uk>
Date: Thu Apr 26 14:02:50 2018 +0100
Add missing file.
diff --git a/squeezelite.spec b/squeezelite.spec
index 4eccec1..d5f1004 100644
--- a/squeezelite.spec
+++ b/squeezelite.spec
@@ -91,6 +91,7 @@ mkdir -p %{buildroot}/%{_sharedstatedir}/%{name}
%doc README.md
%license LICENSE.txt
%{_bindir}/%{name}
+%{_sysconfdir}/sysconfig/%{name}
%{_unitdir}/%{name}.service
%{_userunitdir}/%{name}.service
commit 7b593fa819e228e93d7da77d24af9f343ba425ba
Author: Peter Oliver <git(a)mavit.org.uk>
Date: Thu Apr 26 13:54:47 2018 +0100
Add missing BSD licence tag.
diff --git a/squeezelite.spec b/squeezelite.spec
index 5d5bd16..4eccec1 100644
--- a/squeezelite.spec
+++ b/squeezelite.spec
@@ -20,7 +20,10 @@ Version: 1.8.7.1083
Release: 4%{?dist}
Summary: Headless music player for streaming from Logitech Media Server
-License: GPLv3
+# 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
@@ -120,6 +123,7 @@ exit 0
- Optionally BuildRequire wiringpi on FedBerry.
- Allow passing of command line args to system service via
/etc/sysconfig/squeezelite.
+- Add missing BSD licence tag.
* Thu Apr 26 2018 Peter Oliver <rpm(a)mavit.org.uk> - 1.8.7.1083-3
- Include systemd scriptlets to restart service on update.
commit 295d2c317b1569d62a09458a08603d45cfd3a73a
Author: Peter Oliver <git(a)mavit.org.uk>
Date: Thu Apr 26 13:53:32 2018 +0100
Allow passing of command line args to system service via /etc/sysconfig/squeezelite.
diff --git a/squeezelite.spec b/squeezelite.spec
index d4881d0..5d5bd16 100644
--- a/squeezelite.spec
+++ b/squeezelite.spec
@@ -26,6 +26,7 @@ Source0: %{forgesource}
Source1: %{name}.system.service
Source2: %{name}.user.service
Source3: %{name}.service.7.md
+Source4: %{name}.sysconfig
#
https://github.com/ralph-irving/squeezelite/pull/44
Patch0: 0001-Make-optional-AAC-support-via-libfaad.patch
@@ -75,6 +76,7 @@ pandoc --to=man --standalone --output=%{name}.service.7 %{SOURCE3}
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
+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}
@@ -116,6 +118,8 @@ exit 0
%changelog
* Thu Apr 26 2018 Peter Oliver <rpm(a)mavit.org.uk> - 1.8.7.1083-4
- Optionally BuildRequire wiringpi on FedBerry.
+- Allow passing of command line args to system service via
+ /etc/sysconfig/squeezelite.
* Thu Apr 26 2018 Peter Oliver <rpm(a)mavit.org.uk> - 1.8.7.1083-3
- Include systemd scriptlets to restart service on update.
diff --git a/squeezelite.system.service b/squeezelite.system.service
index 88b5d01..e47477d 100644
--- a/squeezelite.system.service
+++ b/squeezelite.system.service
@@ -7,7 +7,8 @@ After=sound.target
[Service]
User=squeezelite
Group=squeezelite
-ExecStart=/usr/bin/squeezelite -N /var/lib/squeezelite/player-name
+EnvironmentFile=/etc/sysconfig/squeezelite
+ExecStart=/usr/bin/squeezelite -N /var/lib/squeezelite/player-name $ARGS
[Install]
WantedBy=multi-user.target
commit 2a0ca70424b5dc345866118024ee0747129f5ca4
Author: Peter Oliver <git(a)mavit.org.uk>
Date: Thu Apr 26 10:56:02 2018 +0100
Optionally BuildRequire wiringpi on FedBerry.
diff --git a/squeezelite.spec b/squeezelite.spec
index d9700cc..d4881d0 100644
--- a/squeezelite.spec
+++ b/squeezelite.spec
@@ -3,9 +3,9 @@
%forgemeta
# Raspberry Pi-specific GPIO support depends on the WiringPi library,
-# which is not currently packaged for Fedora.
-%ifarch aarch64 armhfp
-%bcond_with raspberrypi
+# 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
@@ -17,7 +17,7 @@
Name: squeezelite
Version: 1.8.7.1083
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Headless music player for streaming from Logitech Media Server
License: GPLv3
@@ -45,6 +45,9 @@ BuildRequires: mpg123-devel
BuildRequires: pandoc
BuildRequires: soxr-devel
BuildRequires: systemd
+%if %{with wiringpi}
+BuildRequires: wiringpi
+%endif
Requires(pre): shadow-utils
%{?systemd_requires}
@@ -63,7 +66,7 @@ used in place of dedicated Squeezebox network music playing hardware.
%build
%set_build_flags
-%make_build %{?with_ffmpeg:CPPFLAGS+="-I/usr/include/ffmpeg"} OPTS="-DDSD
-DLINKALL -DRESAMPLE -DVISEXPORT -DIR -DGPIO %{?with_raspberrypi:-DRPI}
%{?with_ffmpeg:-DFFMPEG} %{?with_faad:-DFAAD}"
+%make_build %{?with_ffmpeg:CPPFLAGS+="-I/usr/include/ffmpeg"} OPTS="-DDSD
-DLINKALL -DRESAMPLE -DVISEXPORT -DIR -DGPIO %{?with_wiringpi:-DRPI}
%{?with_ffmpeg:-DFFMPEG} %{?with_faad:-DFAAD}"
pandoc --to=man --standalone --output=%{name}.service.7 %{SOURCE3}
@@ -111,6 +114,9 @@ exit 0
%changelog
+* Thu Apr 26 2018 Peter Oliver <rpm(a)mavit.org.uk> - 1.8.7.1083-4
+- Optionally BuildRequire wiringpi on FedBerry.
+
* Thu Apr 26 2018 Peter Oliver <rpm(a)mavit.org.uk> - 1.8.7.1083-3
- Include systemd scriptlets to restart service on update.
commit 399d238717df362b33d677eff372bfd2565fc037
Author: Peter Oliver <git(a)mavit.org.uk>
Date: Thu Apr 26 00:11:09 2018 +0100
Include systemd scriptlets to restart service on update.
diff --git a/squeezelite.spec b/squeezelite.spec
index d917828..d9700cc 100644
--- a/squeezelite.spec
+++ b/squeezelite.spec
@@ -17,7 +17,7 @@
Name: squeezelite
Version: 1.8.7.1083
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Headless music player for streaming from Logitech Media Server
License: GPLv3
@@ -47,6 +47,7 @@ BuildRequires: soxr-devel
BuildRequires: systemd
Requires(pre): shadow-utils
+%{?systemd_requires}
%description
@@ -95,7 +96,24 @@ getent passwd %{name} >/dev/null || \
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
+* Thu Apr 26 2018 Peter Oliver <rpm(a)mavit.org.uk> - 1.8.7.1083-3
+- Include systemd scriptlets to restart service on update.
+
* Wed Apr 25 2018 Peter Oliver <rpm(a)mavit.org.uk> - 1.8.7.1083-2
- Make Raspberry Pi support optional.
commit 7b969f0988368717b9398663af3c39244d3667f2
Author: Peter Oliver <git(a)mavit.org.uk>
Date: Wed Apr 25 12:14:22 2018 +0100
Make Raspberry Pi support optional.
diff --git a/squeezelite.spec b/squeezelite.spec
index fa98a1d..d917828 100644
--- a/squeezelite.spec
+++ b/squeezelite.spec
@@ -2,15 +2,22 @@
%global commit 8386ece5d705c695afcd68ace1996b4818c65eb1
%forgemeta
+# Raspberry Pi-specific GPIO support depends on the WiringPi library,
+# which is not currently packaged for Fedora.
+%ifarch aarch64 armhfp
+%bcond_with raspberrypi
+%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.8.7.1083
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Headless music player for streaming from Logitech Media Server
License: GPLv3
@@ -55,14 +62,7 @@ used in place of dedicated Squeezebox network music playing hardware.
%build
%set_build_flags
-## GPIO support depends on WiringPi, which is not currently in Fedora.
-# %ifarch aarch64 armhfp
-# %global squeezelite_opts OPTS="-DDSD -DFFMPEG -DLINKALL -DRESAMPLE -DVISEXPORT
-DIR -DGPIO"
-# %else
-%global squeezelite_opts OPTS="-DDSD -DLINKALL -DRESAMPLE -DVISEXPORT -DIR
%{?with_ffmpeg:-DFFMPEG} %{?with_faad:-DFAAD}"
-# %endif
-
-%make_build %{?with_ffmpeg:CPPFLAGS+="-I/usr/include/ffmpeg"}
%{squeezelite_opts}
+%make_build %{?with_ffmpeg:CPPFLAGS+="-I/usr/include/ffmpeg"} OPTS="-DDSD
-DLINKALL -DRESAMPLE -DVISEXPORT -DIR -DGPIO %{?with_raspberrypi:-DRPI}
%{?with_ffmpeg:-DFFMPEG} %{?with_faad:-DFAAD}"
pandoc --to=man --standalone --output=%{name}.service.7 %{SOURCE3}
@@ -96,6 +96,9 @@ exit 0
%changelog
+* Wed Apr 25 2018 Peter Oliver <rpm(a)mavit.org.uk> - 1.8.7.1083-2
+- Make Raspberry Pi support optional.
+
* Wed Apr 25 2018 Peter Oliver <rpm(a)mavit.org.uk> - 1.8.7.1083-1
- Update to version 1.8.7-1083.
commit 141733fe2ac868fa80718e540e0ab00cd7c1bebf
Author: Peter Oliver <git(a)mavit.org.uk>
Date: Wed Apr 25 11:30:07 2018 +0100
Fix licence tag.
diff --git a/squeezelite.spec b/squeezelite.spec
index f9a7c1c..fa98a1d 100644
--- a/squeezelite.spec
+++ b/squeezelite.spec
@@ -13,7 +13,7 @@ Version: 1.8.7.1083
Release: 1%{?dist}
Summary: Headless music player for streaming from Logitech Media Server
-License: GPL3
+License: GPLv3
URL: %{forgeurl}
Source0: %{forgesource}
Source1: %{name}.system.service
commit 6fdc73249547122e52e0acfda05ac17e9c56243f
Author: Peter Oliver <git(a)mavit.org.uk>
Date: Wed Apr 25 01:00:55 2018 +0100
Update to version 1.8.7-1083.
diff --git a/0001-Make-optional-AAC-support-via-libfaad.patch
b/0001-Make-optional-AAC-support-via-libfaad.patch
new file mode 100644
index 0000000..9bc1e26
--- /dev/null
+++ b/0001-Make-optional-AAC-support-via-libfaad.patch
@@ -0,0 +1,84 @@
+From 12618412cbd482953b911d5ec3f01c94057635b3 Mon Sep 17 00:00:00 2001
+From: Peter Oliver <git(a)mavit.org.uk>
+Date: Tue, 24 Apr 2018 13:58:36 +0100
+Subject: [PATCH] Make optional AAC support via libfaad
+
+---
+ Makefile | 13 +++++++++++--
+ decode.c | 2 ++
+ 2 files changed, 13 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index cc7b52a..f59c7fc 100644
+--- a/Makefile
++++ b/Makefile
+@@ -12,11 +12,12 @@ OPT_VIS = -DVISEXPORT
+ OPT_IR = -DIR
+ OPT_GPIO = -DGPIO
+ OPT_RPI = -DRPI
++OPT_FAAD = -DFAAD
+
+ SOURCES = \
+ main.c slimproto.c buffer.c stream.c utils.c \
+ output.c output_alsa.c output_pa.c output_stdout.c output_pack.c decode.c \
+- flac.c pcm.c mad.c vorbis.c faad.c mpg.c
++ flac.c pcm.c mad.c vorbis.c mpg.c
+
+ SOURCES_DSD = dsd.c dop.c dsd2pcm/dsd2pcm.c
+ SOURCES_FF = ffmpeg.c
+@@ -24,14 +25,16 @@ SOURCES_RESAMPLE = process.c resample.c
+ SOURCES_VIS = output_vis.c
+ SOURCES_IR = ir.c
+ SOURCES_GPIO = gpio.c
++SOURCES_FAAD = faad.c
+
+ LINK_LINUX = -ldl
+ LINK_RPI = -lwiringPi
+
+-LINKALL = -lFLAC -lmad -lvorbisfile -lfaad -lmpg123
++LINKALL = -lFLAC -lmad -lvorbisfile -lmpg123
+ LINKALL_FF = -lavcodec -lavformat -lavutil
+ LINKALL_RESAMPLE = -lsoxr
+ LINKALL_IR = -llirc_client
++LINKALL_FAAD = -lfaad
+
+ DEPS = squeezelite.h slimproto.h
+
+@@ -63,6 +66,9 @@ ifeq (,$(findstring $(SOURCES_GPIO), $(SOURCES)))
+ SOURCES += $(SOURCES_GPIO)
+ endif
+ endif
++ifneq (,$(findstring $(OPT_FAAD), $(OPTS)))
++ SOURCES += $(SOURCES_FAAD)
++endif
+
+ # add optional link options
+ ifneq (,$(findstring $(OPT_LINKALL), $(OPTS)))
+@@ -79,6 +85,9 @@ endif
+ ifneq (,$(findstring $(OPT_RPI), $(OPTS)))
+ LDADD += $(LINK_RPI)
+ endif
++ifneq (,$(findstring $(OPT_FAAD), $(OPTS)))
++ LDADD += $(LINKALL_FAAD)
++endif
+ else
+ # if not LINKALL and linux add LINK_LINUX
+ ifeq ($(UNAME), Linux)
+diff --git a/decode.c b/decode.c
+index 7a63a4d..161d5ac 100644
+--- a/decode.c
++++ b/decode.c
+@@ -165,8 +165,10 @@ void decode_init(log_level level, const char *include_codecs, const
char *exclud
+ if (!strstr(exclude_codecs, "wma") && (!include_codecs ||
(order_codecs = strstr(include_codecs, "wma"))))
+ sort_codecs((include_codecs ? order_codecs - include_codecs : i),
register_ff("wma"));
+ #endif
++#if FAAD
+ if (!strstr(exclude_codecs, "aac") && (!include_codecs ||
(order_codecs = strstr(include_codecs, "aac"))))
+ sort_codecs((include_codecs ? order_codecs - include_codecs : i), register_faad());
++#endif
+ if (!strstr(exclude_codecs, "ogg") && (!include_codecs ||
(order_codecs = strstr(include_codecs, "ogg"))))
+ sort_codecs((include_codecs ? order_codecs - include_codecs : i), register_vorbis());
+ if (!strstr(exclude_codecs, "flac") && (!include_codecs ||
(order_codecs = strstr(include_codecs, "flac"))))
+--
+2.14.3
+
diff --git a/Makefile-tweaks.patch b/Makefile-tweaks.patch
deleted file mode 100644
index ff573b8..0000000
--- a/Makefile-tweaks.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-Description: Makefile tweaks for hardening build options
- This patch changes the Makefile to add options to CFLAGS and LDFLAGS instead of
- overriding the values from the environment, and ensures that CPPFLAGS is also
- used when building C source.
-Author: Chris Boot <bootc(a)debian.org>
-Forwarded: not-needed
-Last-Update: 2018-04-23
-
---- a/Makefile
-+++ b/Makefile
-@@ -1,6 +1,6 @@
- # Cross compile support - create a Makefile which defines these three variables and then
includes this Makefile...
--CFLAGS ?= -Wall -fPIC -O2 $(OPTS)
--LDFLAGS ?= -lasound -lpthread -lm -lrt
-+CFLAGS ?= -Wall -fPIC -O2
-+LDADD ?= -lasound -lpthread -lm -lrt
- EXECUTABLE ?= squeezelite
-
- # passing one or more of these in $(OPTS) enables optional feature inclusion
-@@ -34,41 +34,41 @@
- UNAME = $(shell uname -s)
-
- # add optional sources
--ifneq (,$(findstring $(OPT_DSD), $(CFLAGS)))
-+ifneq (,$(findstring $(OPT_DSD), $(OPTS)))
- SOURCES += $(SOURCES_DSD)
- endif
--ifneq (,$(findstring $(OPT_FF), $(CFLAGS)))
-+ifneq (,$(findstring $(OPT_FF), $(OPTS)))
- SOURCES += $(SOURCES_FF)
- endif
--ifneq (,$(findstring $(OPT_RESAMPLE), $(CFLAGS)))
-+ifneq (,$(findstring $(OPT_RESAMPLE), $(OPTS)))
- SOURCES += $(SOURCES_RESAMPLE)
- endif
--ifneq (,$(findstring $(OPT_VIS), $(CFLAGS)))
-+ifneq (,$(findstring $(OPT_VIS), $(OPTS)))
- SOURCES += $(SOURCES_VIS)
- endif
--ifneq (,$(findstring $(OPT_IR), $(CFLAGS)))
-+ifneq (,$(findstring $(OPT_IR), $(OPTS)))
- SOURCES += $(SOURCES_IR)
- endif
--ifneq (,$(findstring $(OPT_GPIO), $(CFLAGS)))
-+ifneq (,$(findstring $(OPT_GPIO), $(OPTS)))
- SOURCES += $(SOURCES_GPIO)
- endif
-
- # add optional link options
--ifneq (,$(findstring $(OPT_LINKALL), $(CFLAGS)))
-- LDFLAGS += $(LINKALL)
--ifneq (,$(findstring $(OPT_FF), $(CFLAGS)))
-- LDFLAGS += $(LINKALL_FF)
-+ifneq (,$(findstring $(OPT_LINKALL), $(OPTS)))
-+ LDADD += $(LINKALL)
-+ifneq (,$(findstring $(OPT_FF), $(OPTS)))
-+ LDADD += $(LINKALL_FF)
- endif
--ifneq (,$(findstring $(OPT_RESAMPLE), $(CFLAGS)))
-- LDFLAGS += $(LINKALL_RESAMPLE)
-+ifneq (,$(findstring $(OPT_RESAMPLE), $(OPTS)))
-+ LDADD += $(LINKALL_RESAMPLE)
- endif
--ifneq (,$(findstring $(OPT_IR), $(CFLAGS)))
-- LDFLAGS += $(LINKALL_IR)
-+ifneq (,$(findstring $(OPT_IR), $(OPTS)))
-+ LDADD += $(LINKALL_IR)
- endif
- else
- # if not LINKALL and linux add LINK_LINUX
- ifeq ($(UNAME), Linux)
-- LDFLAGS += $(LINK_LINUX)
-+ LDADD += $(LINK_LINUX)
- endif
- endif
-
-@@ -74,12 +74,12 @@
- all: $(EXECUTABLE)
-
- $(EXECUTABLE): $(OBJECTS)
-- $(CC) $(OBJECTS) $(LDFLAGS) -o $@
-+ $(CC) $(OBJECTS) $(LDFLAGS) $(LDADD) -o $@
-
- $(OBJECTS): $(DEPS)
-
- .c.o:
-- $(CC) $(CFLAGS) $(CPPFLAGS) $< -c -o $@
-+ $(CC) $(CFLAGS) $(CPPFLAGS) $(OPTS) $< -c -o $@
-
- clean:
- rm -f $(OBJECTS) $(EXECUTABLE)
diff --git a/ffmpeg-4.0.patch b/ffmpeg-4.0.patch
deleted file mode 100644
index e4a0fa8..0000000
--- a/ffmpeg-4.0.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Description: Fix FTBFS with FFmpeg 4.0
-Author: James Cowgill <jcowgill(a)debian.org>
-Bug-Debian:
https://bugs.debian.org/888335
----
-This patch header follows DEP-3:
http://dep.debian.net/deps/dep3/
---- a/ffmpeg.c
-+++ b/ffmpeg.c
-@@ -264,7 +264,7 @@ static decode_state ff_decode(void) {
- ff->mmsh_bytes_left = ff->mmsh_bytes_pad = ff->mmsh_packet_len = 0;
-
- if (!ff->readbuf) {
-- ff->readbuf = AV(ff, malloc, READ_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
-+ ff->readbuf = AV(ff, malloc, READ_SIZE + AV_INPUT_BUFFER_PADDING_SIZE);
- }
-
- avio = AVIO(ff, alloc_context, ff->readbuf, READ_SIZE, 0, NULL, _read_data, NULL,
NULL);
diff --git a/squeezelite.spec b/squeezelite.spec
index 1c0150f..f9a7c1c 100644
--- a/squeezelite.spec
+++ b/squeezelite.spec
@@ -1,5 +1,5 @@
-%global forgeurl
https://github.com/mavit/squeezelite/
-%global commit eed9d1c9801dffb576f35d7ad95b122976ffd89f
+%global forgeurl
https://github.com/ralph-irving/squeezelite/
+%global commit 8386ece5d705c695afcd68ace1996b4818c65eb1
%forgemeta
# Allow AAC and ALAC, WMA to be played directly in the client rather than
@@ -9,8 +9,8 @@
%bcond_with ffmpeg
Name: squeezelite
-Version: 1.8.7.1078
-Release: 2%{?dist}
+Version: 1.8.7.1083
+Release: 1%{?dist}
Summary: Headless music player for streaming from Logitech Media Server
License: GPL3
@@ -20,10 +20,8 @@ Source1: %{name}.system.service
Source2: %{name}.user.service
Source3: %{name}.service.7.md
-# Suggested upstream.
https://github.com/ralph-irving/squeezelite/issues/43
-Source4:
https://anonscm.debian.org/git/collab-maint/squeezelite.git/plain/debian/...
-# Patch0: Makefile-tweaks.patch
-Patch1: ffmpeg-4.0.patch
+#
https://github.com/ralph-irving/squeezelite/pull/44
+Patch0: 0001-Make-optional-AAC-support-via-libfaad.patch
BuildRequires: alsa-lib-devel
%if %{with faad}
@@ -51,10 +49,7 @@ used in place of dedicated Squeezebox network music playing hardware.
%prep
%forgesetup
-# %patch0 -p1
-%if %{with ffmpeg}
-%patch1 -p1
-%endif
+%patch0 -p1
%build
@@ -76,7 +71,7 @@ pandoc --to=man --standalone --output=%{name}.service.7 %{SOURCE3}
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
-install -p -D -t %{buildroot}/%{_mandir}/man1 -m 0644 %{SOURCE4}
+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}
@@ -101,6 +96,9 @@ exit 0
%changelog
+* Wed Apr 25 2018 Peter Oliver <rpm(a)mavit.org.uk> - 1.8.7.1083-1
+- Update to version 1.8.7-1083.
+
* Tue Apr 24 2018 Peter Oliver <rpm(a)mavit.org.uk> - 1.8.7.1078-2
- Make optional legally problematic codecs.
commit 4aae735c3959c18c7dc5748c046ac46e49bbb655
Author: Peter Oliver <git(a)mavit.org.uk>
Date: Tue Apr 24 15:02:39 2018 +0100
Make optional legally problematic codecs.
diff --git a/squeezelite.spec b/squeezelite.spec
index 17825e9..1c0150f 100644
--- a/squeezelite.spec
+++ b/squeezelite.spec
@@ -1,11 +1,16 @@
-%global forgeurl
https://github.com/ralph-irving/squeezelite/
-%global commit d589bebd04f2bfebcc6ae4772ba82fa0b9320f96
+%global forgeurl
https://github.com/mavit/squeezelite/
+%global commit eed9d1c9801dffb576f35d7ad95b122976ffd89f
%forgemeta
+# 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.8.7.1078
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Headless music player for streaming from Logitech Media Server
License: GPL3
@@ -17,12 +22,16 @@ Source3: %{name}.service.7.md
# Suggested upstream.
https://github.com/ralph-irving/squeezelite/issues/43
Source4:
https://anonscm.debian.org/git/collab-maint/squeezelite.git/plain/debian/...
-Patch0: Makefile-tweaks.patch
+# Patch0: Makefile-tweaks.patch
Patch1: ffmpeg-4.0.patch
BuildRequires: alsa-lib-devel
+%if %{with faad}
BuildRequires: faad2-devel
+%endif
+%if %{with ffmpeg}
BuildRequires: ffmpeg-devel
+%endif
BuildRequires: flac-devel
BuildRequires: libmad-devel
BuildRequires: libvorbis-devel
@@ -42,8 +51,10 @@ used in place of dedicated Squeezebox network music playing hardware.
%prep
%forgesetup
-%patch0 -p1
+# %patch0 -p1
+%if %{with ffmpeg}
%patch1 -p1
+%endif
%build
@@ -53,10 +64,10 @@ used in place of dedicated Squeezebox network music playing hardware.
# %ifarch aarch64 armhfp
# %global squeezelite_opts OPTS="-DDSD -DFFMPEG -DLINKALL -DRESAMPLE -DVISEXPORT
-DIR -DGPIO"
# %else
-%global squeezelite_opts OPTS="-DDSD -DFFMPEG -DLINKALL -DRESAMPLE -DVISEXPORT
-DIR"
+%global squeezelite_opts OPTS="-DDSD -DLINKALL -DRESAMPLE -DVISEXPORT -DIR
%{?with_ffmpeg:-DFFMPEG} %{?with_faad:-DFAAD}"
# %endif
-%make_build CPPFLAGS+="-I/usr/include/ffmpeg" %{squeezelite_opts}
+%make_build %{?with_ffmpeg:CPPFLAGS+="-I/usr/include/ffmpeg"}
%{squeezelite_opts}
pandoc --to=man --standalone --output=%{name}.service.7 %{SOURCE3}
@@ -90,5 +101,8 @@ exit 0
%changelog
-* Sun Apr 22 2018 Peter Oliver <rpm(a)mavit.org.uk>
+* Tue Apr 24 2018 Peter Oliver <rpm(a)mavit.org.uk> - 1.8.7.1078-2
+- Make optional legally problematic codecs.
+
+* Sun Apr 22 2018 Peter Oliver <rpm(a)mavit.org.uk> - 1.8.7.1078-1
- Initial package.
commit 3b185b71bb38acd207423229954bc6944bf4e4b5
Author: Peter Oliver <git(a)mavit.org.uk>
Date: Tue Apr 24 15:01:16 2018 +0100
Create .gitignore
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..a2ab385
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+results_squeezelite/
+squeezelite-*.src.rpm
+squeezelite-*.tar.gz
+squeezelite.1
commit 04b1fb7a880ac089ff87cb12ced45a5efa488c5a
Author: Peter Oliver <git(a)mavit.org.uk>
Date: Tue Apr 24 13:32:38 2018 +0100
Initial package.
diff --git a/Makefile-tweaks.patch b/Makefile-tweaks.patch
new file mode 100644
index 0000000..ff573b8
--- /dev/null
+++ b/Makefile-tweaks.patch
@@ -0,0 +1,91 @@
+Description: Makefile tweaks for hardening build options
+ This patch changes the Makefile to add options to CFLAGS and LDFLAGS instead of
+ overriding the values from the environment, and ensures that CPPFLAGS is also
+ used when building C source.
+Author: Chris Boot <bootc(a)debian.org>
+Forwarded: not-needed
+Last-Update: 2018-04-23
+
+--- a/Makefile
++++ b/Makefile
+@@ -1,6 +1,6 @@
+ # Cross compile support - create a Makefile which defines these three variables and then
includes this Makefile...
+-CFLAGS ?= -Wall -fPIC -O2 $(OPTS)
+-LDFLAGS ?= -lasound -lpthread -lm -lrt
++CFLAGS ?= -Wall -fPIC -O2
++LDADD ?= -lasound -lpthread -lm -lrt
+ EXECUTABLE ?= squeezelite
+
+ # passing one or more of these in $(OPTS) enables optional feature inclusion
+@@ -34,41 +34,41 @@
+ UNAME = $(shell uname -s)
+
+ # add optional sources
+-ifneq (,$(findstring $(OPT_DSD), $(CFLAGS)))
++ifneq (,$(findstring $(OPT_DSD), $(OPTS)))
+ SOURCES += $(SOURCES_DSD)
+ endif
+-ifneq (,$(findstring $(OPT_FF), $(CFLAGS)))
++ifneq (,$(findstring $(OPT_FF), $(OPTS)))
+ SOURCES += $(SOURCES_FF)
+ endif
+-ifneq (,$(findstring $(OPT_RESAMPLE), $(CFLAGS)))
++ifneq (,$(findstring $(OPT_RESAMPLE), $(OPTS)))
+ SOURCES += $(SOURCES_RESAMPLE)
+ endif
+-ifneq (,$(findstring $(OPT_VIS), $(CFLAGS)))
++ifneq (,$(findstring $(OPT_VIS), $(OPTS)))
+ SOURCES += $(SOURCES_VIS)
+ endif
+-ifneq (,$(findstring $(OPT_IR), $(CFLAGS)))
++ifneq (,$(findstring $(OPT_IR), $(OPTS)))
+ SOURCES += $(SOURCES_IR)
+ endif
+-ifneq (,$(findstring $(OPT_GPIO), $(CFLAGS)))
++ifneq (,$(findstring $(OPT_GPIO), $(OPTS)))
+ SOURCES += $(SOURCES_GPIO)
+ endif
+
+ # add optional link options
+-ifneq (,$(findstring $(OPT_LINKALL), $(CFLAGS)))
+- LDFLAGS += $(LINKALL)
+-ifneq (,$(findstring $(OPT_FF), $(CFLAGS)))
+- LDFLAGS += $(LINKALL_FF)
++ifneq (,$(findstring $(OPT_LINKALL), $(OPTS)))
++ LDADD += $(LINKALL)
++ifneq (,$(findstring $(OPT_FF), $(OPTS)))
++ LDADD += $(LINKALL_FF)
+ endif
+-ifneq (,$(findstring $(OPT_RESAMPLE), $(CFLAGS)))
+- LDFLAGS += $(LINKALL_RESAMPLE)
++ifneq (,$(findstring $(OPT_RESAMPLE), $(OPTS)))
++ LDADD += $(LINKALL_RESAMPLE)
+ endif
+-ifneq (,$(findstring $(OPT_IR), $(CFLAGS)))
+- LDFLAGS += $(LINKALL_IR)
++ifneq (,$(findstring $(OPT_IR), $(OPTS)))
++ LDADD += $(LINKALL_IR)
+ endif
+ else
+ # if not LINKALL and linux add LINK_LINUX
+ ifeq ($(UNAME), Linux)
+- LDFLAGS += $(LINK_LINUX)
++ LDADD += $(LINK_LINUX)
+ endif
+ endif
+
+@@ -74,12 +74,12 @@
+ all: $(EXECUTABLE)
+
+ $(EXECUTABLE): $(OBJECTS)
+- $(CC) $(OBJECTS) $(LDFLAGS) -o $@
++ $(CC) $(OBJECTS) $(LDFLAGS) $(LDADD) -o $@
+
+ $(OBJECTS): $(DEPS)
+
+ .c.o:
+- $(CC) $(CFLAGS) $(CPPFLAGS) $< -c -o $@
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(OPTS) $< -c -o $@
+
+ clean:
+ rm -f $(OBJECTS) $(EXECUTABLE)
diff --git a/ffmpeg-4.0.patch b/ffmpeg-4.0.patch
new file mode 100644
index 0000000..e4a0fa8
--- /dev/null
+++ b/ffmpeg-4.0.patch
@@ -0,0 +1,16 @@
+Description: Fix FTBFS with FFmpeg 4.0
+Author: James Cowgill <jcowgill(a)debian.org>
+Bug-Debian:
https://bugs.debian.org/888335
+---
+This patch header follows DEP-3:
http://dep.debian.net/deps/dep3/
+--- a/ffmpeg.c
++++ b/ffmpeg.c
+@@ -264,7 +264,7 @@ static decode_state ff_decode(void) {
+ ff->mmsh_bytes_left = ff->mmsh_bytes_pad = ff->mmsh_packet_len = 0;
+
+ if (!ff->readbuf) {
+- ff->readbuf = AV(ff, malloc, READ_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
++ ff->readbuf = AV(ff, malloc, READ_SIZE + AV_INPUT_BUFFER_PADDING_SIZE);
+ }
+
+ avio = AVIO(ff, alloc_context, ff->readbuf, READ_SIZE, 0, NULL, _read_data, NULL,
NULL);
diff --git a/squeezelite.service.7.md b/squeezelite.service.7.md
new file mode 100644
index 0000000..38bd820
--- /dev/null
+++ b/squeezelite.service.7.md
@@ -0,0 +1,43 @@
+# NAME
+
+squeezelite.service - Systemd units for Squeezelite
+
+# DESCRIPTION
+
+Automatically start the Squeezelite music streaming client each time a user logs in, or
each time a system boots.
+
+# EXAMPLES
+
+To run `squeezelite` as part of your user desktop session:
+
+ systemctl --user enable squeezelite
+ systemctl --user start squeezelite
+
+To run `squeezelite` at system boot:
+
+ systemctl enable squeezelite
+ systemctl start squeezelite
+
+To configure `squeezelite`, edit the command line options passed to it:
+
+ systemctl --user edit --full squeezelite
+
+or:
+
+ systemctl edit --full squeezelite
+
+If running outside of a user session, you will probably need to specify the ALSA output
device using `squeezelite`’s `-o` option. Get a list of available devices with:
+
+ squeezelite -l
+
+
+# SEE ALSO
+
+squeezelite(1), systemctl(1)
+
+---
+title: squeezelite.service
+section: 7
+date: April 2018
+author: Peter Oliver <rpm(a)mavit.org.uk>
+...
diff --git a/squeezelite.spec b/squeezelite.spec
new file mode 100644
index 0000000..17825e9
--- /dev/null
+++ b/squeezelite.spec
@@ -0,0 +1,94 @@
+%global forgeurl
https://github.com/ralph-irving/squeezelite/
+%global commit d589bebd04f2bfebcc6ae4772ba82fa0b9320f96
+%forgemeta
+
+
+Name: squeezelite
+Version: 1.8.7.1078
+Release: 1%{?dist}
+Summary: Headless music player for streaming from Logitech Media Server
+
+License: GPL3
+URL: %{forgeurl}
+Source0: %{forgesource}
+Source1: %{name}.system.service
+Source2: %{name}.user.service
+Source3: %{name}.service.7.md
+
+# Suggested upstream.
https://github.com/ralph-irving/squeezelite/issues/43
+Source4:
https://anonscm.debian.org/git/collab-maint/squeezelite.git/plain/debian/...
+Patch0: Makefile-tweaks.patch
+Patch1: ffmpeg-4.0.patch
+
+BuildRequires: alsa-lib-devel
+BuildRequires: faad2-devel
+BuildRequires: ffmpeg-devel
+BuildRequires: flac-devel
+BuildRequires: libmad-devel
+BuildRequires: libvorbis-devel
+BuildRequires: lirc-devel
+BuildRequires: mpg123-devel
+BuildRequires: pandoc
+BuildRequires: soxr-devel
+BuildRequires: systemd
+
+Requires(pre): shadow-utils
+
+
+%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
+%patch0 -p1
+%patch1 -p1
+
+
+%build
+%set_build_flags
+
+## GPIO support depends on WiringPi, which is not currently in Fedora.
+# %ifarch aarch64 armhfp
+# %global squeezelite_opts OPTS="-DDSD -DFFMPEG -DLINKALL -DRESAMPLE -DVISEXPORT
-DIR -DGPIO"
+# %else
+%global squeezelite_opts OPTS="-DDSD -DFFMPEG -DLINKALL -DRESAMPLE -DVISEXPORT
-DIR"
+# %endif
+
+%make_build CPPFLAGS+="-I/usr/include/ffmpeg" %{squeezelite_opts}
+
+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
+install -p -D -t %{buildroot}/%{_mandir}/man1 -m 0644 %{SOURCE4}
+install -p -D -t %{buildroot}/%{_mandir}/man7 -m 0644 %{name}.service.7
+mkdir -p %{buildroot}/%{_sharedstatedir}/%{name}
+
+
+%files
+%dir %attr(-,%{name},%{name}) %{_sharedstatedir}/%{name}
+%doc %{_mandir}/*/*
+%doc README.md
+%license LICENSE.txt
+%{_bindir}/%{name}
+%{_unitdir}/%{name}.service
+%{_userunitdir}/%{name}.service
+
+
+%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
+
+
+%changelog
+* Sun Apr 22 2018 Peter Oliver <rpm(a)mavit.org.uk>
+- Initial package.
diff --git a/squeezelite.system.service b/squeezelite.system.service
new file mode 100644
index 0000000..88b5d01
--- /dev/null
+++ b/squeezelite.system.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Squeezelite headless streaming music client
+Documentation=man:squeezelite.service(7)
+Wants=sound.target
+After=sound.target
+
+[Service]
+User=squeezelite
+Group=squeezelite
+ExecStart=/usr/bin/squeezelite -N /var/lib/squeezelite/player-name
+
+[Install]
+WantedBy=multi-user.target
diff --git a/squeezelite.user.service b/squeezelite.user.service
new file mode 100644
index 0000000..31f0969
--- /dev/null
+++ b/squeezelite.user.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Squeezelite headless streaming music client
+Documentation=man:squeezelite.service(7)
+
+[Service]
+ExecStart=/usr/bin/squeezelite -N ~/.local/share/squeezelite/player-name
+
+[Install]
+WantedBy=default.target