summaryrefslogtreecommitdiff
path: root/wget.spec
blob: 92dfa38d64e281cd60007158fc670743795bf70a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
# TODO
# - add --delete-remote patches:
#  - http://wget-bugs.ferrara.linux.it/issue9
#  - or http://osdir.com/ml/web.wget.patches/2005-09/msg00006.html
# - add http://article.gmane.org/gmane.comp.web.wget.patches/2333
#
# Conditional build:
%bcond_without	tests	# check target
%bcond_without	metalink # build without metalink support
%bcond_with	gnutls	# use GnuTLS (wget default) instead of OpenSSL

Summary:	A utility for retrieving files using the HTTP or FTP protocols
Summary(es.UTF-8):	Cliente en línea de comando para bajar archivos WWW/FTP con recursión opcional
Summary(fr.UTF-8):	Un utilitaire pour recuperer des fichiers en utilisant les protocoles HTTP ou FTP
Summary(pl.UTF-8):	Wsadowy klient HTTP/FTP
Summary(pt_BR.UTF-8):	Cliente na linha de comando para baixar arquivos WWW/FTP com recursão opcional
Summary(ru.UTF-8):	Утилита для получения файлов по протоколам HTTP и FTP
Summary(uk.UTF-8):	Утиліта для отримання файлів по протоколам HTTP та FTP
Summary(zh_CN.UTF-8):	[通讯]功能强大的下载程序,支持断点续传
Name:		wget
Version:	1.21.4
Release:	2
License:	GPL v3+ with OpenSSL exception
Group:		Networking/Utilities
Source0:	http://ftp.gnu.org/gnu/wget/%{name}-%{version}.tar.lz
# Source0-md5:	6d4ab603f1b905b6856a111c61078740
Source1:	http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
# Source1-md5:	d8b2b56ec7461606c22edbafaf8a418f
Patch0:		%{name}-info.patch
Patch1:		%{name}-wgetrc_path.patch
Patch2:		%{name}-home_etc.patch
Patch3:		%{name}-ssl-certs.patch
Patch4:		user.xdg.origin.url.patch
Patch5:		gnupg-2.4.1-tests.patch
URL:		http://www.gnu.org/software/wget/
BuildRequires:	autoconf >= 2.64
BuildRequires:	autoconf-archive
BuildRequires:	automake >= 1:1.9
BuildRequires:	gettext-tools >= 0.21
# >= 3.6.3 for TLSv1.3
%{?with_gnutls:BuildRequires:	gnutls-devel >= 3.0.16}
%{?with_metalink:BuildRequires:	gpgme-devel >= 0.4.2}
BuildRequires:	libidn2-devel >= 0.14.0
%{?with_metalink:BuildRequires:	libmetalink-devel}
BuildRequires:	libpsl-devel >= 0.16.0
BuildRequires:	libuuid-devel
BuildRequires:	lzip
# >= 1.1.0 for TLSv1.3
%{!?with_gnutls:BuildRequires:	openssl-devel >= 1.0.1}
BuildRequires:	pcre2-8-devel
BuildRequires:	perl-devel
BuildRequires:	pkgconfig
BuildRequires:	tar >= 1:1.22
BuildRequires:	texinfo
BuildRequires:	zlib-devel
%if %{with tests}
BuildRequires:	perl-HTTP-Daemon
BuildRequires:	perl-HTTP-Message
BuildRequires:	perl-IO-Socket-SSL
BuildRequires:	python3-modules >= 1:3.0
%endif
Provides:	webclient
%{?with_gnutls:Requires:	gnutls-libs >= 3.0.16}
%{!?with_gnutls:Requires:	openssl >= 1.0.1}
Requires:	libidn2 >= 0.14.0
Requires:	libpsl >= 0.16.0
BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)

%define		_noautoreqfiles		%{_bindir}/rmold

%description
GNU Wget is a file retrieval utility which can use either the HTTP or
FTP protocols. Wget features include the ability to work in the
background while you're logged out, recursive retrieval of
directories, file name wildcard matching, remote file timestamp
storage and comparison, use of Rest with FTP servers and Range with
HTTP servers to retrieve files over slow or unstable connections,
support for Proxy servers, and configurability.

%description -l es.UTF-8
GNU wget es una herramienta de red para bajar archivos usando HTTP y
FTP. Funciona en modo no interactivo, pudiendo trabajar en background.
Funciona muy bien, incluso en conexiones lentas o inestables, bajando
el archivo hasta que sea completamente recibido.

%description -l fr.UTF-8
GNU Wget est un utilitaire pour récupérer des fichiers qui peut
utiliser indifféremment les protocoles HTTP ou FTP. Parmi les
caractéristiques de Wget, citons la capacité à récupérer des fichiers
en arrière-plan alors que vous n'êtes pas connecté, la récupération
récursive de répertoires, la capacité de récupérer des fichiers en
appliquant un filtre sur le nom ou sur la date, la gestion de Rest
avec les serveurs FTP et de Range avec les serveurs HTTP pour
récupérer des fichiers avec une connexion lente ou instable, le
support des serveurs Proxy... Wget est particulièrement configurable.

