2 # - package itself defaults to GNUTLS (prefferring over openssl) should we too?
6 %bcond_without ssl # do not use SSL
7 %bcond_with gnutls # use gnutls, otherwise openssl is used when ssl is on
8 # better just preload it instead forcing linking
9 %bcond_with dante # Dante-based SOCKS support
10 # broken currently https://www.dnssec-tools.org/trac/ticket/173
11 %bcond_with dnssec # DNSSEC local validation
14 %define with_openssl 1
17 %if %{with gnutls} && %{with ssl}
18 %undefine with_openssl
21 Summary: Sophisticated command line FTP/HTTP client
22 Summary(ko.UTF-8): 명령줄에서 돌아가는 FTP/HTTP 클라이언트
23 Summary(pl.UTF-8): Zaawansowany klient FTP/HTTP
24 Summary(pt_BR.UTF-8): Sofisticado programa de transferência de arquivos (cliente FTP/HTTP)
25 Summary(zh_CN.UTF-8): lftp 客户端程序
30 Group: Applications/Networking
31 Source0: https://lftp.yar.ru/ftp/%{name}-%{version}.tar.xz
32 # Source0-md5: 1e84dd802bdd4d1be15b8dac9fc9c697
33 Source1: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-man-pages.tar.bz2
34 # Source1-md5: cdad8fb5342eebd9916eccefc98a855b
35 Source2: %{name}.desktop
36 Source3: %{name}-icon.png
37 Patch100: %{name}-git.patch
38 Patch0: %{name}-makefile.patch
39 Patch1: %{name}-m4.patch
41 # when updated attach at https://github.com/lavv17/lftp/issues
42 Patch3: %{name}-pl.po-update.patch
43 Patch4: %{name}-am.patch
44 URL: http://lftp.tech/
45 BuildRequires: autoconf >= 2.60
46 BuildRequires: automake
47 %{?with_dante:BuildRequires: dante-devel}
48 %{?with_dnssec:BuildRequires: dnssec-tools-devel}
49 BuildRequires: expat-devel
50 BuildRequires: gettext-tools >= 0.14.2
51 %{?with_gnutls:BuildRequires: gnutls-devel >= 1.2.5}
52 BuildRequires: libstdc++-devel
53 BuildRequires: libtool >= 1:1.4.2-9
54 BuildRequires: ncurses-devel >= 5.2
55 %{?with_openssl:BuildRequires: openssl-devel >= 0.9.7d}
56 BuildRequires: pkgconfig
57 BuildRequires: readline-devel >= 4.2
58 BuildRequires: tar >= 1:1.22
60 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62 %define _gcc_ver %(%{__cc} -dumpversion | cut -b 1)
64 %define __cxx "%{__cc}"
68 LFTP is a shell-like command line FTP/HTTP client. The main two
69 advantages over other FTP clients are reliability and ability to
70 perform tasks in background. It will reconnect and reget the file
71 being transferred if the connection broke. You can start a transfer in
72 background and continue browsing on the FTP site. It does this all in
73 one process. When you have started background jobs and feel you are
74 done, you can just exit lftp and it automatically moves to nohup mode
75 and completes the transfers. It has also such nice features as reput
78 %description -l pl.UTF-8
79 Lftp jest zaawansowanym klientem FTP/HTTP. Potrafi automatycznie
80 połączyć się z serwerem FTP po zerwanym połączeniu i dokończyć
81 ściąganie archiwów. Lftp może pracować w tle i nie zrywa przy tym
82 połączenia po tym jak się wylogujesz. Program ten honoruje komendy
83 powłoki podczas sesji, np. `ls -al | less` itp. Doskonale się spisuje
84 jako aplikacja do mirrorowania serwerów FTP.
86 %description -l pt_BR.UTF-8
87 O lftp é um programa de transferência de arquivos por linha de
88 comando. Ele suporta os protocolos FTP/HTTP. Suporta: proxy FTP, proxy
89 HTTP, FTP sobre HTTP, opie/skey, transferências fxp, repetição de
90 tentativa automática em erros não-fatais e timeouts, ipv6, socks. Veja
91 o arquivo FEATURES para uma lista mais detalhada.
104 %{!?with_gnutls:echo 'AC_DEFUN([AM_PATH_LIBGNUTLS],[/bin/true])' > m4/gnutls.m4}
112 CXXFLAGS="%{rpmcflags} -fno-rtti -fno-exceptions"
114 --without-included-regex \
115 --with-dnssec-local-validation%{!?with_dnssec:=no} \
117 --with-socksdante%{!?with_dante:=no} \
118 --with%{!?with_openssl:out}-openssl \
119 --with%{!?with_gnutls:out}-gnutls
123 %{?with_tests:%{__make} check}
126 rm -rf $RPM_BUILD_ROOT
127 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_pixmapsdir},%{_desktopdir}}
129 DESTDIR=$RPM_BUILD_ROOT
131 cp -p lftp.conf $RPM_BUILD_ROOT%{_sysconfdir}
132 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}
133 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_pixmapsdir}/lftp.png
135 bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
136 %{__rm} $RPM_BUILD_ROOT%{_mandir}/{README.lftp-man-pages,lftpget.diff}
137 %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.{la,so}
142 rm -rf $RPM_BUILD_ROOT
144 %post -p /sbin/ldconfig
145 %postun -p /sbin/ldconfig
147 %files -f %{name}.lang
148 %defattr(644,root,root,755)
149 %doc README NEWS FAQ FEATURES BUGS ChangeLog TODO
150 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lftp.conf
151 %attr(755,root,root) %{_bindir}/lftp
152 %attr(755,root,root) %{_bindir}/lftpget
153 %attr(755,root,root) %{_libdir}/liblftp*.so.*.*.*
154 %attr(755,root,root) %ghost %{_libdir}/liblftp*.so.0
156 %attr(755,root,root) %{_libdir}/lftp/*.so
157 %attr(755,root,root) %{_datadir}/lftp
158 %{_mandir}/man1/lftp.1*
159 %{_mandir}/man1/lftpget.1*
160 %lang(pl) %{_mandir}/pl/man1/lftpget.1*
161 %{_mandir}/man5/lftp.conf.5*
162 %{_desktopdir}/lftp.desktop
163 %{_pixmapsdir}/lftp.png