]> git.pld-linux.org Git - packages/elinks.git/blame - elinks.spec
allow building just without libcss
[packages/elinks.git] / elinks.spec
CommitLineData
fea9e3e9 1#
21bf3c6a 2# Conditional build:
b1e248e0
JB
3# - protocols
4%bcond_without bittorrent # BitTorrent protocol support
80b78d5d 5%bcond_without curl # FTPes, SFTP, HTTP/2, etc.
b1e248e0
JB
6%bcond_without fsp # FSP support
7%bcond_without idn # Internation Domain Names support
8%bcond_without ipv6 # IPv6 support
9%bcond_with smb # smb protocol support (non-distib: recent libsmbclient is GPL v3)
10%bcond_with gnutls # GNUTLS-based SSL support (instead of openssl)
11%bcond_without openssl # OpenSSL-based SSL support
12# - content
13%bcond_without cgi # Local CGI support
612abce5
WF
14%bcond_without brotli # Brotli compression support
15%bcond_without js # experimental (yet quite usable) JavaScript support (using quickjs)
80b78d5d 16%bcond_without libcss # libcss support
b1e248e0 17%bcond_with lzma # LZMA support (old API, incompatible with xz-libs)
612abce5 18%bcond_without zstd # zstd compression support
b1e248e0
JB
19# - scripting
20%bcond_with guile # Guile scripting support (non-distrib: guile 2 is LGPL v3+)
21%bcond_without lua # Lua scripting
612abce5 22%bcond_with perl # Perl scripting
b1e248e0
JB
23%bcond_with python # Python scripting support
24%bcond_with ruby # (experimental) Ruby scripting support
25# - display and UI
26%bcond_without 256 # 256 colors support
27%bcond_without led # LEDs
28%bcond_without truecolor # true color
b1e248e0
JB
29%bcond_with x # Use the X Window System
30# - misc
31%bcond_without verbose # verbose build (V=1)
5f8650b6 32%bcond_without libevent # build without libevent
e0b0004d 33
3d4d38d9
AG
34%if %{with gnutls}
35%undefine with_openssl
36%endif
e0b0004d 37
ade95a80
JP
38%if %{without libcss}
39%undefine with_js
80b78d5d
WF
40%endif
41
17631700 42Summary: Experimantal Links (text WWW browser)
f85cbf5d
ER
43Summary(es.UTF-8): El links es un browser para modo texto, similar a lynx
44Summary(pl.UTF-8): Eksperymentalny Links (tekstowa przeglądarka WWW)
45Summary(pt_BR.UTF-8): O links é um browser para modo texto, similar ao lynx
17631700 46Name: elinks
80b78d5d
WF
47Version: 0.17.0
48Release: 1
e2affc83 49Epoch: 1
d8169248 50License: GPL v2
17631700 51Group: Applications/Networking
612abce5 52Source0: https://github.com/rkd77/elinks/releases/download/v%{version}/%{name}-%{version}.tar.xz
80b78d5d 53# Source0-md5: 6bb43cd9037ad83cded1df85d95dbd73
17631700 54Source1: %{name}.desktop
5a8f1bd1 55Source2: links.png
8ca357a6 56URL: http://www.elinks.cz/
5a8f1bd1 57BuildRequires: bzip2-devel
80b78d5d 58%{?with_curl:BuildRequires: curl-devel}
fcffdc5b 59BuildRequires: expat-devel
b631af97 60%{?with_fsp:BuildRequires: fsplib-devel}
fda44b2d 61BuildRequires: gettext-tools
261ce4dd 62BuildRequires: git-core
e0b0004d 63%{?with_gnutls:BuildRequires: gnutls-devel >= 1.2.5}
17631700 64BuildRequires: gpm-devel
3d4d38d9 65%{?with_guile:BuildRequires: guile-devel}
80b78d5d 66%{?with_libcss:BuildRequires: libCSS-devel >= 0.9.1}
fbbf0870 67BuildRequires: libstdc++-devel
aca21feb 68BuildRequires: rpmbuild(macros) >= 1.736
612abce5 69%{?with_js:BuildRequires: sqlite3-devel}
8c08d917 70%{?with_brotli:BuildRequires: libbrotli-devel}
80b78d5d 71%{?with_js:BuildRequires: libdom-devel >= 0.4.1}
5f8650b6 72%{?with_libevent:BuildRequires: libevent-devel}
695de93c 73%{?with_idn:BuildRequires: libidn2-devel}
505355c8 74%{?with_smb:BuildRequires: libsmbclient-devel}
612abce5 75%{?with_lua:BuildRequires: lua53-devel}
505355c8 76%{?with_lzma:BuildRequires: lzma-devel}
612abce5 77BuildRequires: meson
1c33e430 78BuildRequires: ncurses-devel >= 5.1
fbbf0870 79BuildRequires: ninja >= 1.5
3d4d38d9
AG
80%{?with_openssl:BuildRequires: openssl-devel >= 0.9.7d}
81%{?with_perl:BuildRequires: perl-devel}
f28e64c7 82BuildRequires: pkgconfig
612abce5 83%{?with_python:BuildRequires: python3-devel}
fbbf0870 84%{?with_js:BuildRequires: quickjs-devel >= 20210327-4}
8ca357a6 85%{?with_ruby:BuildRequires: ruby-devel}
612abce5 86BuildRequires: sed
742dfa9f 87BuildRequires: tar >= 1:1.22
42ac557b 88BuildRequires: tre-devel
f28e64c7 89BuildRequires: which
74175628 90BuildRequires: xmlto
742dfa9f 91BuildRequires: xz
5a8f1bd1 92BuildRequires: zlib-devel
612abce5 93%{?with_zstd:BuildRequires: zstd-devel}
307fe94a
JP
94%{?with_gnutls:Requires: gnutls-libs >= 1.2.5}
95%{?with_libcss:Requires: libCSS >= 0.9.1}
96%{?with_js:Requires: libdom >= 0.4.1}
97Requires: ncurses >= 5.1
98%{?with_openssl:Requires: openssl >= 0.9.7d}
99%{?with_js:Requires: quickjs >= 20210327-4}
e1bc1545 100Suggests: mailcap
17631700
AM
101Provides: webclient
102BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
103
c4be24e9 104%define _sysconfdir /etc/elinks
e0b0004d 105%define specflags_ia32 -fomit-frame-pointer
4fc089e9 106
17631700 107%description
cd6ad879
JB
108This is the elinks tree - intended to provide feature-rich version of
109links, however not rock-stable and dedicated mainly for testing. Its
110purpose is to make alternative to links, until Mikulas will have some
111time to maintain it, and to test and tune various patches for Mikulas
112to be able to include them in the official links releases.
17631700 113
3328f371 114%description -l es.UTF-8
c15f1e53 115Links es un browser WWW modo texto, similar al Lynx. El links muestra
116tablas, hace baja archivos en segundo plano, y usa conexiones HTTP/1.1
117keepalive.
118
3328f371
JR
119%description -l pl.UTF-8
120Bogata w opcje i możliwości wersja tekstowej przeglądarki WWW - links.
121elinks jednak jest dedykowana głównie do testowania.
17631700 122
3328f371
JR
123%description -l pt_BR.UTF-8
124Links é um browser WWW modo texto, similar ao Lynx. O Links exibe
125tabelas, baixa arquivos em segundo plano, e usa as conexões HTTP/1.1
c15f1e53 126keepalive.
127
17631700 128%prep
612abce5 129%setup -q
0b57a582 130
17631700 131%build
612abce5 132%meson build \
74175628
WF
133 -Dapidoc=false \
134 -Dhtmldoc=true \
135 -Dpdfdoc=false \
136 -Ddocdir=%{_docdir}/%{name}-%{version} \
612abce5
WF
137 %{?with_bittorrent:-Dbittorrent=true} \
138 %{?with_cgi:-Dcgi=true} \
139 -D88-colors=true \
140 %{?with_256:-D256-colors=true} \
141 %{?with_truecolor:-Dtrue-color=true} \
142 -Dexmode=true \
143 %{?debug:-Ddebug=true} \
144 %{!?debug:-Dfastmem=true} \
145 -Dfinger=true \
ea719f7c 146 -Dfsp=%{__true_false fsp} \
612abce5
WF
147 -Dgemini=true \
148 -Dgettext=true \
149 -Dgopher=true \
150 -Dhtml-highlight=true \
151 %{!?with_ipv6:-Dipv6=false} \
152 %{?with_leds:-Dleds=true} \
153 -Dmarks=true \
154 -Dnntp=true \
155 -Dno-root=false \
156 %{?with_smb:-Dsmb=true} \
157 %{?with_brotli:-Dbrotli=true} \
158 %{?with_zstd:-Dzstd=true} \
159 %{?with_gnutls:-Dgnutls=true} \
160 %{?with_guile:-Dguile=true} \
161 %{!?with_idn:-Didn=false} \
162 %{?with_lua:-Dluapkg=lua5.3} \
163 %{?with_lzma:-Dlzma=true} \
164 %{?with_openssl:-Dopenssl=true} \
165 %{?with_perl:-Dperl=true} \
166 %{?with_python:-Dpython=true} \
167 %{?with_ruby:-Druby=true} \
168 %{?with_js:-Dquickjs=true} \
5f8650b6 169 %{?with_x:-Dx=true} \
80b78d5d
WF
170 %{?with_libevent:-Dlibevent=true} \
171 %{!?with_curl:-Dlibcurl=false} \
172 %{!?with_libcss:-Dlibcss=false}
612abce5
WF
173
174%ninja_build -C build
17631700
AM
175
176%install
177rm -rf $RPM_BUILD_ROOT
612abce5
WF
178%ninja_install -C build
179
1568d5eb 180install -d $RPM_BUILD_ROOT%{_desktopdir} \
ad628403 181 $RPM_BUILD_ROOT%{_datadir}/%{name} \
c4be24e9 182 $RPM_BUILD_ROOT{%{_sysconfdir},%{_pixmapsdir}}
17631700 183
e0b0004d
ER
184cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
185cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
5a8f1bd1 186
ef0f233a 187%{?with_lua:install contrib/lua/*.lua $RPM_BUILD_ROOT%{_sysconfdir}}
612abce5 188sed -i -e 's|bin/lua|bin/lua5.3|g' $RPM_BUILD_ROOT%{_sysconfdir}/*lua
347f019c 189
80b78d5d 190install AUTHORS BUGS ChangeLog NEWS README.md SITES TODO $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
74175628
WF
191install contrib/{keybind*,wipe-out-ssl*,lua/elinks-remote} contrib/conv/{*awk,*.pl,*.sh} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
192
269a2ef7 193%find_lang %{name}
194
17631700
AM
195%clean
196rm -rf $RPM_BUILD_ROOT
197
269a2ef7 198%files -f %{name}.lang
17631700 199%defattr(644,root,root,755)
74175628 200%{_docdir}/%{name}-%{version}
c20ec49a
JB
201%attr(755,root,root) %{_bindir}/elinks
202%{_mandir}/man1/elinks.1*
203%{_mandir}/man5/elinks.conf.5*
204%{_mandir}/man5/elinkskeys.5*
205%{_desktopdir}/elinks.desktop
206%{_pixmapsdir}/elinks.png
207%if %{with lua}
208%dir %{_sysconfdir}
209%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.lua
210%endif
This page took 0.430247 seconds and 4 git commands to generate.