2011-10-19 11:10:00 +02:00
|
|
|
#
|
|
|
|
# spec file for package libsolv
|
|
|
|
#
|
2014-01-07 16:58:26 +01:00
|
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2011-10-19 11:10:00 +02:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
2013-07-04 14:28:11 +02:00
|
|
|
|
2011-07-18 16:22:02 +02:00
|
|
|
Name: libsolv
|
2014-02-14 11:20:44 +01:00
|
|
|
Version: 0.4.4
|
2012-02-02 15:18:52 +01:00
|
|
|
Release: 0
|
2011-07-18 16:22:02 +02:00
|
|
|
Url: git://gitorious.org/opensuse/libsolv.git
|
|
|
|
Source: libsolv-%{version}.tar.bz2
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
2011-10-06 17:01:54 +02:00
|
|
|
%bcond_without enable_static
|
|
|
|
%bcond_without disable_shared
|
2011-07-18 16:22:02 +02:00
|
|
|
%bcond_without perl_binding
|
|
|
|
%bcond_without python_binding
|
|
|
|
%bcond_without ruby_binding
|
2013-04-23 11:27:09 +02:00
|
|
|
%bcond_with zypp
|
2011-07-18 16:22:02 +02:00
|
|
|
|
|
|
|
%if 0%{?mandriva_version}
|
|
|
|
# force this version on mandriva
|
|
|
|
BuildRequires: libneon0.26-devel
|
|
|
|
%endif
|
2011-10-13 15:54:32 +02:00
|
|
|
%if 0%{?fedora_version} || 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 600
|
2011-07-18 16:22:02 +02:00
|
|
|
BuildRequires: db4-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
|
|
|
|
%if 0%{?suse_version} > 1020
|
|
|
|
BuildRequires: fdupes
|
|
|
|
%endif
|
|
|
|
%else
|
|
|
|
BuildRequires: expat-devel
|
|
|
|
%endif
|
2012-02-02 15:18:52 +01:00
|
|
|
BuildRequires: cmake
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: rpm-devel
|
2011-07-18 16:22:02 +02:00
|
|
|
BuildRequires: zlib-devel
|
|
|
|
|
|
|
|
%if %{with perl_binding}
|
2012-02-02 15:18:52 +01:00
|
|
|
BuildRequires: perl
|
2011-10-13 15:54:32 +02:00
|
|
|
%if 0%{?fedora_version} || 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 600
|
2012-02-02 15:18:52 +01:00
|
|
|
BuildRequires: perl-devel
|
2011-07-18 17:10:16 +02:00
|
|
|
%endif
|
2012-02-02 15:18:52 +01:00
|
|
|
BuildRequires: swig
|
2011-07-18 16:22:02 +02:00
|
|
|
%endif
|
|
|
|
%if %{with ruby_binding}
|
2012-12-18 16:08:43 +01:00
|
|
|
%global ruby_vendorarch %(ruby -r rbconfig -e "puts Config::CONFIG['vendorarchdir'].nil? ? Config::CONFIG['sitearchdir'] : Config::CONFIG['vendorarchdir']")
|
2012-02-02 15:18:52 +01:00
|
|
|
BuildRequires: ruby
|
|
|
|
BuildRequires: ruby-devel
|
|
|
|
BuildRequires: swig
|
2011-07-18 16:22:02 +02:00
|
|
|
%endif
|
|
|
|
%if %{with python_binding}
|
2011-07-18 17:34:26 +02:00
|
|
|
%global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True);")
|
2012-02-02 15:18:52 +01:00
|
|
|
BuildRequires: python-devel
|
|
|
|
BuildRequires: swig
|
2011-07-18 16:22:02 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
Summary: A new approach to package dependency solving
|
2012-02-02 15:18:52 +01:00
|
|
|
License: BSD-3-Clause
|
|
|
|
Group: Development/Libraries/C and C++
|
2011-10-18 16:44:17 +02:00
|
|
|
|
2011-07-18 16:22:02 +02:00
|
|
|
%description
|
|
|
|
A new approach to package dependency solving
|
|
|
|
|
|
|
|
%if !%{with disable_shared}
|
|
|
|
%package -n libsolv0
|
|
|
|
Summary: A new approach to package dependency solving
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
|
|
|
|
%description -n libsolv0
|
|
|
|
A new approach to package dependency solving
|
|
|
|
|
|
|
|
%endif
|
|
|
|
%package devel
|
|
|
|
Summary: A new approach to package dependency solving
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: libsolv-tools = %version
|
|
|
|
%if !%{with disable_shared}
|
|
|
|
Requires: libsolv0 = %version
|
|
|
|
%endif
|
|
|
|
Requires: rpm-devel
|
2013-06-18 11:56:20 +02:00
|
|
|
Conflicts: libsatsolver-devel
|
2011-07-18 16:22:02 +02:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
Development files for libsolv, a new approach to package dependency solving
|
|
|
|
|
|
|
|
%package tools
|
|
|
|
Summary: A new approach to package dependency solving
|
|
|
|
Group: Development/Libraries/C and C++
|
2011-10-13 11:04:11 +02:00
|
|
|
Obsoletes: satsolver-tools < 0.18
|
|
|
|
Provides: satsolver-tools = 0.18
|
2013-06-18 11:56:20 +02:00
|
|
|
Conflicts: satsolver-tools-obsolete
|
2013-07-04 14:28:11 +02:00
|
|
|
Requires: bzip2
|
|
|
|
Requires: coreutils
|
|
|
|
Requires: findutils
|
|
|
|
Requires: gzip
|
2011-07-18 16:22:02 +02:00
|
|
|
|
|
|
|
%description tools
|
|
|
|
A new approach to package dependency solving.
|
|
|
|
|
|
|
|
%package demo
|
|
|
|
Summary: Applications demoing the libsolv library
|
|
|
|
Group: System/Management
|
|
|
|
Requires: curl
|
2011-10-13 15:54:32 +02:00
|
|
|
%if 0%{?fedora_version} || 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 600
|
2011-07-18 16:22:02 +02:00
|
|
|
Requires: gnupg2
|
|
|
|
%endif
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
Requires: gpg2
|
|
|
|
%endif
|
2013-06-18 11:56:20 +02:00
|
|
|
Conflicts: libsatsolver-demo
|
2011-07-18 16:22:02 +02:00
|
|
|
|
|
|
|
%description demo
|
|
|
|
Applications demoing the libsolv library.
|
|
|
|
|
|
|
|
%package -n ruby-solv
|
|
|
|
Summary: Ruby bindings for the libsolv library
|
|
|
|
Group: Development/Languages/Ruby
|
|
|
|
|
|
|
|
%description -n ruby-solv
|
|
|
|
Ruby bindings for sat solver.
|
|
|
|
|
|
|
|
%package -n python-solv
|
2013-04-23 18:17:16 +02:00
|
|
|
%if 0%{?py_requires:1} && %{with python_binding}
|
2011-07-18 16:22:02 +02:00
|
|
|
%py_requires
|
2011-07-18 16:53:20 +02:00
|
|
|
%endif
|
2011-07-18 16:22:02 +02:00
|
|
|
Summary: Python bindings for the libsolv library
|
|
|
|
Group: Development/Languages/Python
|
|
|
|
|
|
|
|
%description -n python-solv
|
|
|
|
Python bindings for sat solver.
|
|
|
|
|
|
|
|
%package -n perl-solv
|
|
|
|
Requires: perl = %{perl_version}
|
|
|
|
Summary: Perl bindings for the libsolv library
|
|
|
|
Group: Development/Languages/Perl
|
|
|
|
|
|
|
|
%description -n perl-solv
|
|
|
|
Perl bindings for sat solver.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -n libsolv-%{version}
|
|
|
|
|
|
|
|
%build
|
|
|
|
export CFLAGS="$RPM_OPT_FLAGS"
|
|
|
|
export CXXFLAGS="$CFLAGS"
|
|
|
|
|
|
|
|
CMAKE_FLAGS=
|
2011-10-13 15:54:32 +02:00
|
|
|
%if 0%{?fedora_version} || 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 600
|
2011-07-18 16:22:02 +02:00
|
|
|
CMAKE_FLAGS="-DFEDORA=1"
|
|
|
|
%endif
|
2012-04-11 16:01:03 +02:00
|
|
|
%if 0%{?suse_version}
|
2013-12-09 14:06:22 +01:00
|
|
|
CMAKE_FLAGS="-DSUSE=1 -DENABLE_APPDATA=1"
|
2012-04-11 16:01:03 +02:00
|
|
|
%endif
|
2011-07-18 16:22:02 +02:00
|
|
|
|
|
|
|
cmake $CMAKE_FLAGS \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
|
|
|
|
-DLIB=%{_lib} \
|
|
|
|
-DCMAKE_VERBOSE_MAKEFILE=TRUE \
|
2012-01-20 16:34:18 +01:00
|
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
2011-07-18 16:22:02 +02:00
|
|
|
%{?with_enable_static:-DENABLE_STATIC=1} \
|
|
|
|
%{?with_disable_shared:-DDISABLE_SHARED=1} \
|
|
|
|
%{?with_perl_binding:-DENABLE_PERL=1} \
|
|
|
|
%{?with_python_binding:-DENABLE_PYTHON=1} \
|
|
|
|
%{?with_ruby_binding:-DENABLE_RUBY=1} \
|
2013-04-23 11:27:09 +02:00
|
|
|
%{?with_zypp:-DENABLE_SUSEREPO=1 -DENABLE_HELIXREPO=1} \
|
2011-07-18 16:22:02 +02:00
|
|
|
-DUSE_VENDORDIRS=1 \
|
2011-10-06 14:26:59 +02:00
|
|
|
-DCMAKE_SKIP_RPATH=1
|
2011-07-18 16:22:02 +02:00
|
|
|
make %{?jobs:-j %jobs}
|
|
|
|
|
|
|
|
%install
|
|
|
|
make DESTDIR=$RPM_BUILD_ROOT install
|
|
|
|
%if %{with python_binding}
|
2011-07-18 17:34:26 +02:00
|
|
|
%if 0%{?suse_version}
|
|
|
|
pushd $RPM_BUILD_ROOT/%{python_sitearch}
|
2011-07-18 16:22:02 +02:00
|
|
|
python %py_libdir/py_compile.py *.py
|
|
|
|
python -O %py_libdir/py_compile.py *.py
|
|
|
|
popd
|
|
|
|
%endif
|
2011-07-18 17:34:26 +02:00
|
|
|
%endif
|
2013-04-23 18:17:16 +02:00
|
|
|
%if %{with disable_shared}
|
2011-07-18 16:22:02 +02:00
|
|
|
# we want to leave the .a file untouched
|
|
|
|
export NO_BRP_STRIP_DEBUG=true
|
2013-04-23 18:17:16 +02:00
|
|
|
%endif
|
2011-07-18 16:22:02 +02:00
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf "$RPM_BUILD_ROOT"
|
|
|
|
|
|
|
|
%if !%{with disable_shared}
|
|
|
|
%post -n libsolv0 -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -n libsolv0 -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%files -n libsolv0
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc LICENSE*
|
2011-10-06 14:26:59 +02:00
|
|
|
%{_libdir}/libsolv.so.*
|
|
|
|
%{_libdir}/libsolvext.so.*
|
2011-07-18 16:22:02 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%files tools
|
|
|
|
%defattr(-,root,root)
|
2012-03-20 11:19:36 +01:00
|
|
|
%if 0%{?suse_version}
|
2011-10-06 14:26:59 +02:00
|
|
|
%exclude %{_bindir}/helix2solv
|
2012-03-20 11:19:36 +01:00
|
|
|
%endif
|
2011-10-06 14:26:59 +02:00
|
|
|
%exclude %{_bindir}/solv
|
|
|
|
%{_bindir}/*
|
2011-07-18 16:22:02 +02:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
2011-10-10 18:39:48 +02:00
|
|
|
%if %{with enable_static}
|
|
|
|
%{_libdir}/libsolv.a
|
|
|
|
%{_libdir}/libsolvext.a
|
|
|
|
%endif
|
|
|
|
%if !%{with disable_shared}
|
2011-10-06 14:26:59 +02:00
|
|
|
%{_libdir}/libsolv.so
|
|
|
|
%{_libdir}/libsolvext.so
|
2011-10-10 18:39:48 +02:00
|
|
|
%endif
|
2011-10-06 14:26:59 +02:00
|
|
|
%{_includedir}/solv
|
2012-03-20 11:19:36 +01:00
|
|
|
%if 0%{?suse_version}
|
2011-10-06 14:26:59 +02:00
|
|
|
%{_bindir}/helix2solv
|
2012-03-20 11:19:36 +01:00
|
|
|
%endif
|
2011-10-06 14:26:59 +02:00
|
|
|
%{_datadir}/cmake/Modules/*
|
2013-06-10 14:28:02 +02:00
|
|
|
%{_mandir}/man?/*
|
2011-07-18 16:22:02 +02:00
|
|
|
|
|
|
|
%files demo
|
|
|
|
%defattr(-,root,root)
|
2011-10-06 14:26:59 +02:00
|
|
|
%{_bindir}/solv
|
2011-07-18 16:22:02 +02:00
|
|
|
|
|
|
|
%if %{with perl_binding}
|
|
|
|
%files -n perl-solv
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{perl_vendorarch}/*
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if %{with ruby_binding}
|
|
|
|
%files -n ruby-solv
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{ruby_vendorarch}/*
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if %{with python_binding}
|
|
|
|
%files -n python-solv
|
|
|
|
%defattr(-,root,root)
|
2011-07-18 17:34:26 +02:00
|
|
|
%{python_sitearch}/*
|
2011-07-18 16:22:02 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%changelog
|