diff --git a/csound.spec b/csound.spec index 58a6738..584007c 100644 --- a/csound.spec +++ b/csound.spec @@ -19,6 +19,13 @@ %define py3version %(pkg-config python3 --modversion) %define support_fltk 1 %bcond_with python + +%if 0%{?suse_version} > 1500 +%bcond_without java +%else +%bcond_with java +%endif + %define maj 6 %define min 0 @@ -47,7 +54,9 @@ BuildRequires: fluidsynth-devel BuildRequires: gcc-c++ BuildRequires: gcc-c++ BuildRequires: jack-devel +%if %{with java} BuildRequires: java-devel-openjdk +%endif BuildRequires: libboost_atomic-devel BuildRequires: libboost_filesystem-devel BuildRequires: libboost_locale-devel @@ -90,12 +99,14 @@ Group: System/Libraries %description -n libcsound64-%{maj}_%{min} Library for csound use +%if %{with java} %package java-bindings Summary: Csound6 library Group: System/Libraries %description java-bindings -Library for csound use +Java bindings for csound use +%endif %package plugins Summary: Plugins @@ -105,14 +116,14 @@ Group: Productivity/Multimedia/Other Plugins for csound %package devel -Summary: Development files for Csound, a sound synthesis program +Summary: Development files for Csound Group: Development/Libraries/C and C++ Requires: lib_jcsound6 = %{version} Requires: libcsnd6-%{maj}_%{min} = %{version} Requires: libcsound64-%{maj}_%{min} = %{version} %description devel -Development files for Csound. +Development files for Csound, a sound synthesis program. %lang_package @@ -161,8 +172,10 @@ rm -rf %{buildroot}root %post -n libcsound64-%{maj}_%{min} -p /sbin/ldconfig %postun -n libcsound64-%{maj}_%{min} -p /sbin/ldconfig +%if %{with java} %post java-bindings -p /sbin/ldconfig %postun java-bindings -p /sbin/ldconfig +%endif %files %doc AUTHORS README.md README.SUSE Release_Notes @@ -175,9 +188,11 @@ rm -rf %{buildroot}root %files -n libcsound64-%{maj}_%{min} %{_libdir}/libcsound64.so.%{maj}.%{min} +%if %{with java} %files java-bindings %{_libdir}/lib_jcsound6.so %{_libdir}/csnd6.jar +%endif %files plugins %{_libdir}/csound/ @@ -189,6 +204,8 @@ rm -rf %{buildroot}root %files lang -f %{name}%{maj}.lang %defattr(-,root,root) + +# TODO: %if 1 == 0 -- Installing: /data/packages/BUILDROOT/csound-6.12.2-0.x86_64/root/.local/lib/python2.7/site-packages/_csnd6.so -- Installing: /data/packages/BUILDROOT/csound-6.12.2-0.x86_64/root/.local/lib/python2.7/site-packages/csnd6.py