Hello community, here is the log from the commit of package pocketsphinx for openSUSE:Factory checked in at 2019-02-26 22:20:49 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/pocketsphinx (Old) and /work/SRC/openSUSE:Factory/.pocketsphinx.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "pocketsphinx" Tue Feb 26 22:20:49 2019 rev:2 rq:679059 version:0.8 Changes: -------- --- /work/SRC/openSUSE:Factory/pocketsphinx/pocketsphinx.changes 2018-08-31 10:42:17.487049528 +0200 +++ /work/SRC/openSUSE:Factory/.pocketsphinx.new.28833/pocketsphinx.changes 2019-02-26 22:22:18.026068300 +0100 @@ -1,0 +2,6 @@ +Sat Feb 23 12:38:37 UTC 2019 - [email protected] + +- Use alternatives for binaries to make possible to have it coinstalled + with pocketsphinx5 5prealpha + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ pocketsphinx.spec ++++++ --- /var/tmp/diff_new_pack.JslKEE/_old 2019-02-26 22:22:18.802068025 +0100 +++ /var/tmp/diff_new_pack.JslKEE/_new 2019-02-26 22:22:18.802068025 +0100 @@ -1,7 +1,7 @@ # # spec file for package pocketsphinx # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 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 @@ -12,7 +12,7 @@ # 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/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -35,10 +35,12 @@ BuildRequires: fdupes BuildRequires: gstreamer-devel BuildRequires: pkgconfig +BuildRequires: python-Cython BuildRequires: python-devel BuildRequires: python-gtk-devel -BuildRequires: python-Cython BuildRequires: sphinxbase-devel +Requires(post): update-alternatives +Requires(postun): update-alternatives %description Pocketsphinx is a version of the open-source CMU Sphinx II speech @@ -94,14 +96,39 @@ %fdupes %{buildroot} find %{buildroot} -type f -name "*.la" -delete -print +# Prepare for alternatives +mkdir -p %{buildroot}%{_sysconfdir}/alternatives +for binary in pocketsphinx_batch pocketsphinx_continuous pocketsphinx_mdef_convert ; do + mv %{buildroot}%{_bindir}/$binary %{buildroot}%{_bindir}/$binary-%{version} + ln -s %{_sysconfdir}/alternatives/$binary %{buildroot}%{_bindir}/$binary +done + +%post +update-alternatives --install %{_bindir}/pocketsphinx_batch pocketsphinx_batch %{_bindir}/pocketsphinx_batch-%{version} 10 \ + --slave %{_bindir}/pocketsphinx_continuous pocketsphinx_continuous %{_bindir}/pocketsphinx_continuous-%{version} \ + --slave %{_bindir}/pocketsphinx_mdef_convert pocketsphinx_mdef_convert %{_bindir}/pocketsphinx_mdef_convert-%{version} + +%postun +if [ ! -f %{_bindir}/pocketsphinx_batch ]; then + update-alternatives --remove pocketsphinx_batch %{_bindir}/pocketsphinx_batch-%{version} +fi + %post -n libpocketsphinx1 -p /sbin/ldconfig %postun -n libpocketsphinx1 -p /sbin/ldconfig %files %doc AUTHORS ChangeLog README %license COPYING -%{_bindir}/pocketsphinx_* -%{_datadir}/%{name}/ +%ghost %{_sysconfdir}/alternatives/pocketsphinx_batch +%ghost %{_sysconfdir}/alternatives/pocketsphinx_continuous +%ghost %{_sysconfdir}/alternatives/pocketsphinx_mdef_convert +%{_bindir}/pocketsphinx_batch* +%{_bindir}/pocketsphinx_continuous* +%{_bindir}/pocketsphinx_mdef_convert* +%dir %{_datadir}/%{name} +%dir %{_datadir}/%{name}/model +%{_datadir}/%{name}/model/hmm +%{_datadir}/%{name}/model/lm %{_mandir}/man1/*%{ext_man} %files -n libpocketsphinx1
