1 # Build recipe for lynx.
3 # Copyright (c) 2016-2018 Matias Fonzo, <selk@dragora.org>.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
22 # Set 'outdir' for a nice and well-organized output directory
23 outdir="${outdir}/${arch}/networking"
25 tarname=${program}${version}.tar.bz2
28 fetch=http://invisible-mirror.net/archives/lynx/tarballs/$tarname
31 A text browser for the World Wide Web.
33 Lynx is a general purpose distributed information browser for the
36 Use \"lynx -help\" to display a complete list of current options.
39 homepage=http://lynx.browser.org
42 # Source documentation
43 docsdir="${docdir}/${program}-${pkgversion}"
45 # Custom source directory
46 srcdir=${program}${version}
52 unpack "${tardir}/$tarname"
56 # Set sane permissions
57 chmod -R u+w,go-w,a+rX-s .
59 ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
61 --sysconfdir=/etc/lynx \
67 --with-screen=ncursesw \
68 --enable-locale-charset \
70 --enable-japanese-utf8 \
71 --enable-nested-tables \
72 --build="$(cc -dumpmachine)"
75 make -j${jobs} DESTDIR="$destdir" install-full
77 # Tweak configuration file (thanks to BLFS!)
79 -e '/#LOCALE/ a LOCALE_CHARSET:TRUE' \
80 -e '/#DEFAULT_ED/ a DEFAULT_EDITOR:vi' \
81 -e '/#PERSIST/ a PERSISTENT_COOKIES:TRUE' \
82 -i "${destdir}/etc/lynx/lynx.cfg"
84 # To handle dow new files via graft(8)
85 touch "${destdir}/etc/lynx/.graft-config"
87 # Compress and link man pages (if needed)
88 if test -d "${destdir}/$mandir"
91 cd "${destdir}/$mandir"
92 find . -type f -exec lzip -9 '{}' +
93 find . -type l | while read -r file
95 ln -sf "$(readlink -- "$file").lz" "${file}.lz"