[libyui-bindings] new upstream version build a Python3 version minor improvents on spec
Björn Esser
besser82 at fedoraproject.org
Fri May 23 21:13:18 UTC 2014
commit 915d6d9fb568251666822529a44e36bb715970ee
Author: Björn Esser <bjoern.esser at gmail.com>
Date: Fri May 23 23:12:40 2014 +0200
new upstream version
build a Python3 version
minor improvents on spec
libyui-bindings.spec | 130 ++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 101 insertions(+), 29 deletions(-)
---
diff --git a/libyui-bindings.spec b/libyui-bindings.spec
index 146149f..3ece516 100644
--- a/libyui-bindings.spec
+++ b/libyui-bindings.spec
@@ -1,20 +1,21 @@
+%if 0%{?fedora} >= 13 || 0%{?rhel} >= 8
+%global with_py3 1
+%endif #0%{?fedora} >= 13 || 0%{?rhel} >= 8
+
%global libsuffix yui
%global libname lib%{libsuffix}
Name: %{libname}-bindings
-Version: 1.0.2
-Release: 11%{?dist}
+Version: 1.0.4
+Release: 0.1%{?dist}
Summary: Language bindings for %{libname}
License: LGPLv2 or LGPLv3
URL: https://github.com/%{libname}/%{name}
Source0: %{url}/archive/%{name}/master/%{version}.tar.gz#/%{name}-%{version}.tar.gz
-BuildRequires: cmake
+BuildRequires: cmake >= 2.8
BuildRequires: %{libname}-devel
-BuildRequires: perl-devel
-BuildRequires: python-devel
-BuildRequires: ruby-devel
BuildRequires: swig
%description
@@ -24,11 +25,14 @@ An User Interface engine that provides abstraction from graphical user
interfaces (Qt, Gtk) and text based user interfaces (ncurses).
-%package -n ruby-%{libsuffix}
-Summary: Ruby bindings for %{libname}
+%package -n perl-%{libsuffix}
+Summary: Perl bindings for %{libname}
-%description -n ruby-%{libsuffix}
-This package provides Ruby language bindings to access functions of
+BuildRequires: perl-devel
+Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
+
+%description -n perl-%{libsuffix}
+This package provides Perl language bindings to access functions of
%{libname} - An User Interface engine that provides the abstraction
from graphical user interfaces (Qt, Gtk) and text based user
interfaces (ncurses).
@@ -36,7 +40,7 @@ interfaces (ncurses).
%package -n python-%{libsuffix}
Summary: Python bindings for %{libname}
-Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
+BuildRequires: python2-devel
%description -n python-%{libsuffix}
This package provides Python language bindings to access functions of
@@ -45,11 +49,36 @@ from graphical user interfaces (Qt, Gtk) and text based user
interfaces (ncurses).
-%package -n perl-%{libsuffix}
-Summary: Perl bindings for %{libname}
+%if 0%{?with_py3}
+%package -n python3-%{libsuffix}
+Summary: Python3 bindings for %{libname}
+BuildRequires: python3-devel
-%description -n perl-%{libsuffix}
-This package provides Perl language bindings to access functions of
+%description -n python3-%{libsuffix}
+This package provides Python3 language bindings to access functions of
+%{libname} - An User Interface engine that provides the abstraction
+from graphical user interfaces (Qt, Gtk) and text based user
+interfaces (ncurses).
+%endif #0%{?with_py3}
+
+
+%package -n ruby-%{libsuffix}
+Summary: Ruby bindings for %{libname}
+
+BuildRequires: ruby-devel
+
+%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
+Requires: ruby(release)
+%else #0%{?fedora} >= 19 || 0%{?rhel} >= 7
+%if (0%{?fedora} && 0%{?fedora} <= 16) || (0%{?rhel} >= 4 && 0%{?rhel} <= 6)
+Requires: ruby(abi) == 1.8
+%else #(0%{?fedora} && 0%{?fedora} <= 16) || (0%{?rhel} >= 4 && 0%{?rhel} <= 6)
+Requires: ruby(abi) == 1.9.1
+%endif #(0%{?fedora} && 0%{?fedora} <= 16) || (0%{?rhel} >= 4 && 0%{?rhel} <= 6)
+%endif #0%{?fedora} >= 19 || 0%{?rhel} >= 7
+
+%description -n ruby-%{libsuffix}
+This package provides Ruby language bindings to access functions of
%{libname} - An User Interface engine that provides the abstraction
from graphical user interfaces (Qt, Gtk) and text based user
interfaces (ncurses).
@@ -57,43 +86,86 @@ interfaces (ncurses).
%prep
%setup -q -n %{name}-%{name}-master-%{version}
-ln -f package/%{libname}-bindings.changes ChangeLog
+cp -a package/%{libname}-bindings.changes ChangeLog
+%if 0%{?with_py3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+%endif #0%{?with_py3}
%build
mkdir -p build
-cd build
-%cmake .. \
- -DLIB=%{_libdir} \
- -DPYTHON_SITEDIR=%{python2_sitearch} \
- -DCMAKE_BUILD_TYPE=RELEASE \
- -DBUILD_RUBY_GEM=no
+pushd build
+%cmake \
+ -DLIB=%{_libdir} \
+ -DPython_ADDITIONAL_VERSIONS=%{python2_version} \
+ -DPYTHON_EXECUTABLE=%{__python2} \
+ -DPYTHON_SITEDIR=%{python2_sitearch} \
+ -DCMAKE_BUILD_TYPE=RELEASE \
+ -DBUILD_RUBY_GEM=no \
+ ..
+
+make %{?_smp_mflags}
+popd
+
+%if 0%{?with_py3}
+pushd %{py3dir}
+mkdir -p build
+pushd build
+%cmake \
+ -DLIB=%{_libdir} \
+ -DPython_ADDITIONAL_VERSIONS=%{python3_version} \
+ -DPYTHON_EXECUTABLE=%{__python3} \
+ -DPYTHON_SITEDIR=%{python3_sitearch} \
+ -DCMAKE_BUILD_TYPE=RELEASE \
+ -DBUILD_RUBY_GEM=no \
+ ..
+
make %{?_smp_mflags}
+popd
+%endif #0%{?with_py3}
%install
-cd build
+pushd build
+%make_install
+popd
+
+%if 0%{?with_py3}
+pushd %{py3dir}
+pushd build
%make_install
+popd
+%endif #0%{?with_py3}
%files -n perl-%{libsuffix}
-%doc swig/perl/examples
-%doc COPYING* ChangeLog
+%doc ChangeLog COPYING* README swig/perl/examples
%{perl_vendorarch}/%{libsuffix}.so
%{perl_vendorlib}/%{libsuffix}.pm
%files -n python-%{libsuffix}
-%doc swig/python/examples
-%doc COPYING* ChangeLog
+%doc ChangeLog COPYING* README swig/python/examples
%{python2_sitearch}/*%{libsuffix}.*
+%if 0%{?with_py3}
+%files -n python3-%{libsuffix}
+%doc ChangeLog COPYING* README swig/python/examples
+%{python3_sitearch}/__pycache__/*
+%{python3_sitearch}/*%{libsuffix}.*
+%endif #0%{?with_py3}
+
%files -n ruby-%{libsuffix}
-%doc swig/ruby/examples
-%doc COPYING* ChangeLog
+%doc ChangeLog COPYING* README swig/ruby/examples
%{ruby_vendorarchdir}/_%{libsuffix}.*
%changelog
+* Fri May 23 2014 Björn Esser <bjoern.esser at gmail.com> - 1.0.4-1
+- new upstream version
+- build a Python3 version
+- minor improvents on spec
+
* Thu Apr 24 2014 Vít Ondruch <vondruch at redhat.com> - 1.0.2-11
- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.1
More information about the scm-commits
mailing list