Patterns are no longer pseudo installed (Fate#309385)
[platform/upstream/libzypp.git] / libzypp.spec.cmake
index 8295d43..a6fa468 100644 (file)
@@ -1,7 +1,7 @@
 #
 # spec file for package libzypp
 #
-# Copyright (c) 2005-2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2005-2013 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
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
-# norootforbuild
 
+%define force_gcc_46 0
 
 Name:           @PACKAGE@
-License:        GPL-2.0+
-Group:          System/Packages
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Summary:        Package, Patch, Pattern, and Product Management
+License:        GPL-2.0+
+Group:          System/Packages
 Version:        @VERSION@
-Release:        1
+Release:        0
 Source:         %{name}-%{version}.tar.bz2
 Source1:        %{name}-rpmlintrc
 Provides:       yast2-packagemanager
@@ -32,7 +32,7 @@ Obsoletes:      yast2-packagemanager
 
 # Features we provide (update doc/autoinclude/FeatureTest.doc):
 Provides:       libzypp(plugin) = 0
-Provides:       libzypp(plugin:commit) = 0
+Provides:       libzypp(plugin:commit) = 1
 Provides:       libzypp(plugin:services) = 0
 Provides:       libzypp(plugin:system) = 0
 Provides:       libzypp(plugin:urlresolver) = 0
@@ -52,11 +52,19 @@ BuildRequires:  hal-devel
 BuildRequires:  boost-devel
 BuildRequires:  dejagnu
 BuildRequires:  doxygen
+%if 0%{?force_gcc_46}
+BuildRequires:  gcc46
+BuildRequires:  gcc46-c++
+%else
 BuildRequires:  gcc-c++ >= 4.6
+%endif
 BuildRequires:  gettext-devel
 BuildRequires:  graphviz
 BuildRequires:  libxml2-devel
+%if 0%{?suse_version} != 1110
+# No libproxy on SLES
 BuildRequires:  libproxy-devel
+%endif
 
 %if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
 BuildRequires:  pkgconfig
@@ -64,7 +72,7 @@ BuildRequires:  pkgconfig
 BuildRequires:  pkg-config
 %endif
 
-BuildRequires:  libsolv-devel
+BuildRequires:  libsolv-devel >= 0.4.1
 %if 0%{?suse_version} >= 1100
 %requires_eq    libsolv-tools
 %else
@@ -84,10 +92,6 @@ Requires:       rpm
 
 %if 0%{?suse_version}
 BuildRequires:  rpm-devel
-Requires:       /usr/bin/uuidgen
-%if 0%{?suse_version} > 1020
-BuildRequires:  hicolor-icon-theme
-%endif
 %endif
 
 %if 0%{?fedora_version} || 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 600
@@ -99,8 +103,6 @@ BuildRequires:  rpm-devel
 %if 0%{?mandriva_version}
 BuildRequires:  glib2-devel
 BuildRequires:  librpm-devel
-# uuidgen
-Requires:       e2fsprogs
 %endif
 
 %if 0%{?suse_version}
@@ -140,17 +142,16 @@ Authors:
     Ladislav Slezak <lslezak@suse.cz>
 
 %package devel
-License:        GPL-2.0+
-Requires:       libzypp = %{version}
+Requires:       boost-devel
+Requires:       bzip2
+Requires:       glibc-devel
+Requires:       libstdc++-devel
 Requires:       libxml2-devel
+Requires:       libzypp = %{version}
 Requires:       openssl-devel
+Requires:       popt-devel
 Requires:       rpm-devel
-Requires:       glibc-devel
 Requires:       zlib-devel
-Requires:       bzip2
-Requires:       popt-devel
-Requires:       boost-devel
-Requires:       libstdc++-devel
 %if 0%{?suse_version} >= 1130 || 0%{?fedora_version} >= 16
 Requires:       libudev-devel
 %else
@@ -199,13 +200,19 @@ Authors:
 %build
 mkdir build
 cd build
+%if 0%{?force_gcc_46}
+export CC=gcc-4.6
+export CXX=g++-4.6
+%endif
 export CFLAGS="$RPM_OPT_FLAGS"
 export CXXFLAGS="$RPM_OPT_FLAGS"
 unset TRANSLATION_SET
+unset EXTRA_CMAKE_OPTIONS
 # SLE11-* might want its own translation set:
 %if 0%{?suse_version} == 1110
 if [ -f ../po/sle-zypp-po.tar.bz ]; then
   export TRANSLATION_SET=sle-zypp
+  export EXTRA_CMAKE_OPTIONS="-DDISABLE_LIBPROXY=ON"
 fi
 %endif
 cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
@@ -214,6 +221,7 @@ cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
       -DCMAKE_BUILD_TYPE=Release \
       -DCMAKE_SKIP_RPATH=1 \
       -DUSE_TRANSLATION_SET=${TRANSLATION_SET:-zypp} \
+      ${EXTRA_CMAKE_OPTIONS} \
       ..
 make %{?_smp_mflags} VERBOSE=1
 make -C doc/autodoc %{?_smp_mflags}
@@ -239,6 +247,8 @@ ln -s %{_sysconfdir}/yum.repos.d $RPM_BUILD_ROOT%{_sysconfdir}/zypp/repos.d
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/zypp/repos.d
 %endif
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/zypp/services.d
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/zypp/vendors.d
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/zypp/multiversion.d
 mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/zypp
 mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/zypp/plugins
 mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/zypp/plugins/commit
@@ -332,6 +342,8 @@ rm -rf "$RPM_BUILD_ROOT"
 %dir               %{_sysconfdir}/zypp/repos.d
 %endif
 %dir               %{_sysconfdir}/zypp/services.d
+%dir               %{_sysconfdir}/zypp/vendors.d
+%dir               %{_sysconfdir}/zypp/multiversion.d
 %config(noreplace) %{_sysconfdir}/zypp/zypp.conf
 %config(noreplace) %{_sysconfdir}/zypp/systemCheck
 %config(noreplace) %{_sysconfdir}/logrotate.d/zypp-history.lr