lkundrak / rpms / zypper

Forked from rpms/zypper 5 years ago
Clone

Blame zypper.spec

1eeac97
%global min_libzypp_ver 17.8.1
ebb6c93
ebb6c93
Name:           zypper
1eeac97
Version:        1.14.15
0457600
Release:        1%{?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
1eeac97
# Make zypper-log Python 3 compatible
1eeac97
# From: https://github.com/openSUSE/zypper/pull/217
1eeac97
Patch0101:      0001-zypper-log-Make-Python-3-compatible.patch
1eeac97
0457600
BuildRequires:  %{_bindir}/asciidoctor
0457600
BuildRequires:  %{_bindir}/xsltproc
ebb6c93
BuildRequires:  cmake
ef835fc
BuildRequires:  gcc
ef835fc
BuildRequires:  gcc-c++
ef835fc
BuildRequires:  perl-generators
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
ebb6c93
Requires:       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)
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
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
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
f9401da
%cmake . -B"%{_vpath_builddir}" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DDOC_INSTALL_DIR=%{_docdir}
f9401da
%make_build -C %{_vpath_builddir}
f9401da
%make_build -C %{_vpath_builddir}/po translations
f9401da
%make_build -C %{_vpath_builddir}/tests
ebb6c93
ebb6c93
ebb6c93
%install
f9401da
%make_install -C %{_vpath_builddir}
f9401da
%make_install -C %{_vpath_builddir}/po
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
ebb6c93
# Fix shebang for zypper-log
1eeac97
sed -e "s|/usr/bin/env python|/usr/bin/python3|g" -i %{buildroot}%{_sbindir}/zypper-log
ebb6c93
ebb6c93
# Move the bash completion file
ebb6c93
mkdir -p %{buildroot}%{_datadir}/bash-completion/completions
ebb6c93
mv %{buildroot}%{_sysconfdir}/bash_completion.d/zypper.sh %{buildroot}%{_datadir}/bash-completion/completions/zypper
ebb6c93
rm -rf %{buildroot}%{_sysconfdir}/bash_completion.d/
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
f9401da
ctest -VV .
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
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
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