# TODO: consider lua51
-#
+
# Conditional build:
-%bcond_with x # Use the X Windows System
%bcond_with gnutls # Enable GNUTLS SSL support (disables openssl)
+%bcond_with lzma # Enable lzma support
%bcond_with python # Enable Python scripting support
%bcond_with ruby # Enable (experimental) Ruby scripting support
+%bcond_with smb # Enable smb protocol support (smb requires libsmbclient)
+#The latest libsmbclient is GPLv3, while ELinks is GPL v2 only.
%bcond_with verbose # verbose build (V=1)
+%bcond_with x # Use the X Window System
%bcond_without 256 # Disable 256 colors support
%bcond_without bittorrent # Disable BitTorrent support
%bcond_without cgi # Disable Local CGI support
%bcond_without lua # Disable Lua scripting
%bcond_without openssl # Disable OpenSSL support
%bcond_without perl # Disable Perl scripting
-#
+%bcond_with olderisbetter # variuos pre-0.10.0 behaviour rules (typeahead and esc-esc)
+
%if %{with gnutls}
%undefine with_openssl
%endif
-#
+
Summary: Experimantal Links (text WWW browser)
Summary(es.UTF-8): El links es un browser para modo texto, similar a lynx
Summary(pl.UTF-8): Eksperymentalny Links (tekstowa przeglądarka WWW)
Summary(pt_BR.UTF-8): O links é um browser para modo texto, similar ao lynx
Name: elinks
-Version: 0.11.4
+Version: 0.13
Release: 1
Epoch: 1
-License: GPL
+License: GPL v2
Group: Applications/Networking
-Source0: http://www.elinks.cz/download/%{name}-%{version}.tar.bz2
-# Source0-md5: 88036a518ebc4f1150a7e14b29f9d8db
+# github gives different archive on each download
+# http://www.elinks.cz/download/%{name}-current-%{version}.tar.bz2
+Source0: %{name}-current-%{version}.tar.bz2
+# Source0-md5: efc9918d90cb03a4d1c4d36ef1c36101
Source1: %{name}.desktop
Source2: links.png
Patch0: %{name}-home_etc.patch
Patch1: %{name}-lua40.patch
-Patch2: %{name}-bug517.patch
-Patch3: %{name}-date-format.patch
-Patch4: %{name}-chunked.patch
-Patch5: %{name}-mailcap_DISPLAY.patch
+Patch2: %{name}-date-format.patch
+Patch3: %{name}-old_incremental.patch
+Patch4: %{name}-0.10.0-0.9.3-typeahead-beginning.patch
+Patch5: %{name}-double-esc.patch
URL: http://www.elinks.cz/
-BuildRequires: autoconf
+BuildRequires: autoconf >= 2.61
BuildRequires: automake
BuildRequires: bzip2-devel
BuildRequires: expat-devel
%{?with_fsp:BuildRequires: fsplib-devel}
+#BuildRequires: gc-devel
BuildRequires: gettext-devel
+%{?with_gnutls:BuildRequires: gnutls-devel >= 1.2.5}
BuildRequires: gpm-devel
%{?with_guile:BuildRequires: guile-devel}
-%{?with_gnutls:BuildRequires: gnutls-devel >= 1.2.5}
-%{?with_js:BuildRequires: js-devel >= 1.5-0.rc6a.1}
+#BuildRequires: heimdal-devel
+%{?with_js:BuildRequires: js185-devel}
%{?with_idn:BuildRequires: libidn-devel}
+%{?with_smb:BuildRequires: libsmbclient-devel}
%{?with_lua:BuildRequires: lua50-devel}
+%{?with_lzma:BuildRequires: lzma-devel}
BuildRequires: ncurses-devel >= 5.1
%{?with_openssl:BuildRequires: openssl-devel >= 0.9.7d}
%{?with_perl:BuildRequires: perl-devel}
+BuildRequires: pkgconfig
%{?with_python:BuildRequires: python-devel}
%{?with_ruby:BuildRequires: ruby-devel}
+BuildRequires: tre-devel
+BuildRequires: which
BuildRequires: zlib-devel
Suggests: mailcap
Provides: webclient
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _sysconfdir /etc/elinks
-%define specflags_ia32 -fomit-frame-pointer
+%define specflags_ia32 -fomit-frame-pointer
%description
This is the elinks tree - intended to provide feature-rich version of
keepalive.
%prep
-%setup -q
+%setup -q -n %{name}-%{version}-20120604
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%if %{with olderisbetter}
%patch3 -p1
%patch4 -p1
%patch5 -p1
+%endif
%build
%{__aclocal}
%{__autoconf}
%{__autoheader}
%configure \
- HAVE_SMBCLIENT=yes \
+ %{?with_smb:--enable-smb} \
--disable-no-root \
%{!?debug:--enable-fastmem} \
%{?debug:--enable-debug} \
--enable-finger \
--enable-gopher \
--enable-nntp \
+ --enable-88-colors \
%{?with_256:--enable-256-colors} \
+ --enable-true-color \
--enable-exmode \
%{?with_fsp:--enable-fsp} \
%{?with_leds:--enable-leds} \
%{!?with_js:--without-spidermonkey} \
%{?with_gnutls:--with-gnutls} \
%{!?with_openssl:--without-openssl} \
- --with%{!?with_x:out}-x
+ --with%{!?with_x:out}-x \
+ %{!?with_lzma:--without-lzma}
# xterm -e is default, one might want to change it to
# something else
# --with-xterm="xterm -e"
%{__make} install %{?with_verbose:V=1} \
DESTDIR=$RPM_BUILD_ROOT
-install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
-install %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
+rm $RPM_BUILD_ROOT%{_datadir}/locale/locale.alias
+
+cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
+cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
%{?with_lua:install contrib/lua/*.lua $RPM_BUILD_ROOT%{_sysconfdir}}
%files -f %{name}.lang
%defattr(644,root,root,755)
-%doc AUTHORS BUGS ChangeLog NEWS README SITES TODO
-%doc contrib/{keybind*,wipe-out-ssl*,lua/elinks-remote}
-%doc contrib/conv/{*awk,*.pl,*.sh}
-%doc doc/html/*.html
-%attr(755,root,root) %{_bindir}/*
-%{_mandir}/man*/*
-%{_desktopdir}/*.desktop
-%{_pixmapsdir}/*
-%{?with_lua:%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}}
+%doc AUTHORS BUGS ChangeLog NEWS README SITES TODO doc/html/*.html
+%doc contrib/{keybind*,wipe-out-ssl*,lua/elinks-remote} contrib/conv/{*awk,*.pl,*.sh}
+%attr(755,root,root) %{_bindir}/elinks
+%{_mandir}/man1/elinks.1*
+%{_mandir}/man5/elinks.conf.5*
+%{_mandir}/man5/elinkskeys.5*
+%{_desktopdir}/elinks.desktop
+%{_pixmapsdir}/elinks.png
+%if %{with lua}
+%dir %{_sysconfdir}
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.lua
+%endif