X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=package%2Flibsolv.spec.in;h=52924590e8ab7c2bd909d7919208188937ae8de3;hb=ef6e8f8da0690f0e11c12eff0f6e7fa97c109d54;hp=f76819c6cf93fd1b8903a1035c87f5d7d0d29ab0;hpb=db78ce335bf0a0cdaa3cf709c8e00c39fd8d77ee;p=platform%2Fupstream%2Flibsolv.git diff --git a/package/libsolv.spec.in b/package/libsolv.spec.in index f76819c..5292459 100644 --- a/package/libsolv.spec.in +++ b/package/libsolv.spec.in @@ -1,24 +1,39 @@ +# +# spec file for package libsolv +# +# Copyright (c) 2012 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: libsolv Version: @VERSION@ -Release: 1 -License: BSD 3-Clause +Release: 0 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 enable_static +%bcond_without disable_shared %bcond_without perl_binding %bcond_without python_binding %bcond_without ruby_binding +%bcond_with zypp %if 0%{?mandriva_version} # force this version on mandriva BuildRequires: libneon0.26-devel %endif -%if 0%{?fedora_version} +%if 0%{?fedora_version} || 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 600 BuildRequires: db4-devel %endif %if 0%{?suse_version} @@ -36,37 +51,37 @@ BuildRequires: fdupes %else BuildRequires: expat-devel %endif -BuildRequires: cmake rpm-devel gcc-c++ +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: rpm-devel BuildRequires: zlib-devel %if %{with perl_binding} -BuildRequires: perl -BuildRequires: swig +BuildRequires: perl +%if 0%{?fedora_version} || 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 600 +BuildRequires: perl-devel +%endif +BuildRequires: swig %endif %if %{with ruby_binding} -%global ruby_vendorarch %(ruby -rrbconfig -e 'puts Config::CONFIG["vendorarchdir"]') -BuildRequires: ruby ruby-devel -BuildRequires: swig +%global ruby_vendorarch %(ruby -r rbconfig -e "puts Config::CONFIG['vendorarchdir'].nil? ? Config::CONFIG['sitearchdir'] : Config::CONFIG['vendorarchdir']") +BuildRequires: ruby +BuildRequires: ruby-devel +BuildRequires: swig %endif %if %{with python_binding} -BuildRequires: python-devel -BuildRequires: swig +%global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True);") +BuildRequires: python-devel +BuildRequires: swig %endif Summary: A new approach to package dependency solving - +License: BSD-3-Clause +Group: Development/Libraries/C and C++ %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 libsolv@LIBSOLV_SOVERSION@ Summary: A new approach to package dependency solving @@ -75,41 +90,26 @@ Group: Development/Libraries/C and C++ %description -n libsolv@LIBSOLV_SOVERSION@ 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: libsolv@LIBSOLV_SOVERSION@ = %version %endif Requires: rpm-devel +Conflicts: libsatsolver-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 +Obsoletes: satsolver-tools < 0.18 +Provides: satsolver-tools = 0.18 +Conflicts: satsolver-tools-obsolete +Requires: gzip bzip2 coreutils findutils %description tools A new approach to package dependency solving. @@ -118,12 +118,13 @@ A new approach to package dependency solving. Summary: Applications demoing the libsolv library Group: System/Management Requires: curl -%if 0%{?fedora_version} +%if 0%{?fedora_version} || 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 600 Requires: gnupg2 %endif %if 0%{?suse_version} Requires: gpg2 %endif +Conflicts: libsatsolver-demo %description demo Applications demoing the libsolv library. @@ -136,7 +137,9 @@ Group: Development/Languages/Ruby Ruby bindings for sat solver. %package -n python-solv +%if 0%{?py_requires:1} && %{with python_binding} %py_requires +%endif Summary: Python bindings for the libsolv library Group: Development/Languages/Python @@ -159,34 +162,42 @@ export CFLAGS="$RPM_OPT_FLAGS" export CXXFLAGS="$CFLAGS" CMAKE_FLAGS= -%if 0%{?fedora_version} +%if 0%{?fedora_version} || 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 600 CMAKE_FLAGS="-DFEDORA=1" %endif +%if 0%{?suse_version} +CMAKE_FLAGS="-DSUSE=1 -DENABLE_APPDATA=1" +%endif cmake $CMAKE_FLAGS \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DLIB=%{_lib} \ -DCMAKE_VERBOSE_MAKEFILE=TRUE \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ %{?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} \ + %{?with_zypp:-DENABLE_SUSEREPO=1 -DENABLE_HELIXREPO=1} \ -DUSE_VENDORDIRS=1 \ - -DCMAKE_SKIP_RPATH=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} +%if 0%{?suse_version} +pushd $RPM_BUILD_ROOT/%{python_sitearch} python %py_libdir/py_compile.py *.py python -O %py_libdir/py_compile.py *.py popd %endif +%endif +%if %{with disable_shared} # we want to leave the .a file untouched export NO_BRP_STRIP_DEBUG=true +%endif %clean rm -rf "$RPM_BUILD_ROOT" @@ -199,26 +210,41 @@ rm -rf "$RPM_BUILD_ROOT" %files -n libsolv@LIBSOLV_SOVERSION@ %defattr(-,root,root) %doc LICENSE* -%_libdir/libsolv.so.* -%_libdir/libsolvext.so.* +%{_libdir}/libsolv.so.* +%{_libdir}/libsolvext.so.* %endif %files tools %defattr(-,root,root) -%exclude /usr/bin/helix2solv -%exclude /usr/bin/solv -/usr/bin/* +%if 0%{?suse_version} +%exclude %{_bindir}/helix2solv +%exclude %{_mandir}/man1/helix2solv* +%endif +%exclude %{_bindir}/solv +%{_bindir}/* +%{_mandir}/man1/* %files devel %defattr(-,root,root) -%_libdir/libsolv.so -%_libdir/libsolvext.so -/usr/include/solv -/usr/bin/helix2solv +%if %{with enable_static} +%{_libdir}/libsolv.a +%{_libdir}/libsolvext.a +%endif +%if !%{with disable_shared} +%{_libdir}/libsolv.so +%{_libdir}/libsolvext.so +%endif +%{_includedir}/solv +%if 0%{?suse_version} +%{_bindir}/helix2solv +%{_mandir}/man1/helix2solv* +%endif +%{_datadir}/cmake/Modules/* +%{_mandir}/man3/* %files demo %defattr(-,root,root) -/usr/bin/solv +%{_bindir}/solv %if %{with perl_binding} %files -n perl-solv @@ -235,7 +261,7 @@ rm -rf "$RPM_BUILD_ROOT" %if %{with python_binding} %files -n python-solv %defattr(-,root,root) -%{py_sitedir}/* +%{python_sitearch}/* %endif %changelog