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