diff --git a/liquidsoap-2.2.0-ocaml-flac-0.4.0.patch b/liquidsoap-2.2.0-ocaml-flac-0.4.0.patch new file mode 100644 index 0000000..66fc324 --- /dev/null +++ b/liquidsoap-2.2.0-ocaml-flac-0.4.0.patch @@ -0,0 +1,48 @@ +From 8bb250fe2d2575e2eb8926b491849f47dd68e174 Mon Sep 17 00:00:00 2001 +From: Romain Beauxis +Date: Tue, 4 Jul 2023 12:04:11 -0500 +Subject: [PATCH] Adapt to new flac decoder API. + +--- + src/core/decoder/ogg_flac_duration.ml | 4 ++-- + tests/streams/dune | 5 +++++ + 2 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/src/core/decoder/ogg_flac_duration.ml b/src/core/decoder/ogg_flac_duration.ml +index 196456c676..36293a70c4 100644 +--- a/src/core/decoder/ogg_flac_duration.ml ++++ b/src/core/decoder/ogg_flac_duration.ml +@@ -44,8 +44,8 @@ let duration ~metadata:_ file = + let page = Ogg.Sync.read sync in + if Ogg.Page.serialno page = serial then Ogg.Stream.put_page os page + in +- let callbacks = Flac_ogg.Decoder.get_callbacks (fun _ -> ()) in +- let dec = Flac_ogg.Decoder.create packet os in ++ let callbacks = Flac_ogg.Decoder.get_callbacks os (fun _ -> ()) in ++ let dec = Flac.Decoder.create callbacks in + let rec info () = + try Flac.Decoder.init dec callbacks + with Ogg.Not_enough_data -> +diff --git a/tests/streams/dune b/tests/streams/dune +index 250c9158dc..95b518a68a 100644 +--- a/tests/streams/dune ++++ b/tests/streams/dune +@@ -173,6 +173,10 @@ + (rule + (alias citest) + (target playlist) ++ (deps ++ ./file1.mp3 ++ ./file2.mp3 ++ ./file3.mp3) + (action + (with-stdout-to + %{target} +@@ -181,6 +185,7 @@ + (rule + (alias citest) + (target huge_playlist) ++ (deps ./file1.mp3) + (action + (with-stdout-to + %{target} diff --git a/liquidsoap.spec b/liquidsoap.spec index c12585f..2a61125 100644 --- a/liquidsoap.spec +++ b/liquidsoap.spec @@ -1,17 +1,20 @@ +%define majver %(echo %version | cut -d. -f1-2) Name: liquidsoap -Version: 2.0.3 -Release: 3mamba +Version: 2.2.0 +Release: 1mamba Summary: Audio toolkit for streaming, aiming at complex Internet radio systems Group: Applications/Multimedia Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco -URL: http://savonet.sourceforge.net/ +URL: https://savonet.sourceforge.net/ Source0: https://github.com/savonet/liquidsoap.git/v%{version}/liquidsoap-%{version}.tar.bz2 Source1: liquidsoap.service Source2: liquidsoap.tmpfilesd +Patch0: liquidsoap-2.2.0-ocaml-flac-0.4.0.patch License: GPL, LGPL ## AUTOBUILDREQ-BEGIN +BuildRequires: dune BuildRequires: glibc-devel BuildRequires: libX11-devel BuildRequires: libalsa-devel @@ -27,9 +30,6 @@ BuildRequires: libfdk-aac-devel BuildRequires: libffi-devel BuildRequires: libflac-devel BuildRequires: libgcc -BuildRequires: libglib-devel -BuildRequires: libgst-plugins-base-devel -BuildRequires: libgstreamer-devel BuildRequires: libjack-devel BuildRequires: liblame-devel BuildRequires: liblilv-devel @@ -57,6 +57,12 @@ BuildRequires: libtag-devel BuildRequires: libtheora-devel BuildRequires: libvorbis-devel BuildRequires: libz-devel +BuildRequires: ocaml +BuildRequires: ocaml-gen-devel +BuildRequires: ocaml-menhir-devel +BuildRequires: ocaml-runtime +BuildRequires: ocaml-sedlex-devel +BuildRequires: ocaml-seq-devel ## AUTOBUILDREQ-END %ifnarch arm aarch64 BuildRequires: ghc-pandoc @@ -66,6 +72,7 @@ BuildRequires: ocaml >= 4.00.1 BuildRequires: ocaml-bjack-devel BuildRequires: ocaml-curl-devel BuildRequires: ocaml-dssi-devel +BuildRequires: ocaml-fileutils-devel BuildRequires: ocaml-findlib BuildRequires: ocaml-frei0r-devel BuildRequires: ocaml-dtools-devel @@ -83,11 +90,13 @@ BuildRequires: ocaml-lilv-devel BuildRequires: ocaml-lo-devel BuildRequires: ocaml-mad-devel BuildRequires: ocaml-magic-devel -BuildRequires: ocaml-menhir-devel <= 20211128 +BuildRequires: ocaml-menhir-devel +BuildRequires: ocaml-metadata-devel BuildRequires: ocaml-mm-devel BuildRequires: ocaml-opus-devel BuildRequires: ocaml-pcre-devel BuildRequires: ocaml-portaudio-devel +BuildRequires: ocaml-ppx_string BuildRequires: ocaml-samplerate-devel BuildRequires: ocaml-sdl-devel BuildRequires: ocaml-sedlex-devel @@ -96,6 +105,7 @@ BuildRequires: ocaml-soundtouch-devel BuildRequires: ocaml-speex-devel BuildRequires: ocaml-srt-devel BuildRequires: ocaml-taglib-devel +BuildRequires: ocaml-uri-devel BuildRequires: ocaml-voaacenc-devel BuildRequires: ocaml-vorbis-devel BuildRequires: ocaml-xmlm-devel @@ -107,6 +117,7 @@ BuildRequires: festival #BuildRequires: pygtk BuildRequires: sox BuildRequires: dejavu-fonts-ttf +BuildConflicts: ocaml-gstreamer Requires: festival Requires: sox Requires: vorbis-tools @@ -123,6 +134,7 @@ Requires: ocaml-duppy Requires: ocaml-faad #Requires: ocaml-fdkaac Requires: ocaml-ffmpeg +Requires: ocaml-fileutils Requires: ocaml-flac #Requires: ocaml-frei0r #Requires: ocaml-gavl @@ -136,10 +148,12 @@ Requires: ocaml-lastfm #Requires: ocaml-lo Requires: ocaml-mad #Requires: ocaml-magic -Requires: ocaml-menhir <= 20211128 +Requires: ocaml-menhir +Requires: ocaml-metadata Requires: ocaml-mm Requires: ocaml-ogg Requires: ocaml-opus +Requires: ocaml-ppx_string Requires: ocaml-pulseaudio Requires: ocaml-samplerate Requires: ocaml-sdl @@ -150,6 +164,7 @@ Requires: ocaml-speex Requires: ocaml-srt Requires: ocaml-taglib Requires: ocaml-theora +Requires: ocaml-uri Requires: ocaml-vorbis Requires: ocaml-xmlplaylist @@ -195,36 +210,21 @@ This package contains documentation in HTML format. %setup -q #-D -T #:<< _EOF -./bootstrap +%patch 0 -p1 -R -b .ocaml-flac-0.4.0 + +# Build error with old pandoc +rm -rf doc %build -#:<< _EOF -./configure \ - --prefix=%{_prefix} \ - --localstatedir=%{_localstatedir} \ - --sysconfdir=%{_sysconfdir} \ - --without-user --without-group \ - --with-bash-completion-dir="%{buildroot}%{_datadir}/bash-completion/completions" \ - --with-default-font=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf - -# -or- /usr/share/fonts/truetype/ttf-liberation/LiberationSans-Regular.ttf - -%make all - -# FIXME: requires updating ghc-pandoc -%make doc || true +dune build %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" -export OCAMLFIND_DESTDIR=%{buildroot}$(ocamlfind printconf destdir) -export INSTALL_DAEMON=no -install -d $OCAMLFIND_DESTDIR - -%makeinstall \ - prefix=%{buildroot}%{_prefix} \ - libdir=%{buildroot}%{_libdir} \ - sysconfdir=%{buildroot}%{_sysconfdir} +DESTDIR="%{buildroot}" dune install \ + --prefix "%{_prefix}" \ + --mandir "%{_mandir}" \ + --libdir "%{_libdir}/ocaml" # install the systemd service for liquidsoap # NOTE: the at sign in the service is what makes SystemD so interesting for liquidsoap. @@ -239,7 +239,7 @@ install -d %{buildroot}%{_localstatedir}/log/liquidsoap ## remove unpackaged file #rm -f %{buildroot}%{_sysconfdir}/liquidsoap/radio.liq.example -#rm -fr %{buildroot}%{_datadir}/doc +rm -rf %{buildroot}/usr/doc %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" @@ -264,84 +264,36 @@ fi %files %defattr(-,root,root) -%dir %{_sysconfdir}/liquidsoap -%{_sysconfdir}/liquidsoap/radio.liq.example -%{_sysconfdir}/logrotate.d/liquidsoap +#%dir %{_sysconfdir}/liquidsoap +#%{_sysconfdir}/liquidsoap/radio.liq.example +#%{_sysconfdir}/logrotate.d/liquidsoap %{_bindir}/liquidsoap -%dir %{_datadir}/liquidsoap -%dir %{_datadir}/liquidsoap/%{version} -%{_datadir}/liquidsoap/%{version}/* - -#%dir %{_libdir}/liquidsoap -#%dir %{_libdir}/liquidsoap/%{version} -#%{_libdir}/liquidsoap/%{version}/externals.liq -#%{_libdir}/liquidsoap/%{version}/extract-replaygain -#%{_libdir}/liquidsoap/%{version}/flows.liq -#%{_libdir}/liquidsoap/%{version}/gstreamer.liq -#%{_libdir}/liquidsoap/%{version}/http.liq -#%{_libdir}/liquidsoap/%{version}/http_codes.liq -#%{_libdir}/liquidsoap/%{version}/lastfm.liq -#%{_libdir}/liquidsoap/%{version}/liquidtts -#%{_libdir}/liquidsoap/%{version}/pervasives.liq -#%{_libdir}/liquidsoap/%{version}/shoutcast.liq -#%{_libdir}/liquidsoap/%{version}/utils.liq -#%{_libdir}/liquidsoap/%{version}/video.liq -##%{_libdir}/liquidsoap/%{version}/video_text.liq -## -#%dir %{_libdir}/liquidsoap/%{version}/plugins -#%{_libdir}/liquidsoap/%{version}/plugins/alsa.cmxs -#%{_libdir}/liquidsoap/%{version}/plugins/ao.cmxs -#%{_libdir}/liquidsoap/%{version}/plugins/cry.cmxs -#%{_libdir}/liquidsoap/%{version}/plugins/faad.cmxs -#%{_libdir}/liquidsoap/%{version}/plugins/ffmpeg.cmxs -#%{_libdir}/liquidsoap/%{version}/plugins/flac.cmxs -#%{_libdir}/liquidsoap/%{version}/plugins/flac_ogg.cmxs -#%{_libdir}/liquidsoap/%{version}/plugins/graphics.cmxs -#%{_libdir}/liquidsoap/%{version}/plugins/gstreamer.cmxs -#%{_libdir}/liquidsoap/%{version}/plugins/lame.cmxs -#%{_libdir}/liquidsoap/%{version}/plugins/mad.cmxs -#%{_libdir}/liquidsoap/%{version}/plugins/oss.cmxs -#%{_libdir}/liquidsoap/%{version}/plugins/samplerate.cmxs -#%{_libdir}/liquidsoap/%{version}/plugins/schroedinger.cmxs -#%{_libdir}/liquidsoap/%{version}/plugins/sdl.cmxs -#%{_libdir}/liquidsoap/%{version}/plugins/shine.cmxs -#%{_libdir}/liquidsoap/%{version}/plugins/speex.cmxs -#%{_libdir}/liquidsoap/%{version}/plugins/taglib.cmxs -#%{_libdir}/liquidsoap/%{version}/plugins/theora.cmxs -#%{_libdir}/liquidsoap/%{version}/plugins/voaacenc.cmxs -#%{_libdir}/liquidsoap/%{version}/plugins/vorbis.cmxs -#%{_libdir}/liquidsoap/%{version}/plugins/xmlplaylist.cmxs -## -%{_datadir}/bash-completion/completions/liquidsoap -%dir %{_datadir}/emacs/site-lisp/liquidsoap-mode -%{_datadir}/emacs/site-lisp/liquidsoap-mode/liquidsoap-mode.el +%dir %{_datadir}/liquidsoap-js +%{_datadir}/liquidsoap-js/* +%dir %{_datadir}/liquidsoap-lang +%{_datadir}/liquidsoap-lang/* +%dir %{_libdir}/ocaml/liquidsoap* +%{_libdir}/ocaml/liquidsoap*/* +%dir %{_libdir}/ocaml/prometheus-liquidsoap +%{_libdir}/ocaml/prometheus-liquidsoap/* +%dir %{_libdir}/ocaml/sdl-liquidsoap +%{_libdir}/ocaml/sdl-liquidsoap/* +%dir %{_libdir}/ocaml/tls-liquidsoap +%{_libdir}/ocaml/tls-liquidsoap/* +%{_datadir}/bash_completion/completions/liquidsoap +%{_datadir}/emacs/site-lisp/liquidsoap-*.el %{_unitdir}/%{name}@.service %{_tmpfilesdir}/%{name}.conf -%dir %attr(755,liquidsoap,liquidsoap) %{_localstatedir}/log/liquidsoap -%ifnarch arm aarch64 -%{_mandir}/man1/liquidsoap.* -%endif -%doc examples - -#%files -n liguidsoap -#%defattr(-,root,root) -#%{_bindir}/liguidsoap -#%dir %{python_sitearch}/liquidsoap -#%{python_sitearch}/liquidsoap/client.py -#%{python_sitearch}/liquidsoap/editable.py -#%{python_sitearch}/liquidsoap/liguidsoap.py -#%{python_sitearch}/liquidsoap/mix.py -#%{python_sitearch}/liquidsoap/output.py -#%{python_sitearch}/liquidsoap/playlist.py -#%{python_sitearch}/liquidsoap/queue.py -#%{python_sitearch}/liquidsoap/widgets.py -#%{_mandir}/man1/liguidsoap.* - -#%files docs -#%defattr(-,root,root) -#%doc doc/html +#%dir %attr(755,liquidsoap,liquidsoap) %{_localstatedir}/log/liquidsoap +#%ifnarch arm aarch64 +#%{_mandir}/man1/liquidsoap.* +#%endif +%doc COPYING %changelog +* Fri Jul 21 2023 Silvan Calarco 2.2.0-1mamba +- update to 2.2.0 + * Mon Mar 07 2022 Silvan Calarco 2.0.3-3mamba - added requirement for ocaml-srt