-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathliquidsoap.spec
210 lines (183 loc) · 6.99 KB
/
liquidsoap.spec
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
#
# spec file for package liquidsoap
#
# Copyright (c) 2018 - 2019 Radio Bern RaBe
# http://www.rabe.ch
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, version 3 of the
# License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
# Please submit enhancements, bugfixes or comments via GitHub:
# https://github.com/radiorabe/centos-rpm-liquidsoap
#
%define _emacs_sitelispdir %{_datadir}/emacs/site-lisp
%define _bash_completiondir %{_sysconfdir}/bash_completion.d/
Name: liquidsoap
Version: 1.4.3
Release: 0.2%{?dist}
Summary: Audio and video streaming language
License: GPLv2
URL: http://liquidsoap.info/
Source0: https://github.com/savonet/liquidsoap/releases/download/v%{version}/%{name}-%{version}.tar.bz2
Source1: [email protected]
Source2: https://sources.debian.org/data/main/l/liquidsoap/1.4.3-2/debian/liquidsoap.xml
Source3: https://raw.githubusercontent.com/jgm/highlighting-kate/master/xml/language.dtd
Patch0: https://github.com/savonet/liquidsoap/commit/220838bbdbc73c219cc2d7e891a6cd1ab577cc67.patch?#/liquidsoap-1.4.3-ship-xml-definitions-manually.patch
Patch1: liquidsoap-1.4.3-no-curl-in-docs.patch
BuildRequires: ffmpeg-devel
BuildRequires: file-devel
BuildRequires: flac-devel
BuildRequires: giflib-devel
BuildRequires: inotify-tools-devel
BuildRequires: ladspa-devel
BuildRequires: lame-devel
BuildRequires: libexif-devel
BuildRequires: libjpeg-turbo-devel
BuildRequires: libmad-devel
BuildRequires: libpng-devel
BuildRequires: libsamplerate-devel
BuildRequires: libstdc++-static
BuildRequires: libtiff-devel
BuildRequires: libvorbis-devel
BuildRequires: libX11-devel
BuildRequires: libXpm-devel
BuildRequires: ocaml >= 4.08
BuildRequires: ocaml-alsa-devel < 0.3.0
BuildRequires: ocaml-biniou-devel
BuildRequires: ocaml-camlimages-devel
BuildRequires: ocaml-camomile-devel
BuildRequires: ocaml-cry-devel
BuildRequires: ocaml-dtools-devel
BuildRequires: ocaml-duppy-devel
BuildRequires: ocaml-easy-format-devel
BuildRequires: ocaml-ffmpeg-devel
BuildRequires: ocaml-findlib
BuildRequires: ocaml-flac-devel
BuildRequires: ocaml-gen-devel
BuildRequires: ocaml-inotify-devel
BuildRequires: ocaml-bjack-devel
BuildRequires: ocaml-ladspa-devel
BuildRequires: ocaml-lame-devel
BuildRequires: ocaml-mad-devel
BuildRequires: ocaml-magic-devel
BuildRequires: ocaml-menhir-devel
BuildRequires: ocaml-mm-devel < 0.6.0
BuildRequires: ocaml-ocamldoc >= 4.08
BuildRequires: ocaml-ogg-devel < 0.6.0
BuildRequires: ocaml-opus-devel
BuildRequires: ocaml-pcre-devel
BuildRequires: ocaml-pulseaudio-devel
BuildRequires: ocaml-samplerate-devel
BuildRequires: ocaml-SDL-devel
BuildRequires: ocaml-sedlex-devel
BuildRequires: ocaml-soundtouch-devel
BuildRequires: ocaml-speex-devel
BuildRequires: ocaml-ssl-devel
BuildRequires: ocaml-taglib-devel
BuildRequires: ocaml-theora-devel
BuildRequires: ocaml-vorbis-devel
BuildRequires: ocaml-xmlm-devel
BuildRequires: ocaml-xmlplaylist-devel
BuildRequires: ocaml-yojson-devel
BuildRequires: opus-devel
BuildRequires: pandoc
BuildRequires: perl-XML-DOM
BuildRequires: pcre-devel
BuildRequires: pulseaudio-libs-devel
BuildRequires: soundtouch-devel
BuildRequires: speex-devel
BuildRequires: systemd
BuildRequires: taglib-devel
%{?systemd_requires}
# needed to find pkg-config in containers since they do not include which
BuildRequires: which
Requires(pre): shadow-utils
%description
Liquidsoap is a powerful and flexible language for describing your streams. It
offers a rich collection of operators that you can combine at will, giving you
more power than you need for creating or transforming streams. But liquidsoap
is still very light and easy to use, in the Unix tradition of simple strong
components working together.
%package doc
Summary: HTML documentation for %{name}
%description doc
Extensive HTML documentation for %{name}. Contains the complete liquidsoap
website and documentation as generated from the source plus examples.
%prep
%setup -q
%patch -P0 -p1
cp %{SOURCE2} doc/
cp %{SOURCE3} doc/
# use _pic runtime variant if ocamlc was compiled with -fPIC
ocamlopt -config | grep 'ocamlc_cflags:.*-fPIC' >/dev/null && export OCAMLFLAGS="-runtime-variant _pic"
# do not use the configure rpm macro due to this not being a classical autoconf based configure script
./configure --prefix=%{_exec_prefix} --sysconfdir=%{_sysconfdir} --mandir=%{_mandir} --localstatedir=%{_localstatedir} --disable-ldconf
%build
make
make doc
%install
# do not use the make_install rpm macro due to this not being a classical automake based makefile
make install %{_exec_prefix} OCAMLFIND_DESTDIR=%{buildroot}%{_exec_prefix} prefix=%{buildroot}%{_exec_prefix} sysconfdir=%{buildroot}%{_sysconfdir} mandir=%{buildroot}%{_mandir} localstatedir=%{buildroot}%{_localstatedir}
install -d %{buildroot}%{_unitdir}
install -c %{SOURCE1} -m 644 %{buildroot}%{_unitdir}
mv %{buildroot}${_exec_prefix}/usr/share/doc/%{name}/html %{buildroot}${_exec_prefix}/usr/share/doc/%{name}-%{version}/html
%pre
getent group liquidsoap >/dev/null || groupadd -r liquidsoap
getent passwd liquidsoap >/dev/null || \
useradd -r -g liquidsoap -d /var/lib/liquidsoap -m \
-c "Liquidsoap system user account" liquidsoap
exit 0
%post
%systemd_post [email protected]
%preun
%systemd_preun [email protected]
%postun
%systemd_postun_with_restart [email protected]
%files
%{_bindir}/%{name}
%{_unitdir}/%{name}@.service
%{_bash_completiondir}/%{name}
%{_emacs_sitelispdir}/%{name}-mode/%{name}-mode.el
%config%{_sysconfdir}/%{name}/radio.liq.example
%config(noreplace)%{_sysconfdir}/logrotate.d/%{name}
%{_exec_prefix}/share/%{name}/%{version}/
%doc README.md CHANGES.md
%doc
%{_mandir}/man1/%{name}.1.*
%files doc
%doc
%{_docdir}/%{name}-%{version}/html
%{_docdir}/%{name}-%{version}/examples
%changelog
* Wed Dec 23 2020 Lucas Bickel <[email protected]> - 1.4.3-0.2
- add ffmpeg support
- add pulseaudio support
- add video support (ffmepg & camlimages)
- add vizualization support (SDL)
* Thu Dec 3 2020 Lucas Bickel <[email protected]> - 1.4.3-0.1
- update to liquidsoap 1.4.3
- drop CentOS 7 support, add Fedora 32+ support
* Sun Aug 18 2019 Lucas Bickel <[email protected]> - 1.3.7-0.2
- add patch to support ocaml-flac 0.1.5
* Sun Jun 2 2019 Lucas Bickel <[email protected]> - 1.3.7-0.1
- Bump to 1.3.7
* Wed Jan 23 2019 Lucas Bickel <[email protected]> - 1.3.6-0.1
- Bump to 1.3.6
* Tue Dec 25 2018 Lucas Bickel <[email protected]> - 1.3.5-0.1
- Bump to 1.3.5
* Sun Dec 23 2018 Lucas Bickel <[email protected]> - 1.3.4-3
- Explicit BuildRequire for ocaml-mad-devel
* Mon Dec 10 2018 Lucas Bickel <[email protected]> - 1.3.4-2
- Initialize RPM changelog
- Proper installation of runtime deps