File libsatsolver.spec of Package libsatsolver
#
# spec file for package libsatsolver (Version 0.13.13)
#
# Copyright (c) 2010 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/
#
Name: libsatsolver
Version: 0.13.13
Release: 0.<RELEASE1>
License: BSD 3-Clause
Url: http://svn.opensuse.org/svn/zypp/trunk/sat-solver
Source: satsolver-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Group: Development/Libraries/C and C++
Prefix: /usr
BuildRequires: doxygen
%if 0%{?mandriva_version}
# force this version on mandriva
BuildRequires: libneon0.26-devel
%endif
%if 0%{?fedora_version}
BuildRequires: perl-devel
%endif
%if 0%{?suse_version}
%if 0%{?suse_version} < 1030
BuildRequires: expat
%else
BuildRequires: libexpat-devel
%endif
%if 0%{?suse_version} < 1100
BuildRequires: graphviz
%endif
%else
BuildRequires: expat-devel
%endif
BuildRequires: cmake gcc-c++ perl python-devel rpm-devel ruby-devel swig
BuildRequires: zlib-devel
# the testsuite uses the check framework
BuildRequires: check-devel
Summary: A new approach to package dependency solving
#define some macros missing on fedora
%if 0%{?fedora_version}
%{!?py_sitedir: %define py_sitedir %(%__python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%{!?py_requires: %define py_requires Requires: python}
%endif
%description
A new approach to package dependency solving
Authors:
--------
Michael Schroeder <mls@suse.de>
Klaus Kaempf <kkaempf@suse.de>
%package devel
License: BSD 3-Clause
Summary: A new approach to package dependency solving
Group: Development/Libraries/C and C++
Requires: satsolver-tools = %version
Requires: rpm-devel
#%package devel-doc
#Summary: satsolver developer documentation
#Group: Documentation/HTML
%description devel
A new approach to package dependency solving
Authors:
--------
Michael Schroeder <mls@suse.de>
Klaus Kaempf <kkaempf@suse.de>
%package -n satsolver-tools
License: BSD 3-Clause
Summary: A new approach to package dependency solving
Group: System/Base
Obsoletes: libsatsolver <= 0.0.15
Provides: libsatsolver = %{version}-%{release}
Requires: gzip bzip2 coreutils
%description -n satsolver-tools
A new approach to package dependency solving
Authors:
--------
Michael Schroeder <mls@suse.de>
Michael Matz <matz@suse.de>
Klaus Kaempf <kkaempf@suse.de>
%package -n ruby-satsolver
License: BSD 3-Clause
Summary: A new approach to package dependency solving
Group: Development/Libraries/C and C++
%description -n ruby-satsolver
A new approach to package dependency solving
Authors:
--------
Michael Schroeder <mls@suse.de>
Klaus Kaempf <kkaempf@suse.de>
%package -n python-satsolver
License: BSD 3-Clause
%py_requires
Summary: Python bindings for satsolver
Group: Development/Libraries/C and C++
%description -n python-satsolver
This allows to use satsolver functionality from Python
Authors:
--------
Michael Schroeder <mls@suse.de>
Klaus Kaempf <kkaempf@suse.de>
%package -n perl-satsolver
License: BSD 3-Clause
Requires: perl = %{perl_version}
Summary: A new approach to package dependency solving
Group: Development/Libraries/C and C++
%description -n perl-satsolver
A new approach to package dependency solving
Authors:
--------
Michael Schroeder <mls@suse.de>
Klaus Kaempf <kkaempf@suse.de>
%prep
%setup -n satsolver-%{version}
%build
export CFLAGS="$RPM_OPT_FLAGS"
export CXXFLAGS="$CFLAGS"
cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DPYTHON_SITEDIR=%{py_sitedir} \
-DLIB=%{_lib} \
-DCMAKE_VERBOSE_MAKEFILE=TRUE \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_SKIP_RPATH=1
make %{?jobs:-j %jobs}
make doc_forced
%install
make DESTDIR=$RPM_BUILD_ROOT install
# we want to leave the .a file untouched
export NO_BRP_STRIP_DEBUG=true
#pushd doc/autodoc
#make install
#popd
%clean
rm -rf "$RPM_BUILD_ROOT"
%files -n satsolver-tools
%defattr(-,root,root)
%doc LICENSE*
%exclude /usr/bin/deptestomatic
%exclude /usr/bin/helix2solv
/usr/bin/*
%files devel
%defattr(-,root,root)
%_libdir/libsatsolver.a
%_libdir/libappsatsolver.a
%dir /usr/include/satsolver
/usr/include/satsolver/*
/usr/bin/deptestomatic
/usr/bin/helix2solv
#%files devel-doc
#%defattr(-,root,root)
#%dir %_docdir/satsolver
#%_docdir/satsolver/*
%files -n ruby-satsolver
%defattr(-,root,root,-)
%if 0%{?suse_version}
%if 0%{?suse_version} < 1100
%dir %{_libdir}/ruby/site_ruby/%{rb_ver}/%{rb_arch}
%{_libdir}/ruby/site_ruby/%{rb_ver}/%{rb_arch}/satsolver.so
%else
%{_libdir}/ruby/vendor_ruby/%{rb_ver}/%{rb_arch}/satsolver.so
%endif
%endif
%if 0%{?mandriva_version}
%{ruby_sitearchdir}/satsolverx.so
%endif
%files -n python-satsolver
%defattr(-,root,root,-)
#%doc swig/python/examples/*.py
%{py_sitedir}/_satsolver.so
%{py_sitedir}/satsolver.py*
%files -n perl-satsolver
%defattr(-,root,root,-)
%{perl_vendorarch}/satsolver.so
%{perl_vendorlib}/satsolver.pm
%changelog