Add conditional for using wget2 as wget
This commit is contained in:
parent
d5e55c2998
commit
2b3430b513
33
wget2.spec
33
wget2.spec
@ -1,3 +1,5 @@
|
||||
%bcond as_wget 0
|
||||
|
||||
%global somajor 2
|
||||
|
||||
Name: wget2
|
||||
@ -22,6 +24,7 @@ BuildRequires: make
|
||||
|
||||
# Documentation build requirements
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: git-core
|
||||
BuildRequires: pandoc
|
||||
|
||||
# Wget2 build requirements
|
||||
@ -50,6 +53,7 @@ BuildRequires: pkgconfig(zlib)
|
||||
BuildRequires: lcov
|
||||
BuildRequires: lzip
|
||||
|
||||
Provides: webclient
|
||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description
|
||||
@ -80,6 +84,22 @@ Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
Development libraries and headers needed for building applications to
|
||||
use functionality from GNU Wget2.
|
||||
|
||||
%if %{with as_wget}
|
||||
%package wget
|
||||
Summary: %{name} shim to provide wget
|
||||
Conflicts: wget < 2
|
||||
Obsoletes: wget < 2
|
||||
Provides: wget = %{version}-%{release}
|
||||
Provides: wget%{?_isa} = %{version}-%{release}
|
||||
# From original wget package
|
||||
Provides: webclient
|
||||
|
||||
%description wget
|
||||
This package provides the shim links for %{name} to be automatically
|
||||
used in place of wget. This ensures that %{name} is used as
|
||||
the system provider of wget.
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
|
||||
@ -102,6 +122,11 @@ find %{buildroot} -type f -name "*.la" -delete -print
|
||||
# Delete useless noinstall binary
|
||||
rm -v %{buildroot}%{_bindir}/%{name}_noinstall
|
||||
|
||||
%if %{with as_wget}
|
||||
ln -sr %{buildroot}%{_bindir}/%{name} %{buildroot}%{_bindir}/wget
|
||||
# Link wget(1) to wget2(1)
|
||||
echo ".so man1/%{name}.1" > %{buildroot}%{_mandir}/man1/wget.1
|
||||
%endif
|
||||
|
||||
%check
|
||||
%make_build check
|
||||
@ -124,9 +149,17 @@ rm -v %{buildroot}%{_bindir}/%{name}_noinstall
|
||||
%{_libdir}/pkgconfig/libwget.pc
|
||||
%{_mandir}/man3/libwget*.3*
|
||||
|
||||
%if %{with as_wget}
|
||||
%files wget
|
||||
%{_bindir}/wget
|
||||
%{_mandir}/man1/wget.1*
|
||||
%endif
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Sep 01 2023 Neal Gompa <ngompa@fedoraproject.org> - 2.1.0-1
|
||||
- New upstream version
|
||||
- Add conditional for using wget2 as wget
|
||||
|
||||
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
Loading…
Reference in New Issue
Block a user