[libyui-bindings] new upstream release rebuilt for libyui-3.1.5 keep doc-files in unfied %%{_pkgdocdir} small improvem

Björn Esser besser82 at fedoraproject.org
Tue Jan 20 18:33:58 UTC 2015


commit ec9492dbce0ede03363a46a7f558507dd04098de
Author: Björn Esser <bjoern.esser at gmail.com>
Date:   Tue Jan 20 18:59:22 2015 +0100

    new upstream release
    rebuilt for libyui-3.1.5
    keep doc-files in unfied %%{_pkgdocdir}
    small improvements to spec-file
    drop Patch0, now in upstream sources

 libyui-bindings-1.0.4-ruby22-rbconfig.patch |   24 ----
 libyui-bindings.spec                        |  165 ++++++++++++++++++++-------
 sources                                     |    2 +-
 3 files changed, 125 insertions(+), 66 deletions(-)
---
diff --git a/libyui-bindings.spec b/libyui-bindings.spec
index fde79bc..55cf93c 100644
--- a/libyui-bindings.spec
+++ b/libyui-bindings.spec
@@ -1,32 +1,57 @@
+# Define libsuffix.
+%global libsuffix yui
+%global libname lib%{libsuffix}
+
+# Do we build with Mono?
+%ifarch %{mono_arches}
+%global with_mono 1
+%endif # arch %%{mono_arches}
+
+# Do we build with Python3?
 %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}
+# Setup _pkgdocdir if not defined already.
+%{!?_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}}
+
+# CMake-builds go out-of-tree.
+%global _cmake_build_subdir build-%{?_arch}%{?dist}
 
 Name:		%{libname}-bindings
-Version:	1.0.4
-Release:	5%{?dist}
+Version:	1.1.0
+Release:	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
-# Remove obsolete Config:: usage
-Patch0:	libyui-bindings-1.0.4-ruby22-rbconfig.patch
 
 BuildRequires:	cmake			>= 2.8
 BuildRequires:	%{libname}-devel
 BuildRequires:	swig
 
 %description
-This package provides Perl, Python and Ruby language bindings to access
-functions of %{libname}.
+This package provides Mono / CSharp, Perl, Python and Ruby language
+bindings to access functions of %{libname}.
 An User Interface engine that provides abstraction from graphical user
 interfaces (Qt, Gtk) and text based user interfaces (ncurses).
 
 
+%if 0%{?with_mono}
+%package -n mono-%{libsuffix}
+Summary:	Mono / CSharp bindings for %{libname}
+BuildRequires:	mono-devel
+
+%description -n mono-%{libsuffix}
+This package provides Mono / CSharp 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_mono}
+
+
 %package -n perl-%{libsuffix}
 Summary:	Perl bindings for %{libname}
 
@@ -34,9 +59,10 @@ 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
+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).
 
 
@@ -45,9 +71,10 @@ Summary:	Python bindings for %{libname}
 BuildRequires:	python2-devel
 
 %description -n python-%{libsuffix}
-This package provides Python 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
+This package provides Python 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,9 +84,10 @@ Summary:	Python3 bindings for %{libname}
 BuildRequires:	python3-devel
 
 %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
+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}
 
@@ -80,41 +108,43 @@ Requires:	ruby(abi)		== 1.9.1
 %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
+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).
 
 
 %prep
 %setup -q -n %{name}-%{name}-master-%{version}
-%patch0 -p1
-cp -a package/%{libname}-bindings.changes ChangeLog
-
-%if 0%{?with_py3}
-rm -rf %{py3dir}
-cp -a . %{py3dir}
-%endif #0%{?with_py3}
+%{__cp} -a package/%{libname}-bindings.changes ChangeLog
+%if (0%{?fedora} && 0%{?fedora} <= 21) || (0%{?rhel} && 0%{?rhel} <= 7)
+%{__sed} -i -e '/CMP0046/d' CMakeLists.txt
+%endif # (0%%{?fedora} && 0%%{?fedora} <= 21) || (0%%{?rhel} && 0%%{?rhel} <= 7)
 
 %build
-mkdir -p build
-pushd build
+%{__mkdir} -p %{_cmake_build_subdir}
+pushd %{_cmake_build_subdir}
 %cmake							\
 	-DLIB=%{_libdir}				\
+	-DMONO_LIBRARIES=%{_libdir}			\
 	-DPython_ADDITIONAL_VERSIONS=%{python2_version}	\
 	-DPYTHON_EXECUTABLE=%{__python2}		\
 	-DPYTHON_SITEDIR=%{python2_sitearch}		\
 	-DCMAKE_BUILD_TYPE=RELEASE			\
 	-DBUILD_RUBY_GEM=no				\
+	-DWITH_MONO=%{?with_mono:ON}%{!?with_mono:OFF}	\
+	-DWITH_PERL=ON					\
+	-DWITH_PYTHON=ON				\
+	-DWITH_RUBY=ON					\
 	..
 
-make %{?_smp_mflags}
+%{__make} %{?_smp_mflags}
 popd
 
 %if 0%{?with_py3}
-pushd %{py3dir}
-mkdir -p build
-pushd build
+%{__mkdir} -p py3-%{_cmake_build_subdir}
+pushd py3-%{_cmake_build_subdir}
 %cmake							\
 	-DLIB=%{_libdir}				\
 	-DPython_ADDITIONAL_VERSIONS=%{python3_version}	\
