From 2bc7298cd120f3c064ed969ae7c1a1b4efed814ee2ad30aa5e7e51e0e49fd4f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 12 Jun 2018 12:52:43 +0000 Subject: [PATCH] Accepting request 616309 from home:hillwood OBS-URL: https://build.opensuse.org/request/show/616309 OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/shairport-sync?expand=0&rev=1 --- .gitattributes | 23 +++++++ .gitignore | 1 + README.SUSE | 11 +++ airplay-server.xml | 9 +++ drop-user-config.patch | 14 ++++ shairport-sync-3.2RC10.tar.gz | 3 + shairport-sync.changes | 7 ++ shairport-sync.spec | 122 ++++++++++++++++++++++++++++++++++ 8 files changed, 190 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 README.SUSE create mode 100644 airplay-server.xml create mode 100644 drop-user-config.patch create mode 100644 shairport-sync-3.2RC10.tar.gz create mode 100644 shairport-sync.changes create mode 100644 shairport-sync.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/README.SUSE b/README.SUSE new file mode 100644 index 0000000..448686d --- /dev/null +++ b/README.SUSE @@ -0,0 +1,11 @@ +shairport-sync README for SuSE + +How to start using shairport-sync + +Start shairport-sync: sudo systemctl start shairport-sync +Stop shairport-sync: sudo systemctl stop shairport-sync +Start during booting: sudo systemctl enable shairport-sync + +Open ports in firewalld: sudo firewall-cmd --add-service=airplay-server --permanent + sudo firewall-cmd --add-service=mdns --permanent + sudo systemctl restart firewalld diff --git a/airplay-server.xml b/airplay-server.xml new file mode 100644 index 0000000..81b16dc --- /dev/null +++ b/airplay-server.xml @@ -0,0 +1,9 @@ + + + airplay-server + Airplay Server + + + + + diff --git a/drop-user-config.patch b/drop-user-config.patch new file mode 100644 index 0000000..05b13c7 --- /dev/null +++ b/drop-user-config.patch @@ -0,0 +1,14 @@ +diff -Nur shairport-sync-3.2RC10/Makefile.am shairport-sync-3.2RC10-new/Makefile.am +--- shairport-sync-3.2RC10/Makefile.am 2018-05-26 22:27:11.000000000 +0800 ++++ shairport-sync-3.2RC10-new/Makefile.am 2018-06-11 15:28:37.222509735 +0800 +@@ -146,8 +146,8 @@ + [ -f $(DESTDIR)$(sysconfdir)/init.d/shairport-sync ] || cp scripts/shairport-sync $(DESTDIR)$(sysconfdir)/init.d/ + endif + if INSTALL_SYSTEMD +- getent group shairport-sync &>/dev/null || groupadd -r shairport-sync >/dev/null +- getent passwd shairport-sync &> /dev/null || useradd -r -M -g shairport-sync -s /usr/bin/nologin -G audio shairport-sync >/dev/null ++# getent group shairport-sync &>/dev/null || groupadd -r shairport-sync >/dev/null ++# getent passwd shairport-sync &> /dev/null || useradd -r -M -g shairport-sync -s /usr/bin/nologin -G audio shairport-sync >/dev/null + [ -e $(DESTDIR)$(systemdsystemunitdir) ] || mkdir -p $(DESTDIR)$(systemdsystemunitdir) + [ -f $(DESTDIR)$(systemdsystemunitdir)/shairport-sync.service ] || cp scripts/shairport-sync.service $(DESTDIR)$(systemdsystemunitdir) + endif diff --git a/shairport-sync-3.2RC10.tar.gz b/shairport-sync-3.2RC10.tar.gz new file mode 100644 index 0000000..03dafd2 --- /dev/null +++ b/shairport-sync-3.2RC10.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dc30305ebf26b4499be1192d65f605c3e146d4d9b7101633daa8d9a1270cb483 +size 355476 diff --git a/shairport-sync.changes b/shairport-sync.changes new file mode 100644 index 0000000..97c1ce7 --- /dev/null +++ b/shairport-sync.changes @@ -0,0 +1,7 @@ +------------------------------------------------------------------- +Mon Jun 11 13:48:36 UTC 2018 - hillwood@opensuse.org + +- Initial package for 3.2rc10. +- Add drop-user-config.patch, move configuring user account to rpm spec. +- Add firewalld profile. +- Add README.SUSE diff --git a/shairport-sync.spec b/shairport-sync.spec new file mode 100644 index 0000000..0848a4b --- /dev/null +++ b/shairport-sync.spec @@ -0,0 +1,122 @@ + +# spec file for package shairport-sync +# +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +%define rcversion RC10 +%define _version 3.2 + +Name: shairport-sync +Version: 3.1.99.10 +Release: 0 +Summary: Shairport Sync is an AirPlay audio player +License: GPL-3.0 +URL: https://github.com/mikebrady/shairport-sync +Source0: https://github.com/mikebrady/shairport-sync/archive/%{_version}%{rcversion}/%{name}-%{_version}%{rcversion}.tar.gz +Source1: airplay-server.xml +Source2: README.SUSE +# PATCH-FIX-OPENSUSE drop-user-config.patch hillwood@opensuse.org -- Move configuring user account to rpm spec. +# Move configuring user account to rpm spec. +Patch0: drop-user-config.patch +Group: Productivity/Multimedia/Sound/Utilities +BuildRequires: pkgconfig(libpulse) +BuildRequires: pkgconfig(openssl) +BuildRequires: pkgconfig(libdaemon) +BuildRequires: pkgconfig(libconfig) +BuildRequires: pkgconfig(popt) +BuildRequires: pkgconfig(alsa) +BuildRequires: pkgconfig(soxr) +BuildRequires: pkgconfig(sndfile) +BuildRequires: pkgconfig(avahi-client) +BuildRequires: gnome-common +BuildRequires: systemd +BuildRequires: gcc-c++ +BuildRequires: fdupes +BuildRequires: firewall-macros +Requires(pre): shadow +Requires: firewalld +%{?systemd_requires} +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%description +Shairport Sync is an AirPlay audio player – it plays audio streamed from iTunes, +iOS, Apple TV and macOS devices and AirPlay sources such as Quicktime Player and +ForkedDaapd, among others. + +Audio played by a Shairport Sync-powered device stays synchronised with the +source and hence with similar devices playing the same source. In this way, +synchronised multi-room audio is possible for players that support it, such as +iTunes. + +Shairport Sync runs on Linux, FreeBSD and OpenBSD. It does not support AirPlay +video or photo streaming. + +%prep +%setup -q -n %{name}-%{_version}%{rcversion} +%patch0 -p1 +cp %{SOURCE2} . + +%build +autoreconf -i -f +%configure --with-systemd \ + --with-ssl=openssl \ + --with-pa \ + --with-pipe \ + --with-avahi \ + --with-soxr \ + --with-metadata \ + --with-configfiles \ + --with-convolution +make %{?_smp_mflags} + +%install +%make_install +mkdir -p %{buildroot}%{_libexecdir}/firewalld/services +install -m 0644 %{SOURCE1} %{buildroot}%{_libexecdir}/firewalld/services/ +rm %{buildroot}%{_sysconfdir}/shairport-sync.conf.sample +mkdir -p %{buildroot}%{_sbindir} +ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name} + +%pre +getent group %{name} &>/dev/null || /usr/sbin/groupadd --system %{name} >/dev/null +getent passwd %{name} &> /dev/null || /usr/sbin/useradd --system -c "%{name} User" \ + -d %{_localstatedir}/%{name} -m -g %{name} -s /usr/sbin/nologin \ + -G audio %{name} >/dev/null +%service_add_pre %{name}.service + +%post +%service_add_post %{name}.service +%firewalld_reload + +%preun +%service_del_preun %{name}.service + +%postun +%service_del_postun %{name}.service + +%files +%defattr(-,root,root,-) +%doc README.md RELEASENOTES.md TROUBLESHOOTING.md README.SUSE +%license LICENSES +%config(noreplace) %{_sysconfdir}/shairport-sync.conf +%{_bindir}/%{name} +%dir %{_libexecdir}/firewalld +%dir %{_libexecdir}/firewalld/services +%{_libexecdir}/firewalld/services/airplay-server.xml +%{_mandir}/man7/shairport-sync.7.gz +%{_unitdir}/%{name}.service +%{_sbindir}/rc%{name} + +%changelog