# # Conditional build: # - protocols %bcond_without bittorrent # BitTorrent protocol support %bcond_without curl # FTPes, SFTP, HTTP/2, etc. %bcond_with fsp # FSP support %bcond_without idn # International Domain Names support %bcond_without ipv6 # IPv6 support %bcond_with smb # smb protocol support (non-distib: recent libsmbclient is GPL v3) %bcond_with gnutls # GNUTLS-based SSL support (instead of openssl) %bcond_without openssl # OpenSSL-based SSL support # - content %bcond_without cgi # Local CGI support %bcond_without brotli # Brotli compression support %bcond_without js # experimental (yet quite usable) JavaScript support (using quickjs) %bcond_with libcss # libcss support %bcond_with lzma # LZMA support (old API, incompatible with xz-libs) %bcond_without zstd # zstd compression support # - scripting %bcond_with guile # Guile scripting support (non-distrib: guile 2 is LGPL v3+) %bcond_without lua # Lua scripting %bcond_with perl # Perl scripting %bcond_with python # Python scripting support %bcond_with ruby # (experimental) Ruby scripting support # - display and UI %bcond_without 256 # 256 colors support %bcond_without led # LEDs %bcond_with sixel # image display support in SIXEL capable terminals %bcond_without truecolor # true color %bcond_with x # Use the X Window System # - misc %bcond_without verbose # verbose build (V=1) %bcond_without libevent # build without libevent %if %{with gnutls} %undefine with_openssl %endif %if %{without libcss} %undefine with_js %endif %if 0%{!?mkrel:1} %define mkrel(c) %{1}%{?dist} %endif Summary: Experimental Links (text WWW browser) Summary(eo): Eksperimenta variaĵo de la tekstreĝima TTT-legilo Links 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.17.1.1 Release: %mkrel 1 License: GPL v2 Group: Applications/Networking Source0: https://github.com/rkd77/elinks/releases/download/v%{version}/%{name}-%{version}.tar.xz # Source0-md5: 6bb43cd9037ad83cded1df85d95dbd73 Source1: %{name}.desktop Source2: elinks.png # Prevent crash when HOME is unset (bug #90663). Patch0: 0000-elinks-0.15.0-ssl-noegd.patch # UTF-8 by default Patch1: 0001-elinks-0.15.1-utf_8_io-default.patch # Make getaddrinfo call use AI_ADDRCONFIG. Patch3: elinks-0.11.0-getaddrinfo.patch # Don't put so much information in the user-agent header string (bug #97273). Patch4: 0004-elinks-0.15.0-sysname.patch # Fix xterm terminal: "Linux" driver seems better than "VT100" (#128105) Patch5: 0005-elinks-0.15.0-xterm.patch # let list_is_singleton() return false for an empty list (#1075415) Patch15: elinks-0.12pre6-list_is_singleton.patch #Patch101: crlf.patch URL: http://www.elinks.cz/ BuildRequires: pkgconfig(bzip2) %{?with_curl:BuildRequires: curl-devel} BuildRequires: pkgconfig(expat) %{?with_fsp:BuildRequires: fsplib-devel} BuildRequires: gettext BuildRequires: git-core %{?with_gnutls:BuildRequires: gnutls-devel >= 1.2.5} BuildRequires: gpm-devel %{?with_guile:BuildRequires: guile-devel} %{?with_libcss:BuildRequires: libCSS-devel >= 0.9.2} BuildRequires: libstdc++-devel %{?with_js:BuildRequires: sqlite3-devel} %{?with_brotli:BuildRequires: (libbrotli-devel or brotli-devel)} %if %{with js} || %{with libcss} BuildRequires: libdom-devel >= 0.4.2 %endif %{?with_libevent:BuildRequires: libevent-devel} %{?with_idn:BuildRequires: libidn2-devel} %{?with_sixel:BuildRequires: libsixel-devel} %{?with_smb:BuildRequires: libsmbclient-devel} %{?with_lua:BuildRequires: pkgconfig(lua)} %{?with_lzma:BuildRequires: lzma-devel} BuildRequires: meson BuildRequires: ncurses-devel >= 5.1 BuildRequires: (ninja >= 1.5 or ninja-build >= 1.5) BuildRequires: gcc, gcc-c++ %{?with_openssl:BuildRequires: openssl-devel >= 0.9.7d} %{?with_perl:BuildRequires: perl-devel} BuildRequires: pkgconfig %{?with_python:BuildRequires: python3-devel} %{?with_js:BuildRequires: quickjs-devel >= 20210327-4} %{?with_ruby:BuildRequires: ruby-devel} BuildRequires: sed BuildRequires: tar BuildRequires: pkgconfig(tre) BuildRequires: which BuildRequires: xmlto BuildRequires: xz BuildRequires: zlib-devel BuildRequires: perl(autouse),perl(locale) %{?with_zstd:BuildRequires: pkgconfig(libzstd)} %{?with_gnutls:Requires: (gnutls-libs >= 1.2.5 or libgnutls >= 1.2.5)} %{?with_libcss:Requires: libCSS >= 0.9.2} %if %{with js} || %{with libcss} Requires: libdom >= 0.4.2 %endif Requires: ncurses >= 5.1 %{?with_openssl:Requires: openssl >= 0.9.7d} %{?with_js:Requires: quickjs >= 20210327-4} Suggests: mailcap Provides: felinks = %{version}-%{release} Provides: webclient BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define _sysconfdir /etc/elinks %define specflags_ia32 -fomit-frame-pointer %description This is the elinks tree - intended to provide feature-rich version of links, however not rock-stable and dedicated mainly for testing. Its purpose is to make alternative to links, until Mikulas will have some time to maintain it, and to test and tune various patches for Mikulas to be able to include them in the official links releases. %description -l eo Eksperimenta variaĵo de la tekstreĝima TTT-legilo Links. Ĝi kapablas montri tabelojn, fone elŝuti kaj uzi persistajn HTTP/1.1-konektojn. %description -l es.UTF-8 Links es un browser WWW modo texto, similar al Lynx. El links muestra tablas, hace baja archivos en segundo plano, y usa conexiones HTTP/1.1 keepalive. %description -l pl.UTF-8 Bogata w opcje i możliwości wersja tekstowej przeglądarki WWW - links. elinks jednak jest dedykowana głównie do testowania. %description -l pt_BR.UTF-8 Links é um browser WWW modo texto, similar ao Lynx. O Links exibe tabelas, baixa arquivos em segundo plano, e usa as conexões HTTP/1.1 keepalive. %prep %autosetup -p1 %build %meson \ -Dapidoc=false \ -Dhtmldoc=true \ -Dpdfdoc=false \ -Ddocdir=%{_docdir}/%{name}-%{version} \ %{?with_bittorrent:-Dbittorrent=true} \ %{?with_cgi:-Dcgi=true} \ -D88-colors=true \ %{?with_256:-D256-colors=true} \ %{?with_truecolor:-Dtrue-color=true} \ -Dexmode=true \ %{?debug:-Ddebug=true} \ %{!?debug:-Dfastmem=true} \ -Dfinger=true \ %{?with_fsp:-Dfsp=true} \ %{!?with_fsp:-Dfsp=false} \ -Dgemini=true \ -Dgettext=true \ -Dgopher=true \ -Dhtml-highlight=true \ %{!?with_ipv6:-Dipv6=false} \ %{?with_leds:-Dleds=true} \ %{?with_sixel:-Dlibsixel=true} \ %{!?with_sixel:-Dlibsixel=false} \ -Dmarks=true \ -Dnntp=true \ -Dno-root=false \ %{?with_smb:-Dsmb=true} \ %{?with_brotli:-Dbrotli=true} \ %{?with_zstd:-Dzstd=true} \ %{?with_gnutls:-Dgnutls=true} \ %{?with_guile:-Dguile=true} \ %{!?with_idn:-Didn=false} \ %{?with_lua:-Dluapkg=lua} \ %{?with_lzma:-Dlzma=true} \ %{?with_openssl:-Dopenssl=true} \ %{?with_perl:-Dperl=true} \ %{?with_python:-Dpython=true} \ %{?with_ruby:-Druby=true} \ %{?with_js:-Dquickjs=true} \ %{?with_x:-Dx=true} \ %{?with_libevent:-Dlibevent=true} \ %{!?with_curl:-Dlibcurl=false} \ %{!?with_libcss:-Dlibcss=false} %meson_build %install rm -rf $RPM_BUILD_ROOT %meson_install %if 0%{!?_desktopdir:1} %define _desktopdir %{_datadir}/applications %endif %if 0%{!?_pixmapsdir:1} %define _pixmapsdir %{_datadir}/pixmaps %endif install -d $RPM_BUILD_ROOT%{_desktopdir} \ $RPM_BUILD_ROOT%{_datadir}/%{name} \ $RPM_BUILD_ROOT{%{_sysconfdir},%{_pixmapsdir}} 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}} 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 rm -rf $RPM_BUILD_ROOT %post update-alternatives --install %{_bindir}/links links %{_bindir}/elinks 50 %preun if [ "$1" = "0" ]; then update-alternatives --remove links %{_bindir}/elinks fi %files -f %{name}.lang %defattr(644,root,root,755) %{_docdir}/%{name}-%{version} %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