File lftp.spec of Package lftp

# spec file for package lftp (Version 4.1.1)
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           lftp
Version:        4.1.1
Release:        1
License:        GPLv2+
Summary:        Command Line File Transfer Program
Group:          Productivity/Networking/Ftp/Clients
Source:         %{name}-%{version}.tar.bz2
Patch2:         lftp-wrapper.patch
Patch3:         lftp-compat-mode.patch
Patch4:         lftp-missing-sentinel.patch
BuildRequires:  gcc-c++
BuildRequires:  gnutls-devel
BuildRequires:  libstdc++-devel
BuildRequires:  openssl-devel
BuildRequires:  pkg-config
BuildRequires:  readline-devel
BuildRequires:  update-alternatives
PreReq:         coreutils
PreReq:         update-alternatives
Provides:       nkitb:/usr/bin/ftp
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Conflicts:      ftp

LFTP is a reliable shell-like command line FTP client. It can retry
operations and does reget automatically. It can do several transfers
simultaneously in the background. With LFTP, you can start a transfer
in the background and continue browsing that FTP site or another one.
This is all done in one process. Background jobs are completed in nohup
mode if you exit or close the modem connection. LFTP has reput, mirror,
and reverse mirror among its features. Since version 2.0, it also
supports the HTTP protocol. Other features include IPV6 support,
context sensitive completion, output redirection to files or to pipe,
FTP and HTTP proxy support, transfer rate throttling for each
connection and for all connections in sum, job queueing, job execution
at specified times, opie and skey support in the FTP protocol, SSL for
HTTP and FTP, and FXP transfers.

%setup -q

autoreconf -fi
CFLAGS="-DUSE_VARARGS -DPREFER_STDARG %{optflags} -fstack-protector" \
CXXFLAGS="-DUSE_VARARGS -DPREFER_STDARG %{optflags} -fstack-protector" \
%configure \
make %{?jobs:-j%jobs}

touch %{buildroot}%{_bindir}/ftp
chmod +x %{buildroot}%{_bindir}/ftp
# We don't package the .la files
rm -f %{buildroot}%{_libdir}/{lftp/*/,}*.la
%find_lang %{name}

test -L %{_bindir}/ftp || rm -f %{_bindir}/ftp
update-alternatives --install  %{_bindir}/ftp ftp %{_bindir}/lftp_wrapper 5 \
  --slave %{_mandir}/man1/ftp.1.gz ftp.1 %{_mandir}/man1/lftp.1.gz
update-alternatives --auto ftp

%postun -p /sbin/ldconfig

if [ $1 -eq 0 ]; then
  update-alternatives --remove ftp %{_bindir}/lftp_wrapper

%files -f %{name}.lang
%config %{_sysconfdir}/lftp.conf
%ghost %{_bindir}/ftp
%dir %{_libdir}/lftp
%dir %{_libdir}/lftp/%{version}

rm -rf %{buildroot}

openSUSE Build Service is sponsored by