2016-12-27 18:57:41 -05:00
|
|
|
# @configure_input@
|
2018-03-19 00:08:21 -04:00
|
|
|
# -*- Mode:rpm-spec -*-
|
2016-12-27 18:57:41 -05:00
|
|
|
%global username @DAAPD_USER@
|
|
|
|
%global groupname @DAAPD_GROUP@
|
|
|
|
|
|
|
|
%bcond_without alsa
|
2018-03-19 00:08:21 -04:00
|
|
|
%bcond_without pulseaudio
|
2016-12-27 18:57:41 -05:00
|
|
|
%bcond_with spotify
|
|
|
|
%bcond_with lastfm
|
|
|
|
%bcond_with chromecast
|
|
|
|
|
|
|
|
%global _hardened_build 1
|
|
|
|
|
|
|
|
Summary: iTunes-compatible DAAP server with MPD and RSP support
|
2018-03-19 00:08:21 -04:00
|
|
|
Name: forked-daapd
|
2016-12-27 18:57:41 -05:00
|
|
|
Version: @PACKAGE_VERSION@
|
2017-01-06 03:44:18 -05:00
|
|
|
Release: 1%{?dist}
|
2016-12-27 18:57:41 -05:00
|
|
|
License: GPLv2+
|
|
|
|
Group: Applications/Multimedia
|
|
|
|
Url: https://github.com/ejurgensen/forked-daapd
|
2018-03-19 00:08:21 -04:00
|
|
|
Source0: https://github.com/ejurgensen/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
|
2016-12-27 18:57:41 -05:00
|
|
|
%{?systemd_ordering}
|
2018-03-19 00:08:21 -04:00
|
|
|
BuildRequires: gcc, make, systemd, pkgconfig, libunistring-devel
|
|
|
|
BuildRequires: pkgconfig(zlib), pkgconfig(libconfuse), pkgconfig(mxml)
|
|
|
|
BuildRequires: pkgconfig(sqlite3) >= 3.5.0, pkgconfig(libevent) >= 2.0.0
|
|
|
|
BuildRequires: pkgconfig(json-c), antlr3-C-devel, libgcrypt-devel >= 1.2.0
|
2016-12-27 18:57:41 -05:00
|
|
|
BuildRequires: libgpg-error-devel >= 1.6
|
2018-03-19 00:08:21 -04:00
|
|
|
BuildRequires: pkgconfig(libavformat), pkgconfig(libavcodec)
|
|
|
|
BuildRequires: pkgconfig(libswscale), pkgconfig(libavutil)
|
|
|
|
BuildRequires: pkgconfig(libavfilter), pkgconfig(libcurl)
|
|
|
|
BuildRequires: pkgconfig(openssl), pkgconfig(libwebsockets) > 2.0.2
|
2020-11-14 15:24:08 -05:00
|
|
|
BuildRequires: pkgconfig(libsodium), libplist-devel >= 0.16
|
2018-03-19 00:08:21 -04:00
|
|
|
BuildRequires: pkgconfig(avahi-client) >= 0.6.24
|
2016-12-27 18:57:41 -05:00
|
|
|
Requires(pre): shadow-utils
|
|
|
|
%if %{with alsa}
|
|
|
|
BuildRequires: pkgconfig(alsa)
|
|
|
|
%endif
|
|
|
|
%if %{with pulseaudio}
|
|
|
|
BuildRequires: pkgconfig(libpulse)
|
|
|
|
%endif
|
|
|
|
%if %{with spotify}
|
|
|
|
BuildRequires: libspotify-devel
|
|
|
|
%endif
|
|
|
|
%if %{with chromecast}
|
|
|
|
BuildRequires: pkgconfig(libprotobuf-c)
|
2018-03-19 00:08:21 -04:00
|
|
|
BuildRequires: pkgconfig(gnutls)
|
2016-12-27 18:57:41 -05:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%global homedir %{_localstatedir}/lib/%{name}
|
|
|
|
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
|
|
|
|
|
|
|
%description
|
|
|
|
forked-daapd is a DAAP/DACP (iTunes), MPD (Music Player Daemon)
|
|
|
|
and RSP (Roku) media server.
|
|
|
|
|
|
|
|
It has support for AirPlay devices/speakers, Apple Remote (and compatibles),
|
|
|
|
MPD clients, Chromecast, network streaming, internet radio, Spotify and LastFM.
|
|
|
|
|
|
|
|
It does not support streaming video by AirPlay nor Chromecast.
|
|
|
|
|
|
|
|
DAAP stands for Digital Audio Access Protocol, and is the protocol used
|
|
|
|
by iTunes and friends to share/stream media libraries over the network.
|
|
|
|
|
|
|
|
forked-daapd is a complete rewrite of mt-daapd (Firefly Media Server).
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%build
|
|
|
|
%configure \
|
2018-03-19 00:08:21 -04:00
|
|
|
--with%{!?with_alsa:out}-alsa --with%{!?with_pulseaudio:out}-pulseaudio \
|
|
|
|
--with-libcurl --with-libwebsockets --with-libsodium --with-libplist \
|
|
|
|
--with-avahi %{?with_spotify:--enable-spotify} \
|
|
|
|
%{?with_lastfm:--enable-lastfm} %{?with_chromecast:--enable-chromecast} \
|
|
|
|
--with-daapd-user=%{username} --with-daapd-group=%{groupname}
|
|
|
|
%make_build
|
2016-12-27 18:57:41 -05:00
|
|
|
|
|
|
|
%install
|
|
|
|
make install DESTDIR=%{buildroot} docdir=%{_pkgdocdir}
|
|
|
|
rm -f %{buildroot}%{_pkgdocdir}/INSTALL
|
|
|
|
mkdir -p %{buildroot}%{homedir}
|
|
|
|
mkdir -p %{buildroot}%{_localstatedir}/log
|
|
|
|
touch %{buildroot}%{_localstatedir}/log/%{name}.log
|
|
|
|
mkdir -p %{buildroot}%{_unitdir}
|
|
|
|
install -m 0644 forked-daapd.service %{buildroot}%{_unitdir}/%{name}.service
|
|
|
|
rm -f %{buildroot}%{_libdir}/%{name}/*.la
|
|
|
|
|
|
|
|
%pre
|
|
|
|
getent group %{groupname} >/dev/null || groupadd -r %{groupname}
|
|
|
|
getent passwd %{username} >/dev/null || \
|
|
|
|
useradd -r -g %{groupname} -d %{homedir} -s /sbin/nologin \
|
2018-03-19 00:08:21 -04:00
|
|
|
-c '%{name} User' %{username}
|
2016-12-27 18:57:41 -05:00
|
|
|
exit 0
|
|
|
|
|
|
|
|
%post
|
|
|
|
%systemd_post %{name}.service
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%systemd_preun %{name}.service
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%systemd_postun_with_restart %{name}.service
|
|
|
|
|
|
|
|
%files
|
|
|
|
%{!?_licensedir:%global license %%doc}
|
|
|
|
%license COPYING
|
|
|
|
%{_pkgdocdir}
|
|
|
|
%config(noreplace) %{_sysconfdir}/forked-daapd.conf
|
|
|
|
%{_sbindir}/forked-daapd
|
2018-03-19 00:08:21 -04:00
|
|
|
%{_libdir}/%{name}/
|
|
|
|
%{_datarootdir}/%{name}/
|
2016-12-27 18:57:41 -05:00
|
|
|
%{_unitdir}/%{name}.service
|
|
|
|
%attr(0750,%{username},%{groupname}) %{_localstatedir}/cache/%{name}
|
|
|
|
%attr(0750,%{username},%{groupname}) %{homedir}
|
|
|
|
%ghost %{_localstatedir}/log/%{name}.log
|
|
|
|
%{_mandir}/man?/*
|
|
|
|
|
|
|
|
%changelog
|
2018-03-19 00:08:21 -04:00
|
|
|
* Sat Mar 17 2018 Scott Shambarger <devel@shambarger.net> - 26.0-1
|
|
|
|
- 26.0 release.
|
|
|
|
- Update spec file to handle new feature defaults.
|
|
|
|
- Added new files/directories.
|
|
|
|
|
2016-12-27 18:57:41 -05:00
|
|
|
* Tue Dec 20 2016 Scott Shambarger <devel@shambarger.net> - 24.2-1
|
|
|
|
- Initial RPM release candidate.
|