Name: libsolv Version: 0.0.0 Release: 1 License: BSD 3-Clause Url: git://gitorious.org/opensuse/libsolv.git Source: libsolv-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build Group: Development/Libraries/C and C++ Prefix: /usr %bcond_with enable_static %bcond_with disable_shared %bcond_without perl_binding %bcond_without python_binding %bcond_without ruby_binding %if 0%{?mandriva_version} # force this version on mandriva BuildRequires: libneon0.26-devel %endif %if 0%{?fedora_version} 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 BuildRequires: cmake rpm-devel gcc-c++ BuildRequires: zlib-devel %if %{with perl_binding} BuildRequires: perl BuildRequires: swig %endif %if %{with ruby_binding} %global ruby_vendorarch %(ruby -rrbconfig -e 'puts Config::CONFIG["vendorarchdir"]') BuildRequires: ruby ruby-devel BuildRequires: swig %endif %if %{with python_binding} BuildRequires: python-devel BuildRequires: swig %endif Summary: A new approach to package dependency solving %description A new approach to package dependency solving Authors: -------- Michael Schroeder Klaus Kaempf Stephan Kulow Michael Matz Duncan Mac-Vicar P. %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 Authors: -------- Michael Schroeder Klaus Kaempf Stephan Kulow Michael Matz Duncan Mac-Vicar P. %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 %description devel Development files for libsolv, a new approach to package dependency solving Authors: -------- Michael Schroeder Klaus Kaempf Stephan Kulow Michael Matz Duncan Mac-Vicar P. %package tools Summary: A new approach to package dependency solving Group: Development/Libraries/C and C++ Obsoletes: libsatsolver <= 0.0.15 Provides: libsatsolver = %{version}-%{release} Requires: gzip bzip2 coreutils %description tools A new approach to package dependency solving. %package demo Summary: Applications demoing the libsolv library Group: System/Management Requires: curl %if 0%{?fedora_version} Requires: gnupg2 %endif %if 0%{?suse_version} Requires: gpg2 %endif %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 %if 0{?py_requires} %py_requires %endif 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= %if 0%{?fedora_version} CMAKE_FLAGS="-DFEDORA=1" %endif cmake $CMAKE_FLAGS \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DLIB=%{_lib} \ -DCMAKE_VERBOSE_MAKEFILE=TRUE \ -DCMAKE_BUILD_TYPE=Release \ %{?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} \ -DUSE_VENDORDIRS=1 \ -DCMAKE_SKIP_RPATH=1 make %{?jobs:-j %jobs} %install make DESTDIR=$RPM_BUILD_ROOT install %if %{with python_binding} pushd $RPM_BUILD_ROOT/%{py_sitedir} python %py_libdir/py_compile.py *.py python -O %py_libdir/py_compile.py *.py popd %endif # we want to leave the .a file untouched export NO_BRP_STRIP_DEBUG=true %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* %_libdir/libsolv.so.* %_libdir/libsolvext.so.* %endif %files tools %defattr(-,root,root) %exclude /usr/bin/helix2solv %exclude /usr/bin/solv /usr/bin/* %files devel %defattr(-,root,root) %_libdir/libsolv.so %_libdir/libsolvext.so /usr/include/solv /usr/bin/helix2solv %files demo %defattr(-,root,root) /usr/bin/solv %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) %{py_sitedir}/* %endif %changelog