-------------------------------------------------------------------
+Mon Aug 10 17:07:09 CEST 2015 - ma@suse.com
+
+- Adapt to libzypp changes due to FATE#318778
+- 0.7.3
+
+-------------------------------------------------------------------
+Mon Jul 20 13:44:19 CEST 2015 - ma@suse.de
+
+- Don't expose resolver internals (due to FATE#318099)
+- 0.7.2
+
+-------------------------------------------------------------------
+Thu May 21 13:09:43 CEST 2015 - ma@suse.de
+
+- Fix test to run with ruby-2.2
+- 0.7.1
+
+-------------------------------------------------------------------
+Mon May 4 10:17:32 CEST 2015 - ma@suse.de
+
+- Adapt to libzypp-15.x (bnc#899755)
+- 0.7.0
+
+-------------------------------------------------------------------
+Thu Dec 18 11:28:55 CET 2014 - ma@suse.de
+
+- Enforce Python 2.7 libzypp-bindings is not yet ready for Python 3.
+- 0.6.4
+
+-------------------------------------------------------------------
+Fri Oct 17 11:22:13 CEST 2014 - ma@suse.de
+
+- Adapt to libzypp changes.
+- 0.6.3
+
+-------------------------------------------------------------------
Thu Aug 14 14:45:12 CEST 2014 - mls@suse.de
- work around syntax errors because of __attribute__
-#
+#
# spec file for package libzypp-bindings
#
-# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
-# This file and all modifications and additions to the pristine
-# package are under the same license as the package itself.
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
+# All modifications and additions to the file contributed by third parties
+# remain the property of their copyright owners, unless otherwise agreed
+# upon. The license for this file, and modifications and additions to the
+# file, is the same license as for the pristine package itself (unless the
+# license for the pristine package is not an Open Source License, in which
+# case the license is the MIT License). An "Open Source License" is a
+# 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/
-#
+#
+
+# nodebuginfo
+
Name: libzypp-bindings
-Version: 0.6.1
+Version: 0.7.3
Release: 0
License: GPL-2.0+
Summary: Bindings for libzypp
Group: Development/Sources
-Source: %{name}-%{version}.tar.gz
-Source1001: libzypp-bindings.manifest
-
-BuildRequires: cmake gcc-c++ python-devel
-BuildRequires: swig
-
-BuildRequires: libzypp-devel
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+BuildRequires: cmake
+BuildRequires: gcc-c++ >= 4.5
+BuildRequires: libzypp-devel >= 15.11.0
+BuildRequires: python-devel < 3
+#BuildRequires: ruby-devel
+BuildRequires: swig >= 2
+Source: %{name}-%{version}.tar.bz2
%description
This package provides bindings for libzypp, the library for package management.
%prep
%setup -q
-cp %{SOURCE1001} .
%build
mkdir build
cd build
-%cmake -DCMAKE_INSTALL_PREFIX=%{prefix} \
- -DPYTHON_SITEDIR=%{python_sitearch} \
+cmake -DCMAKE_INSTALL_PREFIX=%{prefix} \
+ -DPYTHON_SITEDIR=%{py_sitedir} \
-DLIB=%{_lib} \
-DCMAKE_VERBOSE_MAKEFILE=TRUE \
-DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags}" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_SKIP_RPATH=1 \
..
+# the swig compile jobs take a lot of memory, so don't use jobs here
make -j1
+%check
+cd build
+make test
+
%install
cd build
make install DESTDIR=$RPM_BUILD_ROOT
%clean
+%{__rm} -rf %{buildroot}
+
+#%package -n ruby-zypp
+#Summary: Ruby bindings for libzypp
+#Group: Development/Languages/Ruby
+#
+#%description -n ruby-zypp
+#-
+#
+#%files -n ruby-zypp
+#%defattr(-,root,root,-)
+#%if 0%{?suse_version}
+#%{_libdir}/ruby/vendor_ruby/%{rb_ver}/%{rb_arch}/zypp.so
+#%endif
+#%if 0%{?mandriva_version}
+#%{ruby_sitearchdir}/zypp.so
+#%endif
%package -n python-zypp
Summary: Python bindings for libzypp
Group: Development/Languages/Python
-Requires: libzypp
-
%description -n python-zypp
-Python bindings of libzypp
-
+-
%files -n python-zypp
-%manifest %{name}.manifest
%defattr(-,root,root,-)
-%{python_sitearch}/_zypp.so
-%{python_sitearch}/zypp.py*
+%{py_sitedir}/_zypp.so
+%{py_sitedir}/zypp.py
+
+%package -n perl-zypp
+Requires: perl = %{perl_version}
+Summary: Perl bindings for libzypp
+Group: Development/Languages/Perl
+
+%description -n perl-zypp
+-
+
+%files -n perl-zypp
+%defattr(-,root,root,-)
+%{perl_vendorlib}/zypp.pm
+%{perl_vendorarch}/zypp.so
+
+%changelog
# Let's see which target languages are available
#
-FIND_PACKAGE(Ruby)
-FIND_PACKAGE(PythonLibs)
-FIND_PACKAGE(Perl)
-
-
-IF (RUBY_LIBRARY AND RUBY_INCLUDE_PATH)
- ADD_SUBDIRECTORY(ruby)
-ENDIF(RUBY_LIBRARY AND RUBY_INCLUDE_PATH)
-
-IF (PYTHON_LIBRARY)
- ADD_SUBDIRECTORY(python)
-ENDIF(PYTHON_LIBRARY)
-
-#IF (PERL_EXECUTABLE)
-# ADD_SUBDIRECTORY(perl5)
-#ENDIF (PERL_EXECUTABLE)
+IF(BUILD_RUBY_BINDINGS)
+ FIND_PACKAGE(Ruby)
+ IF(RUBY_LIBRARY AND RUBY_INCLUDE_PATH)
+ ADD_SUBDIRECTORY(ruby)
+ ENDIF()
+ENDIF()
+
+IF(BUILD_PYTHON2_BINDINGS)
+ # Enforce Python 2.7, libzypp-bindings does not yet work with Python3
+ set(PythonLibs_FIND_VERSION 2.7)
+ set(PythonLibs_FIND_VERSION_MAJOR 2)
+ FIND_PACKAGE(PythonLibs)
+ IF(PYTHON_LIBRARY)
+ ADD_SUBDIRECTORY(python)
+ ENDIF()
+ENDIF()
+
+IF(BUILD_PERL5_BINDINGS)
+ FIND_PACKAGE(Perl)
+ IF(PERL_EXECUTABLE)
+ ADD_SUBDIRECTORY(perl5)
+ ENDIF()
+ENDIF()