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