# Conditional build:
%bcond_without ssl # do not use SSL
%bcond_with gnutls # use gnutls, otherwise openssl is used when ssl is on
-
+%bcond_without dante # Dante-based SOCKS support
+# broken currently https://www.dnssec-tools.org/trac/ticket/173
+%bcond_with dnssec # DNSSEC local validation
+#
%if %{with ssl}
%define with_openssl 1
%endif
Summary(pt_BR.UTF-8): Sofisticado programa de transferência de arquivos (cliente FTP/HTTP)
Summary(zh_CN.UTF-8): lftp 客户端程序
Name: lftp
-Version: 3.7.0
+Version: 4.4.9
Release: 1
-License: GPL v2+
+License: GPL v3+
Group: Applications/Networking
-Source0: ftp://ftp.yars.free.net/pub/source/lftp/%{name}-%{version}.tar.bz2
-# Source0-md5: 7026dad237434ee35603049b978930df
+Source0: ftp://ftp.yar.ru/pub/source/lftp/%{name}-%{version}.tar.xz
+# Source0-md5: 3cbf1c4c39d2f66358aad7933a5e1d38
Source1: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-man-pages.tar.bz2
# Source1-md5: cdad8fb5342eebd9916eccefc98a855b
Source2: %{name}.desktop
-Patch0: %{name}-home_etc.patch
-Patch1: %{name}-makefile.patch
-Patch2: %{name}-as_needed-fix.patch
+Source3: %{name}-icon.png
+Patch0: %{name}-makefile.patch
+Patch1: %{name}-m4.patch
+Patch2: aliases.patch
+# maintained by me, sent upstream from time to time --qboosh
+Patch3: %{name}-pl.po-update.patch
+Patch4: lftp-4.3.8-gets.patch
+Patch5: %{name}-am.patch
URL: http://lftp.yar.ru/
BuildRequires: autoconf >= 2.60
BuildRequires: automake
+%{?with_dante:BuildRequires: dante-devel}
+%{?with_dnssec:BuildRequires: dnssec-tools-devel}
+BuildRequires: expat-devel
BuildRequires: gettext-devel >= 0.14.2
%{?with_gnutls:BuildRequires: gnutls-devel >= 1.2.5}
BuildRequires: libstdc++-devel
BuildRequires: libtool >= 1:1.4.2-9
BuildRequires: ncurses-devel >= 5.2
%{?with_openssl:BuildRequires: openssl-devel >= 0.9.7d}
+BuildRequires: pkgconfig
BuildRequires: readline-devel >= 4.2
+BuildRequires: tar >= 1:1.22
+BuildRequires: xz
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _gcc_ver %(%{__cc} -dumpversion | cut -b 1)
%prep
%setup -q
-#%%patch0 -p1
+%patch0 -p1
%patch1 -p1
%patch2 -p1
+#%patch3 -p1
+%patch4 -p1
+%patch5 -p1
-rm -f po/stamp-po
+%{__rm} po/stamp-po
%{!?with_gnutls:echo 'AC_DEFUN([AM_PATH_LIBGNUTLS],[/bin/true])' > m4/gnutls.m4}
%{__automake}
CXXFLAGS="%{rpmcflags} -fno-rtti -fno-exceptions"
%configure \
+ --without-included-regex \
+ --with-dnssec-local-validation%{!?with_dnssec:=no} \
--with-modules \
- --with%{!?with_ssl:out}-ssl \
+ --with-socksdante%{!?with_dante:=no} \
--with%{!?with_openssl:out}-openssl \
--with%{!?with_gnutls:out}-gnutls
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_pixmapsdir},%{_desktopdir}}
-
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
-install lftp.conf $RPM_BUILD_ROOT%{_sysconfdir}
-install contrib/lftp-icon.png $RPM_BUILD_ROOT%{_pixmapsdir}/lftp.png
-install %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}
+cp -p lftp.conf $RPM_BUILD_ROOT%{_sysconfdir}
+cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}
+cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_pixmapsdir}/lftp.png
bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
-rm -f $RPM_BUILD_ROOT%{_mandir}/{README.lftp-man-pages,lftpget.diff}
-rm -f $RPM_BUILD_ROOT%{_libdir}/*.{la,so}
+%{__rm} $RPM_BUILD_ROOT%{_mandir}/{README.lftp-man-pages,lftpget.diff}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/*.{la,so}
%find_lang %{name}
%{_mandir}/man1/lftp.1*
%{_mandir}/man1/lftpget.1*
%lang(pl) %{_mandir}/pl/man1/lftpget.1*
+%{_mandir}/man5/lftp.conf.5*
%{_desktopdir}/lftp.desktop
%{_pixmapsdir}/lftp.png