%description -l ja.UTF-8
GNU wget は HTTP か FTP プロトコルのどちらかを使用することができる
ファイルを取得するユーティリティです。wget はログアウトしている
間にバックグラウンドで働く特徴をもっていること、ディレクトリの再帰的
取得、ファイルネームのワイルドカードマッチング、ファイルのタイムスタンプの
保存と比較、遅く不安定な接続で FTP サーバの Rest と HTTP サーバの
Range の使用、プロキシーサーバのサポートと設定の容易さを含んだ特徴を
もっています。

%description -l pl.UTF-8
Wget jest klientem FTP/HTTP przeznaczonym do ściągania zasobów
wsadowo. Umożliwia ściąganie zasobów z podkatalogami, a także ma opcje
umożliwiające wykonanie lokalnej kopii zasobów (mirror). W razie
niemożności dostania się do zasobów lub gdy połączenie z serwerem
FTP/HTTP zostanie zerwane, może automatycznie ponawiać próby
kopiowania. Jest także dobrze przystosowany do tego, żeby uruchamiać
go jako zadanie z crona.

%description -l pt_BR.UTF-8
O GNU wget é uma ferramenta de rede para baixar arquivos usando HTTP e
FTP. Ele funciona em modo não interativo, podendo trabalhar em
background. Funciona muito bem, mesmo em conexões lentas ou instáveis,
baixando o arquivo até que ele seja completamente recebido.

%description -l ru.UTF-8
GNU Wget - это утилита командной строки для получения файлов по
протоколам FTP и HTTP. Среди возможностей Wget - работа в фоновом
режиме когда вы выходите из системы, рекурсивное извлечение каталогов,
выбор файлов по шаблону, сравнение времени удаленных и локальных
файлов, сохранение времени удаленных файлов при загрузке,
использование REST с FTP серверами и Range с HTTP серверами для
загрузки файлов по медленным или нестабильным каналам, поддержка Proxy
серверов, конфигурируемость.

%description -l uk.UTF-8
GNU Wget - це утиліта командного рядка для отримання файлів по
протоколам FTP та HTTP. Серед можливостей Wget - робота в фоновому
режимі коли ви виходите із системи, рекурсивне отримання каталогів,
вибір файлів по шаблону, порівняння часу віддалених та локальних
файлів, збереження часу віддалених файлів при завантаженні,
використання REST з FTP серверами та Range з HTTP серверами для
завантаження файлів по повільним чи нестабільним каналам, підтримка
Proxy серверів, настроюваність.

%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1

%{__rm} doc/wget.info doc/sample.wgetrc.munged_for_texi_inclusion po/stamp-po

# temp hack for 1.13.4
test -e build-aux/bzr-version-gen || cat <<EOF > build-aux/bzr-version-gen
#!/bin/sh
echo -n %{version}
EOF
chmod +x build-aux/bzr-version-gen

%{__sed} -i -e '1s,/usr/bin/env perl,%{__perl},' util/rmold.pl

%build
%{__gettextize}
%{__aclocal} -I m4
%{__autoheader}
%{__autoconf}
%{__automake}
%configure \
	--enable-digest \
	--enable-ipv6 \
	--enable-iri \
	--enable-largefile \
	--enable-nls \
	--enable-ntlm \
	--enable-opie \
	--enable-pcre \
	--disable-silent-rules \
	--disable-year2038 \
	--with-libpsl \
	%{__with_without metalink} \
	--with-ssl%{!?with_gnutls:=openssl} \
	--with-zlib \
	%{nil}
%{__make}
tail -n 6 util/README >rmold.README

# 1.13.4 tarball was buggy and produced empty version.
grep %{version} src/version.c

%{?with_tests:%{__make} check}

%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_sysconfdir}

%{__make} install \
	DESTDIR=$RPM_BUILD_ROOT \
	GETTEXT_PACKAGE=wget

install -p util/rmold.pl $RPM_BUILD_ROOT%{_bindir}/rmold
cp -a doc/sample.wgetrc	$RPM_BUILD_ROOT%{_sysconfdir}/wgetrc

bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
%{__rm} $RPM_BUILD_ROOT%{_mandir}/README*
rm -f $RPM_BUILD_ROOT%{_infodir}/dir

# "wget" and "wget-gnulib" domains
%find_lang %{name} --all-name

%clean
rm -rf $RPM_BUILD_ROOT

%post	-p /sbin/postshell
-/usr/sbin/fix-info-dir -c %{_infodir}

%postun	-p /sbin/postshell
-/usr/sbin/fix-info-dir -c %{_infodir}

%files -f %{name}.lang
%defattr(644,root,root,755)
%doc AUTHORS ChangeLog NEWS README MAILING-LIST rmold.README
%verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/wgetrc
%attr(755,root,root) %{_bindir}/rmold
%attr(755,root,root) %{_bindir}/wget
%{_mandir}/man1/wget.1*
%{_mandir}/hu/man1/wget.1*
%{_mandir}/pl/man1/wget.1*
%{_infodir}/wget.info*