# Conditional build:
# - protocols
%bcond_without bittorrent # BitTorrent protocol support
+%bcond_without curl # FTPes, SFTP, HTTP/2, etc.
%bcond_without fsp # FSP support
%bcond_without idn # Internation Domain Names support
%bcond_without ipv6 # IPv6 support
%bcond_without cgi # Local CGI support
%bcond_without brotli # Brotli compression support
%bcond_without js # experimental (yet quite usable) JavaScript support (using quickjs)
+%bcond_without libcss # libcss support
%bcond_with lzma # LZMA support (old API, incompatible with xz-libs)
%bcond_without zstd # zstd compression support
# - scripting
# - display and UI
%bcond_without 256 # 256 colors support
%bcond_without led # LEDs
+%bcond_without sixel # image display support in SIXEL capable terminals
%bcond_without truecolor # true color
%bcond_with x # Use the X Window System
# - misc
%undefine with_openssl
%endif
+%if %{without libcss}
+%undefine with_js
+%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.15.0
-Release: 2
+Version: 0.17.0
+Release: 1
Epoch: 1
License: GPL v2
Group: Applications/Networking
Source0: https://github.com/rkd77/elinks/releases/download/v%{version}/%{name}-%{version}.tar.xz
-# Source0-md5: 8fe2e81d2cea75f57cd3cf9bdda6821b
+# Source0-md5: 6bb43cd9037ad83cded1df85d95dbd73
Source1: %{name}.desktop
Source2: links.png
URL: http://www.elinks.cz/
-BuildRequires: autoconf >= 2.61
-BuildRequires: automake
BuildRequires: bzip2-devel
+%{?with_curl:BuildRequires: curl-devel}
BuildRequires: expat-devel
%{?with_fsp:BuildRequires: fsplib-devel}
BuildRequires: gettext-tools
%{?with_gnutls:BuildRequires: gnutls-devel >= 1.2.5}
BuildRequires: gpm-devel
%{?with_guile:BuildRequires: guile-devel}
+%{?with_libcss:BuildRequires: libCSS-devel >= 0.9.1}
BuildRequires: libstdc++-devel
-%{?with_js:BuildRequires: libxml++5-devel >= 5.0.1-2}
BuildRequires: rpmbuild(macros) >= 1.736
%{?with_js:BuildRequires: sqlite3-devel}
%{?with_brotli:BuildRequires: libbrotli-devel}
+%if %{with js} || %{with libcss}
+BuildRequires: libdom-devel >= 0.4.1
+%endif
%{?with_libevent:BuildRequires: libevent-devel}
-%{?with_idn:BuildRequires: libidn-devel}
+%{?with_idn:BuildRequires: libidn2-devel}
+%{?with_sixel:BuildRequires: libsixel-devel}
%{?with_smb:BuildRequires: libsmbclient-devel}
%{?with_lua:BuildRequires: lua53-devel}
%{?with_lzma:BuildRequires: lzma-devel}
BuildRequires: tar >= 1:1.22
BuildRequires: tre-devel
BuildRequires: which
+BuildRequires: xmlto
BuildRequires: xz
BuildRequires: zlib-devel
%{?with_zstd:BuildRequires: zstd-devel}
+%{?with_gnutls:Requires: gnutls-libs >= 1.2.5}
+%{?with_libcss:Requires: libCSS >= 0.9.1}
+%if %{with js} || %{with libcss}
+Requires: libdom >= 0.4.1
+%endif
+Requires: ncurses >= 5.1
+%{?with_openssl:Requires: openssl >= 0.9.7d}
+%{?with_js:Requires: quickjs >= 20210327-4}
Suggests: mailcap
Provides: webclient
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%build
%meson build \
+ -Dapidoc=false \
+ -Dhtmldoc=true \
+ -Dpdfdoc=false \
+ -Ddocdir=%{_docdir}/%{name}-%{version} \
%{?with_bittorrent:-Dbittorrent=true} \
%{?with_cgi:-Dcgi=true} \
-D88-colors=true \
-Dhtml-highlight=true \
%{!?with_ipv6:-Dipv6=false} \
%{?with_leds:-Dleds=true} \
+ -Dlibsixel=%{__true_false sixel} \
-Dmarks=true \
-Dnntp=true \
-Dno-root=false \
%{?with_ruby:-Druby=true} \
%{?with_js:-Dquickjs=true} \
%{?with_x:-Dx=true} \
- %{?with_libevent:-Dlibevent=true}
+ %{?with_libevent:-Dlibevent=true} \
+ %{!?with_curl:-Dlibcurl=false} \
+ %{!?with_libcss:-Dlibcss=false}
%ninja_build -C build
%{?with_lua:install contrib/lua/*.lua $RPM_BUILD_ROOT%{_sysconfdir}}
sed -i -e 's|bin/lua|bin/lua5.3|g' $RPM_BUILD_ROOT%{_sysconfdir}/*lua
+install AUTHORS BUGS ChangeLog NEWS README.md SITES TODO $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
+install contrib/{keybind*,wipe-out-ssl*,lua/elinks-remote} contrib/conv/{*awk,*.pl,*.sh} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
+
%find_lang %{name}
%clean
%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} contrib/conv/{*awk,*.pl,*.sh}
+%{_docdir}/%{name}-%{version}
%attr(755,root,root) %{_bindir}/elinks
%{_mandir}/man1/elinks.1*
%{_mandir}/man5/elinks.conf.5*