@@ -122,48 +152,101 @@ pushd build
 	-DPYTHON_SITEDIR=%{python3_sitearch}		\
 	-DCMAKE_BUILD_TYPE=RELEASE			\
 	-DBUILD_RUBY_GEM=no				\
+	-DWITH_MONO=OFF					\
+	-DWITH_PERL=OFF					\
+	-DWITH_PYTHON=ON				\
+	-DWITH_RUBY=OFF					\
 	..
 
-make %{?_smp_mflags}
+%{__make} %{?_smp_mflags}
 popd
 %endif #0%{?with_py3}
 
 
 %install
-pushd build
+pushd %{_cmake_build_subdir}
 %make_install
+
+# Install documentation.
+%{__mkdir} -p	%{buildroot}%{?_pkgdocdir}/mono		\
+		%{buildroot}%{?_pkgdocdir}/perl		\
+		%{buildroot}%{?_pkgdocdir}/python	\
+		%{buildroot}%{?_pkgdocdir}/ruby
+%{__cp} -a	../ChangeLog ../COPYING* ../README	\
+		%{buildroot}%{?_pkgdocdir}
+%if 0%{?with_mono}
+%{__cp} -a	swig/mono/*.cs				\
+		%{buildroot}%{?_pkgdocdir}/mono
+%endif # 0%%{?with_mono}
+%{__cp} -a	../swig/perl/examples/*			\
+		%{buildroot}%{?_pkgdocdir}/perl
+%{__cp} -a	../swig/python/examples/*		\
+		%{buildroot}%{?_pkgdocdir}/python
+%{__cp} -a	../swig/ruby/examples/*			\
+		%{buildroot}%{?_pkgdocdir}/ruby
 popd
 
 %if 0%{?with_py3}
-pushd %{py3dir}
-pushd build
+pushd py3-%{_cmake_build_subdir}
 %make_install
 popd
 %endif #0%{?with_py3}
 
 
+%files -n mono-%{libsuffix}
+%doc %dir %{?_pkgdocdir}
+%doc %{?_pkgdocdir}/ChangeLog
+%doc %{?_pkgdocdir}/COPYING*
+%doc %{?_pkgdocdir}/mono
+%doc %{?_pkgdocdir}/README
+%{_libdir}/%{libsuffix}/%{libsuffix}.dll
+%{_libdir}/%{libsuffix}/%{libsuffix}.so
+
 %files -n perl-%{libsuffix}
-%doc ChangeLog COPYING* README swig/perl/examples
+%doc %dir %{?_pkgdocdir}
+%doc %{?_pkgdocdir}/ChangeLog
+%doc %{?_pkgdocdir}/COPYING*
+%doc %{?_pkgdocdir}/perl
+%doc %{?_pkgdocdir}/README
 %{perl_vendorarch}/%{libsuffix}.so
 %{perl_vendorlib}/%{libsuffix}.pm
 
 %files -n python-%{libsuffix}
-%doc ChangeLog COPYING* README swig/python/examples
+%doc %dir %{?_pkgdocdir}
+%doc %{?_pkgdocdir}/ChangeLog
+%doc %{?_pkgdocdir}/COPYING*
+%doc %{?_pkgdocdir}/python
+%doc %{?_pkgdocdir}/README
 %{python2_sitearch}/*%{libsuffix}.*
 
 %if 0%{?with_py3}
 %files -n python3-%{libsuffix}
-%doc ChangeLog COPYING* README swig/python/examples
+%doc %dir %{?_pkgdocdir}
+%doc %{?_pkgdocdir}/ChangeLog
+%doc %{?_pkgdocdir}/COPYING*
+%doc %{?_pkgdocdir}/python
+%doc %{?_pkgdocdir}/README
 %{python3_sitearch}/__pycache__/*
 %{python3_sitearch}/*%{libsuffix}.*
 %endif #0%{?with_py3}
 
 %files -n ruby-%{libsuffix}
-%doc ChangeLog COPYING* README swig/ruby/examples
+%doc %dir %{?_pkgdocdir}
+%doc %{?_pkgdocdir}/ChangeLog
+%doc %{?_pkgdocdir}/COPYING*
+%doc %{?_pkgdocdir}/README
+%doc %{?_pkgdocdir}/ruby
 %{ruby_vendorarchdir}/_%{libsuffix}.*
 
 
 %changelog
+* Tue Jan 20 2015 Björn Esser <bjoern.esser at gmail.com> - 1.1.0-1
+- new upstream release
+- rebuilt for libyui-3.1.5
+- keep doc-files in unfied %%{_pkgdocdir}
+- small improvements to spec-file
+- drop Patch0, now in upstream sources
+
 * Sun Jan 18 2015 Mamoru TASAKA <mtasaka at fedoraproject.org> - 0.5.0-6
 - Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_2.2
 - Remove deprecated Config: usage
diff --git a/sources b/sources
index efab370..d31341c 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-0b99acff209514530ca288fcf7cf64ba  libyui-bindings-1.0.4.tar.gz
+8c38fb0ff948cc42f54f3780c843f613  libyui-bindings-1.1.0.tar.gz


More information about the scm-commits mailing list