1dafd3e
# Force out of source build
1dafd3e
%undefine __cmake_in_source_build
1dafd3e
fa7a7e9
%global min_libzypp_ver 17.31.7
ebb6c93
ebb6c93
Name:           zypper
422dc53
Version:        1.14.68
4943021
Release:        2%{?dist}
ebb6c93
Summary:        Command line package manager using libzypp
ebb6c93
ebb6c93
License:        GPLv2+
ebb6c93
URL:            http://en.opensuse.org/Portal:Zypper
ebb6c93
Source0:        https://github.com/openSUSE/zypper/archive/%{version}/%{name}-%{version}.tar.gz
ebb6c93
0457600
BuildRequires:  %{_bindir}/asciidoctor
0457600
BuildRequires:  %{_bindir}/xsltproc
78703e0
BuildRequires:  cmake >= 3.1
ef835fc
BuildRequires:  gcc
ef835fc
BuildRequires:  gcc-c++
ef835fc
BuildRequires:  perl-generators
4b60568
BuildRequires:  glibc-all-langpacks
ebb6c93
BuildRequires:  augeas-devel
ebb6c93
BuildRequires:  boost-devel
ebb6c93
BuildRequires:  gettext-devel
ebb6c93
BuildRequires:  readline-devel
ebb6c93
BuildRequires:  libxml2-devel
ebb6c93
BuildRequires:  libzypp-devel >= %{min_libzypp_ver}
ebb6c93
Requires:       libzypp%{?_isa} >= %{min_libzypp_ver}
ebb6c93
Requires:       procps
3b3f58c
3b3f58c
# Blech, apparently we don't want bash-completion always... Cf. rhbz#1652183
3b3f58c
Recommends:     bash-completion
ebb6c93
ebb6c93
Recommends:     logrotate
ebb6c93
Recommends:     cron
ebb6c93
Recommends:     zypper-log
ebb6c93
ebb6c93
# Zypper specific virtual provides
ebb6c93
Provides:       zypper(oldpackage)
ebb6c93
Provides:       zypper(updatestack-only)
755bdd0
Provides:       zypper(auto-agree-with-product-licenses)
38d4be3
Provides:       zypper(purge-kernels)
ebb6c93
ebb6c93
ebb6c93
%description
1a2f626
Zypper is a command line package manager tool using libzypp,
ebb6c93
which can be used to manage software for RPM based systems.
ebb6c93
ebb6c93
%package log
ebb6c93
Summary:        Zypper log file command line tool
ebb6c93
Requires:       %{name} = %{version}-%{release}
ebb6c93
Requires:       xz
ebb6c93
BuildArch:      noarch
ebb6c93
ebb6c93
%description log
ebb6c93
This package provides a command line tool for
ebb6c93
accessing the Zypper log file.
ebb6c93
ebb6c93
ebb6c93
%package aptitude
ebb6c93
Summary:        apt/aptitude CLI compatibility interface for Zypper
ebb6c93
Provides:       %{name}-apt = %{version}-%{release}
ebb6c93
Requires:       %{name} = %{version}-%{release}
ebb6c93
Enhances:       zypper
ebb6c93
BuildArch:      noarch
ebb6c93
ebb6c93
%description aptitude
ebb6c93
This package provides apt-get and aptitude frontends for Zypper,
ebb6c93
for those used to the Debian package manager's CLI structure.
ebb6c93
ebb6c93
These can be accessed with either of the following:
ebb6c93
* %{_bindir}/zypp-apt-get
ebb6c93
* %{_bindir}/zypp-aptitude
ebb6c93
ebb6c93
%prep
ebb6c93
%autosetup -p1
ebb6c93
ebb6c93
# Use correct libexecdir
ebb6c93
find -type f -exec sed -i -e "s|/usr/lib/zypper|%{_libexecdir}/zypper|g" {} ';'
ebb6c93
find -type f -exec sed -i -e "s|\${CMAKE_INSTALL_PREFIX}/lib/zypper|\${CMAKE_INSTALL_PREFIX}/libexec/zypper|g" {} ';'
ebb6c93
find -type f -exec sed -i -e "s|\${CMAKE_INSTALL_PREFIX}/lib/\${PACKAGE}|\${CMAKE_INSTALL_PREFIX}/libexec/\${PACKAGE}|g" {} ';'
ebb6c93
ebb6c93
# Use correct docdir
ebb6c93
find -type f -exec sed -i -e "s|\${INSTALL_PREFIX}/share/doc/packages/\${PACKAGE}|\${INSTALL_PREFIX}/share/doc/\${PACKAGE}|g" {} ';'
ebb6c93
ebb6c93
%build
1dafd3e
%cmake  -DCMAKE_BUILD_TYPE=RelWithDebInfo -DDOC_INSTALL_DIR=%{_docdir} -DENABLE_BUILD_TESTS=ON -DENABLE_BUILD_TRANS=ON
1dafd3e
%cmake_build
ebb6c93
ebb6c93
ebb6c93
%install
1dafd3e
%cmake_install
ebb6c93
ebb6c93
mkdir -p %{buildroot}%{_libexecdir}/zypper/commands
ebb6c93
ebb6c93
%find_lang %{name}
ebb6c93
ebb6c93
install -dm 0755 %{buildroot}%{_localstatedir}/log
ebb6c93
touch %{buildroot}%{_localstatedir}/log/zypper.log
ebb6c93
ebb6c93
# Remove conflict with apt
ebb6c93
mv %{buildroot}%{_bindir}/aptitude %{buildroot}%{_bindir}/zypp-aptitude
ebb6c93
# Redo the symlink to point to the new binary name
ebb6c93
rm %{buildroot}%{_bindir}/apt-get
ebb6c93
ln -sf zypp-aptitude %{buildroot}%{_bindir}/zypp-apt-get
108b84a
rm %{buildroot}%{_bindir}/apt
108b84a
ln -sf zypp-aptitude %{buildroot}%{_bindir}/zypp-apt
ebb6c93
1eeac97
# Remove conflicting man page and rename needs-restarting
1eeac97
rm %{buildroot}%{_mandir}/man1/needs-restarting.1*
1eeac97
mv %{buildroot}%{_bindir}/needs-restarting %{buildroot}%{_bindir}/zypp-needs-restarting
ebb6c93
ebb6c93
%check
f9401da
pushd %{_vpath_builddir}/tests
42c0dd0
ctest -VV --output-on-failure .
ebb6c93
popd
ebb6c93
ebb6c93
%files -f %{name}.lang
ebb6c93
%license COPYING
ebb6c93
%doc %{_docdir}/zypper/*
ebb6c93
%config(noreplace) %{_sysconfdir}/zypp/zypper.conf
ebb6c93
%config(noreplace) %{_sysconfdir}/logrotate.d/zypper.lr
ebb6c93
%config(noreplace) %{_sysconfdir}/logrotate.d/zypp-refresh.lr
3b3f58c
# Co-own bash-completion directories... Cf. rhbz#1652183
3b3f58c
## This really should be owned by filesystem...
3b3f58c
%dir %{_datadir}/bash-completion
3b3f58c
%dir %{_datadir}/bash-completion/completions
ebb6c93
%{_datadir}/bash-completion/completions/zypper
ebb6c93
%{_bindir}/zypper
ebb6c93
%{_bindir}/installation_sources
1eeac97
%{_bindir}/zypp-needs-restarting
ebb6c93
%{_sbindir}/zypp-refresh
ebb6c93
%{_datadir}/zypper/
ebb6c93
%{_libexecdir}/zypper/
ebb6c93
%{_mandir}/man8/zypper.8.*
ebb6c93
%{_mandir}/man8/zypp-refresh.8.*
ebb6c93
%ghost %config(noreplace) %attr(640,root,root) %{_localstatedir}/log/zypper.log
ebb6c93
ebb6c93
%files log
ebb6c93
%{_sbindir}/zypper-log
ebb6c93
%{_mandir}/man8/zypper-log.8.*
ebb6c93
ebb6c93
%files aptitude
ebb6c93
%{_bindir}/zypp-aptitude
ebb6c93
%{_bindir}/zypp-apt-get
108b84a
%{_bindir}/zypp-apt
ebb6c93
%dir %{_sysconfdir}/zypp/apt-packagemap.d/
ebb6c93
%config(noreplace) %{_sysconfdir}/zypp/apt-packagemap.d/*
ebb6c93
ebb6c93
ebb6c93
%changelog
4943021
* Sun Apr 14 2024 Neal Gompa <ngompa@fedoraproject.org> - 1.14.68-2
4943021
- Rebuild for libzypp-tui soname fix
4943021
422dc53
* Mon Mar 04 2024 Neal Gompa <ngompa@fedoraproject.org> - 1.14.68-1
422dc53
- Update to 1.14.68
422dc53
c9fee3b
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.14.59-3
c9fee3b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
c9fee3b
ee2e72b
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.14.59-2
ee2e72b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
ee2e72b
fa7a7e9
* Thu Mar 09 2023 Neal Gompa <ngompa@fedoraproject.org> - 1.14.59-1
fa7a7e9
- Update to 1.14.59
fa7a7e9
b06dc1f
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.14.55-2
b06dc1f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
b06dc1f
e98481a
* Fri Sep 02 2022 Neal Gompa <ngompa@fedoraproject.org> - 1.14.55-1
e98481a
- Update to 1.14.55 (#1932773)
e98481a
aa24893
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.14.42-6
aa24893
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
aa24893
3b999f6
* Wed Jun 01 2022 Jitka Plesnikova <jplesnik@redhat.com> - 1.14.42-5
3b999f6
- Perl 5.36 rebuild
3b999f6
8365212
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.14.42-4
8365212
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
8365212
91e5657
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.14.42-3
91e5657
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
91e5657
af949ec
* Fri May 21 2021 Jitka Plesnikova <jplesnik@redhat.com> - 1.14.42-2
af949ec
- Perl 5.34 rebuild
af949ec
47cdd83
* Thu Feb 11 2021 Neal Gompa <ngompa13@gmail.com> - 1.14.42-1
47cdd83
- Update to 1.14.42 (#1823433)
47cdd83
cff3cd1
* Thu Jan 28 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.14.37-2
cff3cd1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
cff3cd1
1dafd3e
* Sat Aug 08 2020 Neal Gompa <ngompa13@gmail.com> - 1.14.37-1
1dafd3e
- Update to 1.14.37 (#1823433)
1dafd3e
bcaeac0
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.14.35-5
bcaeac0
- Second attempt - Rebuilt for
bcaeac0
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
bcaeac0
709818a
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.14.35-4
709818a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
709818a
078c9e9
* Thu Jun 25 2020 Jitka Plesnikova <jplesnik@redhat.com> - 1.14.35-3
078c9e9
- Perl 5.32 rebuild
078c9e9
2d322cb
* Fri Mar 20 2020 Neal Gompa <ngompa13@gmail.com> - 1.14.35-2
2d322cb
- Backport fixup commit for building with C++17
2d322cb
78703e0
* Fri Mar 20 2020 Neal Gompa <ngompa13@gmail.com> - 1.14.35-1
78703e0
- Update to 1.14.35 (#1805837)
78703e0
ac50989
* Sat Mar 07 2020 Neal Gompa <ngompa13@gmail.com> - 1.14.34-1
78703e0
- Update to 1.14.34
2bcdae5
9505268
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.14.33-2
9505268
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
9505268
38d4be3
* Mon Jan 27 2020 Neal Gompa <ngompa13@gmail.com> - 1.14.33-1
38d4be3
- Update to 1.14.33 (#1777955)
38d4be3
3f4ea1b
* Tue Nov 12 2019 Neal Gompa <ngompa13@gmail.com> - 1.14.32-1
3f4ea1b
- Update to 1.14.32 (#1747529)
3f4ea1b
42c0dd0
* Tue Aug 27 2019 Neal Gompa <ngompa13@gmail.com> - 1.14.29-1
42c0dd0
- Update to 1.14.29 (#1719278)
42c0dd0
bc47761
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.14.27-4
bc47761
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
bc47761
2053043
* Thu May 30 2019 Jitka Plesnikova <jplesnik@redhat.com> - 1.14.27-3
2053043
- Perl 5.30 rebuild
2053043
f90b318
* Tue May 28 2019 Björn Esser <besser82@fedoraproject.org> - 1.14.27-2
f90b318
- Rebuilt (libzypp)
f90b318
e475bff
* Mon Mar 25 2019 Björn Esser <besser82@fedoraproject.org> - 1.14.27-1
e475bff
- Rebase to 1.14.27 (#1680605)
e475bff
706c0b9
* Mon Mar 25 2019 Björn Esser <besser82@fedoraproject.org> - 1.14.25-5
706c0b9
- Explicitly enable translation on CMake command line
706c0b9
b2373c8
* Mon Mar 25 2019 Björn Esser <besser82@fedoraproject.org> - 1.14.25-4
b2373c8
- Explicitly enable tests on CMake command line
b2373c8
a9c72a9
* Sun Feb 17 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.14.25-3
a9c72a9
- Rebuild for readline 8.0
a9c72a9
3b3f58c
* Tue Feb 12 2019 Neal Gompa <ngompa13@gmail.com> - 1.14.25-2
3b3f58c
- Downgrade bash-completion dependency to Recommends (#1652183)
3b3f58c
4b60568
* Tue Feb 12 2019 Neal Gompa <ngompa13@gmail.com> - 1.14.25-1
4b60568
- Rebase to 1.14.25 (#1667664)
4b60568
656a7d8
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.14.15-2
656a7d8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
656a7d8
1eeac97
* Sat Nov 03 2018 Neal Gompa <ngompa13@gmail.com> - 1.14.15-1
1eeac97
- Update to 1.14.15
1eeac97
0457600
* Sun Aug 26 2018 Neal Gompa <ngompa13@gmail.com> - 1.14.8-1
0457600
- Update to 1.14.8 (#1555114)
0457600
f9b8266
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.14.3-3
f9b8266
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
f9b8266
4ef5a24
* Thu Jun 28 2018 Jitka Plesnikova <jplesnik@redhat.com> - 1.14.3-2
4ef5a24
- Perl 5.28 rebuild
4ef5a24
ef835fc
* Sun Mar 04 2018 Neal Gompa <ngompa13@gmail.com> - 1.14.3-1
ef835fc
- Update to 1.14.3 (#1550768)
ef835fc
f9401da
* Wed Feb 07 2018 Neal Gompa <ngompa13@gmail.com> - 1.14.2-1
f9401da
- Update to 1.14.2 (#1489428)
f9401da
- Backport patch to fix build with GCC 8
f9401da
6bbccdb
* Sun Sep 03 2017 Neal Gompa <ngompa13@gmail.com> - 1.13.32-1
6bbccdb
- Update to 1.13.32 (#1485336)
6bbccdb
a0c5ef6
* Thu Aug 17 2017 Neal Gompa <ngompa13@gmail.com> - 1.13.31-1
a0c5ef6
- Update to 1.13.31 (#1480827)
a0c5ef6
36a66ff
* Sun Aug 06 2017 Neal Gompa <ngompa13@gmail.com> - 1.13.30-1
36a66ff
- Update to 1.13.30 (#1470434)
36a66ff
359f06d
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.13.28-3
359f06d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
359f06d
3748dd2
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.13.28-2
3748dd2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
3748dd2
755bdd0
* Tue Jun 20 2017 Neal Gompa <ngompa13@gmail.com> - 1.13.28-1
755bdd0
- Update to 1.13.28 (#1444590)
755bdd0
09f27fd
* Sun Jun 04 2017 Jitka Plesnikova <jplesnik@redhat.com> - 1.13.22-2
09f27fd
- Perl 5.26 rebuild
09f27fd
ebb6c93
* Mon Apr 17 2017 Neal Gompa <ngompa13@gmail.com> - 1.13.22-1
ebb6c93
- Update to 1.13.22
ebb6c93
- Fix zypp-apt-get symlink
ebb6c93
- Add missing (Build)Requires for zypper-aptitude
ebb6c93
- Move bash completion file and add bash-completion Requires
ebb6c93
ebb6c93
* Fri Mar 31 2017 Neal Gompa <ngompa13@gmail.com> - 1.13.21-1
ebb6c93
- Update to 1.13.21
ebb6c93
- Drop merged patches
ebb6c93
- Use correct libexecdir
ebb6c93
- Use correct docdir
ebb6c93
ebb6c93
* Fri Feb 24 2017 Neal Gompa <ngompa13@gmail.com> - 1.13.19-1
ebb6c93
- Update to 1.13.19
ebb6c93
- Bump required libzypp version
ebb6c93
- Backport patch from upstream to fix building tests
ebb6c93
ebb6c93
* Mon Dec 12 2016 Neal Gompa <ngompa13@gmail.com> - 1.13.14-1
ebb6c93
- Update to 1.13.14
ebb6c93
- Bump required libzypp version
ebb6c93
ebb6c93
* Sat Aug 27 2016 Neal Gompa <ngompa13@gmail.com> - 1.13.9-3
ebb6c93
- Bump to rebuild against libzypp-16.2.2-3 to add suserepo support
ebb6c93
ebb6c93
* Thu Aug 25 2016 Neal Gompa <ngompa13@gmail.com> - 1.13.9-2
ebb6c93
- Bump to rebuild against libzypp-16.2.2-2
ebb6c93
ebb6c93
* Wed Aug 24 2016 Neal Gompa <ngompa13@gmail.com> - 1.13.9-1
ebb6c93
- Update to 1.13.9
ebb6c93
- Bump required libzypp version
ebb6c93
ebb6c93
* Fri Jun 10 2016 Neal Gompa <ngompa13@gmail.com> - 1.13.2-1
ebb6c93
- Update to 1.13.2
ebb6c93
ebb6c93
* Tue Apr 26 2016 Neal Gompa <ngompa13@gmail.com> - 1.13.0-2
ebb6c93
- Rebuild against libzypp-15.22.0
ebb6c93
ebb6c93
* Wed Apr  6 2016 Neal Gompa <ngompa13@gmail.com> - 1.13.0-1
ebb6c93
- Update to 1.13.0
ebb6c93
ebb6c93
* Thu Feb  4 2016 Neal Gompa <ngompa13@gmail.com> - 1.12.32-1
ebb6c93
- Update to 1.12.32
ebb6c93
ebb6c93
* Mon Feb  1 2016 Neal Gompa <ngompa13@gmail.com> - 1.12.30-1
ebb6c93
- Initial packaging