forked from owntone/owntone-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathforked-daapd.spec.in
126 lines (107 loc) · 4.03 KB
/
forked-daapd.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# @configure_input@
# -*- Mode:rpm-spec -*-
%global username @DAAPD_USER@
%global groupname @DAAPD_GROUP@
%bcond_without alsa
%bcond_without pulseaudio
%bcond_with spotify
%bcond_with lastfm
%bcond_with chromecast
%global _hardened_build 1
Summary: iTunes-compatible DAAP server with MPD and RSP support
Name: forked-daapd
Version: @PACKAGE_VERSION@
Release: 1%{?dist}
License: GPLv2+
Group: Applications/Multimedia
Url: https://github.com/ejurgensen/forked-daapd
Source0: https://github.com/ejurgensen/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
%{?systemd_ordering}
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
BuildRequires: libgpg-error-devel >= 1.6
BuildRequires: pkgconfig(libavformat), pkgconfig(libavcodec)
BuildRequires: pkgconfig(libswscale), pkgconfig(libavutil)
BuildRequires: pkgconfig(libavfilter), pkgconfig(libcurl)
BuildRequires: pkgconfig(openssl), pkgconfig(libwebsockets) > 2.0.2
BuildRequires: pkgconfig(libsodium), pkgconfig(avahi-client) >= 0.6.24
# pkgconfig(libplist) not used universally, so require libplist-devel instead
BuildRequires: libplist-devel >= 0.16
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)
BuildRequires: pkgconfig(gnutls)
%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 \
--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
%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 \
-c '%{name} User' %{username}
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
%{_libdir}/%{name}/
%{_datarootdir}/%{name}/
%{_unitdir}/%{name}.service
%attr(0750,%{username},%{groupname}) %{_localstatedir}/cache/%{name}
%attr(0750,%{username},%{groupname}) %{homedir}
%ghost %{_localstatedir}/log/%{name}.log
%{_mandir}/man?/*
%changelog
* Sat Mar 17 2018 Scott Shambarger <[email protected]> - 26.0-1
- 26.0 release.
- Update spec file to handle new feature defaults.
- Added new files/directories.
* Tue Dec 20 2016 Scott Shambarger <[email protected]> - 24.2-1
- Initial RPM release candidate.