4 %bcond_without bittorrent # BitTorrent protocol support
5 %bcond_without fsp # FSP support
6 %bcond_without idn # Internation Domain Names support
7 %bcond_without ipv6 # IPv6 support
8 %bcond_with smb # smb protocol support (non-distib: recent libsmbclient is GPL v3)
9 %bcond_with gnutls # GNUTLS-based SSL support (instead of openssl)
10 %bcond_without openssl # OpenSSL-based SSL support
12 %bcond_without cgi # Local CGI support
13 %bcond_without brotli # Brotli compression support
14 %bcond_without js # experimental (yet quite usable) JavaScript support (using quickjs)
15 %bcond_with lzma # LZMA support (old API, incompatible with xz-libs)
16 %bcond_without zstd # zstd compression support
18 %bcond_with guile # Guile scripting support (non-distrib: guile 2 is LGPL v3+)
19 %bcond_without lua # Lua scripting
20 %bcond_with perl # Perl scripting
21 %bcond_with python # Python scripting support
22 %bcond_with ruby # (experimental) Ruby scripting support
24 %bcond_without 256 # 256 colors support
25 %bcond_without led # LEDs
26 %bcond_without truecolor # true color
27 %bcond_with x # Use the X Window System
29 %bcond_without verbose # verbose build (V=1)
30 %bcond_without libevent # build without libevent
33 %undefine with_openssl
36 Summary: Experimantal Links (text WWW browser)
37 Summary(es.UTF-8): El links es un browser para modo texto, similar a lynx
38 Summary(pl.UTF-8): Eksperymentalny Links (tekstowa przeglądarka WWW)
39 Summary(pt_BR.UTF-8): O links é um browser para modo texto, similar ao lynx
45 Group: Applications/Networking
46 Source0: https://github.com/rkd77/elinks/releases/download/v%{version}/%{name}-%{version}.tar.xz
47 # Source0-md5: 09ba9bf3f222da893a830f6e27a6cc3d
48 Source1: %{name}.desktop
50 URL: http://www.elinks.cz/
51 BuildRequires: autoconf >= 2.61
52 BuildRequires: automake
53 BuildRequires: bzip2-devel
54 BuildRequires: expat-devel
55 %{?with_fsp:BuildRequires: fsplib-devel}
56 BuildRequires: gettext-tools
57 BuildRequires: git-core
58 %{?with_gnutls:BuildRequires: gnutls-devel >= 1.2.5}
59 BuildRequires: gpm-devel
60 %{?with_guile:BuildRequires: guile-devel}
61 BuildRequires: libstdc++-devel
62 %{?with_js:BuildRequires: libxml++5-devel >= 5.0.1-2}
63 BuildRequires: rpmbuild(macros) >= 1.736
64 %{?with_js:BuildRequires: sqlite3-devel}
65 %{?with_brotli:BuildRequires: libbrotli-devel}
66 %{?with_libevent:BuildRequires: libevent-devel}
67 %{?with_idn:BuildRequires: libidn-devel}
68 %{?with_smb:BuildRequires: libsmbclient-devel}
69 %{?with_lua:BuildRequires: lua53-devel}
70 %{?with_lzma:BuildRequires: lzma-devel}
72 BuildRequires: ncurses-devel >= 5.1
73 BuildRequires: ninja >= 1.5
74 %{?with_openssl:BuildRequires: openssl-devel >= 0.9.7d}
75 %{?with_perl:BuildRequires: perl-devel}
76 BuildRequires: pkgconfig
77 %{?with_python:BuildRequires: python3-devel}
78 %{?with_js:BuildRequires: quickjs-devel >= 20210327-4}
79 %{?with_ruby:BuildRequires: ruby-devel}
81 BuildRequires: tar >= 1:1.22
82 BuildRequires: tre-devel
86 BuildRequires: zlib-devel
87 %{?with_zstd:BuildRequires: zstd-devel}
90 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
92 %define _sysconfdir /etc/elinks
93 %define specflags_ia32 -fomit-frame-pointer
96 This is the elinks tree - intended to provide feature-rich version of
97 links, however not rock-stable and dedicated mainly for testing. Its
98 purpose is to make alternative to links, until Mikulas will have some
99 time to maintain it, and to test and tune various patches for Mikulas
100 to be able to include them in the official links releases.
102 %description -l es.UTF-8
103 Links es un browser WWW modo texto, similar al Lynx. El links muestra
104 tablas, hace baja archivos en segundo plano, y usa conexiones HTTP/1.1
107 %description -l pl.UTF-8
108 Bogata w opcje i możliwości wersja tekstowej przeglądarki WWW - links.
109 elinks jednak jest dedykowana głównie do testowania.
111 %description -l pt_BR.UTF-8
112 Links é um browser WWW modo texto, similar ao Lynx. O Links exibe
113 tabelas, baixa arquivos em segundo plano, e usa as conexões HTTP/1.1
124 -Ddocdir=%{_docdir}/%{name}-%{version} \
125 %{?with_bittorrent:-Dbittorrent=true} \
126 %{?with_cgi:-Dcgi=true} \
128 %{?with_256:-D256-colors=true} \
129 %{?with_truecolor:-Dtrue-color=true} \
131 %{?debug:-Ddebug=true} \
132 %{!?debug:-Dfastmem=true} \
134 -Dfsp=%{__true_false fsp} \
138 -Dhtml-highlight=true \
139 %{!?with_ipv6:-Dipv6=false} \
140 %{?with_leds:-Dleds=true} \
144 %{?with_smb:-Dsmb=true} \
145 %{?with_brotli:-Dbrotli=true} \
146 %{?with_zstd:-Dzstd=true} \
147 %{?with_gnutls:-Dgnutls=true} \
148 %{?with_guile:-Dguile=true} \
149 %{!?with_idn:-Didn=false} \
150 %{?with_lua:-Dluapkg=lua5.3} \
151 %{?with_lzma:-Dlzma=true} \
152 %{?with_openssl:-Dopenssl=true} \
153 %{?with_perl:-Dperl=true} \
154 %{?with_python:-Dpython=true} \
155 %{?with_ruby:-Druby=true} \
156 %{?with_js:-Dquickjs=true} \
157 %{?with_x:-Dx=true} \
158 %{?with_libevent:-Dlibevent=true}
160 %ninja_build -C build
163 rm -rf $RPM_BUILD_ROOT
164 %ninja_install -C build
166 install -d $RPM_BUILD_ROOT%{_desktopdir} \
167 $RPM_BUILD_ROOT%{_datadir}/%{name} \
168 $RPM_BUILD_ROOT{%{_sysconfdir},%{_pixmapsdir}}
170 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
171 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
173 %{?with_lua:install contrib/lua/*.lua $RPM_BUILD_ROOT%{_sysconfdir}}
174 sed -i -e 's|bin/lua|bin/lua5.3|g' $RPM_BUILD_ROOT%{_sysconfdir}/*lua
176 install AUTHORS BUGS ChangeLog NEWS README SITES TODO $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
177 install contrib/{keybind*,wipe-out-ssl*,lua/elinks-remote} contrib/conv/{*awk,*.pl,*.sh} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
182 rm -rf $RPM_BUILD_ROOT
184 %files -f %{name}.lang
185 %defattr(644,root,root,755)
186 %{_docdir}/%{name}-%{version}
187 %attr(755,root,root) %{_bindir}/elinks
188 %{_mandir}/man1/elinks.1*
189 %{_mandir}/man5/elinks.conf.5*
190 %{_mandir}/man5/elinkskeys.5*
191 %{_desktopdir}/elinks.desktop
192 %{_pixmapsdir}/elinks.png
195 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.lua