Imported Upstream version 17.0.2
[platform/upstream/libzypp.git] / libzypp.spec.cmake
index 1fee7d1..76d81aa 100644 (file)
@@ -32,13 +32,13 @@ Provides:       yast2-packagemanager
 Obsoletes:      yast2-packagemanager
 
 # Features we provide (update doc/autoinclude/FeatureTest.doc):
-Provides:       libzypp(plugin) = 0.1
+Provides:       libzypp(plugin) = 0
 Provides:       libzypp(plugin:appdata) = 0
 Provides:       libzypp(plugin:commit) = 1
 Provides:       libzypp(plugin:services) = 1
 Provides:       libzypp(plugin:system) = 1
 Provides:       libzypp(plugin:urlresolver) = 0
-Provides:       libzypp(repovarexpand) = 0
+Provides:       libzypp(repovarexpand) = 1.1
 
 %if 0%{?suse_version}
 Recommends:     logrotate
@@ -48,7 +48,7 @@ Recommends:     lsof
 BuildRequires:  cmake
 BuildRequires:  openssl-devel
 %if 0%{?suse_version} >= 1130 || 0%{?fedora_version} >= 16
-BuildRequires:  libudev-devel
+BuildRequires:  pkgconfig(libudev)
 %else
 BuildRequires:  hal-devel
 %endif
@@ -63,7 +63,6 @@ BuildRequires:  gcc-c++ >= 4.6
 %endif
 BuildRequires:  gettext-devel
 BuildRequires:  graphviz
-BuildRequires:  graphviz-gnome
 BuildRequires:  libxml2-devel
 %if 0%{?suse_version} != 1110
 # No libproxy on SLES
@@ -76,8 +75,7 @@ BuildRequires:  pkgconfig
 BuildRequires:  pkg-config
 %endif
 
-BuildRequires:  libsolv-devel >= 0.6.19
-BuildRequires:  libsolv-devel < 0.7
+BuildRequires:  libsolv-devel >= 0.6.23
 %if 0%{?suse_version} >= 1100
 BuildRequires:  libsolv-tools
 %requires_eq    libsolv-tools
@@ -97,18 +95,18 @@ BuildRequires:  expat-devel
 Requires:       rpm
 
 %if 0%{?suse_version}
-BuildRequires:  rpm-devel
+BuildRequires:  rpm-devel > 4.4
 %endif
 
 %if 0%{?fedora_version} || 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 600
 BuildRequires:  glib2-devel
 BuildRequires:  popt-devel
-BuildRequires:  rpm-devel
+BuildRequires:  rpm-devel > 4.4
 %endif
 
 %if 0%{?mandriva_version}
 BuildRequires:  glib2-devel
-BuildRequires:  librpm-devel
+BuildRequires:  librpm-devel > 4.4
 %endif
 
 %if 0%{?suse_version}
@@ -149,13 +147,14 @@ Requires:       libxml2-devel
 Requires:       libzypp = %{version}
 Requires:       openssl-devel
 Requires:       popt-devel
-Requires:       rpm-devel
+Requires:       rpm-devel > 4.4
 Requires:       zlib-devel
 %if 0%{?suse_version} >= 1130 || 0%{?fedora_version} >= 16
 Requires:       libudev-devel
 %else
 Requires:       hal-devel
 %endif
+Requires:       cmake
 %if 0%{?suse_version}
 %if 0%{?suse_version} >= 1100
 # Code11+
@@ -196,17 +195,7 @@ export CXX=g++-4.6
 %endif
 export CFLAGS="$RPM_OPT_FLAGS"
 export CXXFLAGS="$RPM_OPT_FLAGS"
-unset TRANSLATION_SET
 unset EXTRA_CMAKE_OPTIONS
-# Same codebase, but SLES may use it's own translation set.
-#     suse_version
-#      1110            SLES11
-#      1315            SLES12
-%if 0%{?suse_version} == 1110 || 0%{?suse_version} == 1315
-if [ -f ../po/sle-zypp-po.tar.bz ]; then
-  export TRANSLATION_SET=sle-zypp
-fi
-%endif
 # No libproxy on SLE11
 %if 0%{?suse_version} == 1110
 export EXTRA_CMAKE_OPTIONS="-DDISABLE_LIBPROXY=ON"
@@ -217,7 +206,6 @@ cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
       -DLIB=%{_lib} \
       -DCMAKE_BUILD_TYPE=Release \
       -DCMAKE_SKIP_RPATH=1 \
-      -DUSE_TRANSLATION_SET=${TRANSLATION_SET:-zypp} \
       ${EXTRA_CMAKE_OPTIONS} \
       ..
 make %{?_smp_mflags} VERBOSE=1
@@ -244,6 +232,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/systemCheck.d
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/zypp/vars.d
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/zypp/vendors.d
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/zypp/multiversion.d
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/zypp/credentials.d
@@ -258,6 +248,11 @@ mkdir -p $RPM_BUILD_ROOT%{_var}/lib/zypp
 mkdir -p $RPM_BUILD_ROOT%{_var}/log/zypp
 mkdir -p $RPM_BUILD_ROOT%{_var}/cache/zypp
 
+# Default to 'solver.dupAllowVendorChange = false' on TW and post SLE12
+%if 0%{?suse_version} >= 1330 || "%{distribution}" == "openSUSE Tumbleweed"
+sed -i "s|# solver.dupAllowVendorChange = true|solver.dupAllowVendorChange = false|g" %{buildroot}%{_sysconfdir}/zypp/zypp.conf
+%endif
+
 make -C po install DESTDIR=$RPM_BUILD_ROOT
 # Create filelist with translations
 cd ..
@@ -341,6 +336,8 @@ rm -rf "$RPM_BUILD_ROOT"
 %dir               %{_sysconfdir}/zypp/repos.d
 %endif
 %dir               %{_sysconfdir}/zypp/services.d
+%dir               %{_sysconfdir}/zypp/systemCheck.d
+%dir               %{_sysconfdir}/zypp/vars.d
 %dir               %{_sysconfdir}/zypp/vendors.d
 %dir               %{_sysconfdir}/zypp/multiversion.d
 %dir               %{_sysconfdir}/zypp/credentials.d