File libzypp-bindings.spec of Package libzypp-bindings.486

# spec file for package libzypp-bindings
# Copyright (c) 2015 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
# nodebuginfo

Name:           libzypp-bindings
Version:        0.6.4
Release:        0
Summary:        Bindings for libzypp
License:        GPL-2.0+
Group:          Development/Sources
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  cmake
BuildRequires:  gcc-c++ >= 4.5
BuildRequires:  libzypp-devel >= 14.30.0
BuildRequires:  python-devel < 3
BuildRequires:  ruby-devel
BuildRequires:  swig >= 1.3.40
Source:         %{name}-%{version}.tar.bz2

This package provides bindings for libzypp, the library for package management.

%setup -q

mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=%{prefix} \
      -DPYTHON_SITEDIR=%{py_sitedir} \
      -DLIB=%{_lib} \
      -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags}" \
      -DCMAKE_CXX_FLAGS_RELEASE:STRING="%{optflags}" \
      -DCMAKE_BUILD_TYPE=Release \
# the swig compile jobs take a lot of memory, so don't use jobs here
make -j1

cd build
make test

cd build

%{__rm} -rf %{buildroot}

%package -n ruby-zypp
Summary:        Ruby bindings for libzypp
Group:          Development/Languages/Ruby

%description -n ruby-zypp

%files -n ruby-zypp
%if 0%{?suse_version}
%if 0%{?mandriva_version}

%package -n python-zypp
Summary:        Python bindings for libzypp
Group:          Development/Languages/Python

%description -n python-zypp

%files -n python-zypp

%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

openSUSE Build Service is sponsored by