%global min_libzypp_ver 17.8.1 Name: zypper Version: 1.14.15 Release: 1%{?dist} Summary: Command line package manager using libzypp License: GPLv2+ URL: http://en.opensuse.org/Portal:Zypper Source0: https://github.com/openSUSE/zypper/archive/%{version}/%{name}-%{version}.tar.gz # Make zypper-log Python 3 compatible # From: https://github.com/openSUSE/zypper/pull/217 Patch0101: 0001-zypper-log-Make-Python-3-compatible.patch BuildRequires: %{_bindir}/asciidoctor BuildRequires: %{_bindir}/xsltproc BuildRequires: cmake BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: perl-generators BuildRequires: augeas-devel BuildRequires: boost-devel BuildRequires: gettext-devel BuildRequires: readline-devel BuildRequires: libxml2-devel BuildRequires: libzypp-devel >= %{min_libzypp_ver} Requires: libzypp%{?_isa} >= %{min_libzypp_ver} Requires: procps Requires: bash-completion Recommends: logrotate Recommends: cron Recommends: zypper-log # Zypper specific virtual provides Provides: zypper(oldpackage) Provides: zypper(updatestack-only) Provides: zypper(auto-agree-with-product-licenses) %description Zypper is a command line package manager tool using libzypp, which can be used to manage software for RPM based systems. %package log Summary: Zypper log file command line tool Requires: %{name} = %{version}-%{release} Requires: xz BuildArch: noarch %description log This package provides a command line tool for accessing the Zypper log file. %package aptitude Summary: apt/aptitude CLI compatibility interface for Zypper Provides: %{name}-apt = %{version}-%{release} Requires: %{name} = %{version}-%{release} Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) Enhances: zypper BuildArch: noarch %description aptitude This package provides apt-get and aptitude frontends for Zypper, for those used to the Debian package manager's CLI structure. These can be accessed with either of the following: * %{_bindir}/zypp-apt-get * %{_bindir}/zypp-aptitude %prep %autosetup -p1 # Use correct libexecdir find -type f -exec sed -i -e "s|/usr/lib/zypper|%{_libexecdir}/zypper|g" {} ';' find -type f -exec sed -i -e "s|\${CMAKE_INSTALL_PREFIX}/lib/zypper|\${CMAKE_INSTALL_PREFIX}/libexec/zypper|g" {} ';' find -type f -exec sed -i -e "s|\${CMAKE_INSTALL_PREFIX}/lib/\${PACKAGE}|\${CMAKE_INSTALL_PREFIX}/libexec/\${PACKAGE}|g" {} ';' # Use correct docdir find -type f -exec sed -i -e "s|\${INSTALL_PREFIX}/share/doc/packages/\${PACKAGE}|\${INSTALL_PREFIX}/share/doc/\${PACKAGE}|g" {} ';' %build %cmake . -B"%{_vpath_builddir}" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DDOC_INSTALL_DIR=%{_docdir} %make_build -C %{_vpath_builddir} %make_build -C %{_vpath_builddir}/po translations %make_build -C %{_vpath_builddir}/tests %install %make_install -C %{_vpath_builddir} %make_install -C %{_vpath_builddir}/po mkdir -p %{buildroot}%{_libexecdir}/zypper/commands %find_lang %{name} install -dm 0755 %{buildroot}%{_localstatedir}/log touch %{buildroot}%{_localstatedir}/log/zypper.log # Remove conflict with apt mv %{buildroot}%{_bindir}/aptitude %{buildroot}%{_bindir}/zypp-aptitude # Redo the symlink to point to the new binary name rm %{buildroot}%{_bindir}/apt-get ln -sf zypp-aptitude %{buildroot}%{_bindir}/zypp-apt-get rm %{buildroot}%{_bindir}/apt ln -sf zypp-aptitude %{buildroot}%{_bindir}/zypp-apt # Fix shebang for zypper-log sed -e "s|/usr/bin/env python|/usr/bin/python3|g" -i %{buildroot}%{_sbindir}/zypper-log # Move the bash completion file mkdir -p %{buildroot}%{_datadir}/bash-completion/completions mv %{buildroot}%{_sysconfdir}/bash_completion.d/zypper.sh %{buildroot}%{_datadir}/bash-completion/completions/zypper rm -rf %{buildroot}%{_sysconfdir}/bash_completion.d/ # Remove conflicting man page and rename needs-restarting rm %{buildroot}%{_mandir}/man1/needs-restarting.1* mv %{buildroot}%{_bindir}/needs-restarting %{buildroot}%{_bindir}/zypp-needs-restarting %check pushd %{_vpath_builddir}/tests ctest -VV . popd %files -f %{name}.lang %license COPYING %doc %{_docdir}/zypper/* %config(noreplace) %{_sysconfdir}/zypp/zypper.conf %config(noreplace) %{_sysconfdir}/logrotate.d/zypper.lr %config(noreplace) %{_sysconfdir}/logrotate.d/zypp-refresh.lr %{_datadir}/bash-completion/completions/zypper %{_bindir}/zypper %{_bindir}/installation_sources %{_bindir}/zypp-needs-restarting %{_sbindir}/zypp-refresh %{_datadir}/zypper/ %{_libexecdir}/zypper/ %{_mandir}/man8/zypper.8.* %{_mandir}/man8/zypp-refresh.8.* %ghost %config(noreplace) %attr(640,root,root) %{_localstatedir}/log/zypper.log %files log %{_sbindir}/zypper-log %{_mandir}/man8/zypper-log.8.* %files aptitude %{_bindir}/zypp-aptitude %{_bindir}/zypp-apt-get %{_bindir}/zypp-apt %dir %{_sysconfdir}/zypp/apt-packagemap.d/ %config(noreplace) %{_sysconfdir}/zypp/apt-packagemap.d/* %changelog * Sat Nov 03 2018 Neal Gompa - 1.14.15-1 - Update to 1.14.15 * Sun Aug 26 2018 Neal Gompa - 1.14.8-1 - Update to 1.14.8 (#1555114) * Sat Jul 14 2018 Fedora Release Engineering - 1.14.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Thu Jun 28 2018 Jitka Plesnikova - 1.14.3-2 - Perl 5.28 rebuild * Sun Mar 04 2018 Neal Gompa - 1.14.3-1 - Update to 1.14.3 (#1550768) * Wed Feb 07 2018 Neal Gompa - 1.14.2-1 - Update to 1.14.2 (#1489428) - Backport patch to fix build with GCC 8 * Sun Sep 03 2017 Neal Gompa - 1.13.32-1 - Update to 1.13.32 (#1485336) * Thu Aug 17 2017 Neal Gompa - 1.13.31-1 - Update to 1.13.31 (#1480827) * Sun Aug 06 2017 Neal Gompa - 1.13.30-1 - Update to 1.13.30 (#1470434) * Thu Aug 03 2017 Fedora Release Engineering - 1.13.28-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild * Thu Jul 27 2017 Fedora Release Engineering - 1.13.28-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Tue Jun 20 2017 Neal Gompa - 1.13.28-1 - Update to 1.13.28 (#1444590) * Sun Jun 04 2017 Jitka Plesnikova - 1.13.22-2 - Perl 5.26 rebuild * Mon Apr 17 2017 Neal Gompa - 1.13.22-1 - Update to 1.13.22 - Fix zypp-apt-get symlink - Add missing (Build)Requires for zypper-aptitude - Move bash completion file and add bash-completion Requires * Fri Mar 31 2017 Neal Gompa - 1.13.21-1 - Update to 1.13.21 - Drop merged patches - Use correct libexecdir - Use correct docdir * Fri Feb 24 2017 Neal Gompa - 1.13.19-1 - Update to 1.13.19 - Bump required libzypp version - Backport patch from upstream to fix building tests * Mon Dec 12 2016 Neal Gompa - 1.13.14-1 - Update to 1.13.14 - Bump required libzypp version * Sat Aug 27 2016 Neal Gompa - 1.13.9-3 - Bump to rebuild against libzypp-16.2.2-3 to add suserepo support * Thu Aug 25 2016 Neal Gompa - 1.13.9-2 - Bump to rebuild against libzypp-16.2.2-2 * Wed Aug 24 2016 Neal Gompa - 1.13.9-1 - Update to 1.13.9 - Bump required libzypp version * Fri Jun 10 2016 Neal Gompa - 1.13.2-1 - Update to 1.13.2 * Tue Apr 26 2016 Neal Gompa - 1.13.0-2 - Rebuild against libzypp-15.22.0 * Wed Apr 6 2016 Neal Gompa - 1.13.0-1 - Update to 1.13.0 * Thu Feb 4 2016 Neal Gompa - 1.12.32-1 - Update to 1.12.32 * Mon Feb 1 2016 Neal Gompa - 1.12.30-1 - Initial packaging