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