Hello community,

here is the log from the commit of package sphinxbase for openSUSE:Factory 
checked in at 2019-02-26 22:20:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/sphinxbase (Old)
 and      /work/SRC/openSUSE:Factory/.sphinxbase.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "sphinxbase"

Tue Feb 26 22:20:47 2019 rev:2 rq:679058 version:0.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/sphinxbase/sphinxbase.changes    2018-08-31 
10:41:32.702997238 +0200
+++ /work/SRC/openSUSE:Factory/.sphinxbase.new.28833/sphinxbase.changes 
2019-02-26 22:22:17.294068560 +0100
@@ -1,0 +2,6 @@
+Sat Feb 23 12:36:39 UTC 2019 - [email protected]
+
+- Use alternatives for some binaries to make it possible to have the package
+  coinstallable with sphinxbase5 5prealpha
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ sphinxbase.spec ++++++
--- /var/tmp/diff_new_pack.5aL0pV/_old  2019-02-26 22:22:17.898068346 +0100
+++ /var/tmp/diff_new_pack.5aL0pV/_new  2019-02-26 22:22:17.902068344 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package sphinxbase
 #
-# 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,14 +12,15 @@
 # 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/
 #
 
+
 Name:           sphinxbase
 Version:        0.8
 Release:        0
 Summary:        Support library required by Pocketsphinx
-License:        BSD-2-Clause and MIT
+License:        BSD-2-Clause AND MIT
 Group:          Productivity/Office/Other
 Url:            http://cmusphinx.sourceforge.net/wiki/download/
 Source:         
http://downloads.sourceforge.net/project/cmusphinx/%{name}/%{version}/%{name}-%{version}.tar.gz
@@ -37,14 +38,16 @@
 BuildRequires:  fdupes
 BuildRequires:  libsndfile-devel
 BuildRequires:  pkgconfig
-BuildRequires:  python-devel
 BuildRequires:  python-Cython
+BuildRequires:  python-devel
 BuildRequires:  python-rpm-macros
 %if 0%{?suse_version} <= 1210
 BuildRequires:  liblapack3
 %else
 BuildRequires:  lapack-devel
 %endif
+Requires(post): update-alternatives
+Requires(postun): update-alternatives
 
 %description
 CMU Sphinx toolkit is a speech recognition tool and has a number of packages 
for
@@ -102,13 +105,48 @@
 find %{buildroot} -type f -name "*.la" -delete -print
 %fdupes %{buildroot}
 
+# Prepare for alternatives
+mkdir -p %{buildroot}%{_sysconfdir}/alternatives
+for binary in sphinx_cepview sphinx_fe sphinx_jsgf2fsg sphinx_lm_convert \
+              sphinx_lm_eval sphinx_pitch ; do
+    mv %{buildroot}%{_bindir}/$binary %{buildroot}%{_bindir}/$binary-%{version}
+    ln -s %{_sysconfdir}/alternatives/$binary %{buildroot}%{_bindir}/$binary
+done
+
+%post
+update-alternatives --install %{_bindir}/sphinx_pitch sphinx_pitch 
%{_bindir}/sphinx_pitch-%{version} 10 \
+  --slave %{_bindir}/sphinx_cepview sphinx_cepview 
%{_bindir}/sphinx_cepview-%{version} \
+  --slave %{_bindir}/sphinx_fe sphinx_fe %{_bindir}/sphinx_fe-%{version} \
+  --slave %{_bindir}/sphinx_jsgf2fsg sphinx_jsgf2fsg 
%{_bindir}/sphinx_jsgf2fsg-%{version} \
+  --slave %{_bindir}/sphinx_lm_convert sphinx_lm_convert 
%{_bindir}/sphinx_lm_convert-%{version} \
+  --slave %{_bindir}/sphinx_lm_eval sphinx_lm_eval 
%{_bindir}/sphinx_lm_eval-%{version}
+
+%postun
+if [ ! -f %{_bindir}/sphinx_pitch ]; then
+    update-alternatives --remove sphinx_pitch 
%{_bindir}/sphinx_pitch-%{version}
+fi
+
 %post   -n libsphinxbase1 -p /sbin/ldconfig
 %postun -n libsphinxbase1 -p /sbin/ldconfig
 
 %files
 %doc AUTHORS ChangeLog README NEWS
 %license COPYING
-%{_bindir}/sphinx_*
+%ghost %{_sysconfdir}/alternatives/sphinx_cepview
+%ghost %{_sysconfdir}/alternatives/sphinx_fe
+%ghost %{_sysconfdir}/alternatives/sphinx_jsgf2fsg
+%ghost %{_sysconfdir}/alternatives/sphinx_lm_convert
+%ghost %{_sysconfdir}/alternatives/sphinx_lm_eval
+%ghost %{_sysconfdir}/alternatives/sphinx_pitch
+%{_bindir}/sphinx_cepview*
+%{_bindir}/sphinx_fe*
+%{_bindir}/sphinx_jsgf2fsg*
+%{_bindir}/sphinx_lm_convert*
+%{_bindir}/sphinx_lm_eval*
+%{_bindir}/sphinx_pitch*
+%{_bindir}/sphinx_cont_adseg
+%{_bindir}/sphinx_cont_fileseg
+%{_bindir}/sphinx_lm_sort
 
 %files -n libsphinxbase1
 %{_libdir}/*.so.*


Reply via email to