website: en/manual.t2t: remove unneeded links from bottom
[dragora.git] / recipes / networking / lynx / recipe
blob6af75784f9a32941b5f2a961778008eec449afbe
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.
17 program=lynx
18 version=2.8.9rel.1
19 pkgversion=2.8.9
20 release=2
22 # Set 'outdir' for a nice and well-organized output directory
23 outdir="${outdir}/${arch}/networking"
25 tarname=${program}${version}.tar.bz2
27 # Remote source(s)
28 fetch=http://invisible-mirror.net/archives/lynx/tarballs/$tarname
30 description="
31 A text browser for the World Wide Web.
33 Lynx is a general purpose distributed information browser for the
34 World Wide Web.
36 Use \"lynx -help\" to display a complete list of current options.
39 homepage=http://lynx.browser.org
40 license=GPLv2+
42 # Source documentation
43 docsdir="${docdir}/${program}-${pkgversion}"
45 # Custom source directory
46 srcdir=${program}${version}
48 build()
50     set -e
52     unpack "${tardir}/$tarname"
54     cd "$srcdir"
56     # Set sane permissions
57     chmod -R u+w,go-w,a+rX-s .
59     ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
60      $configure_args \
61      --sysconfdir=/etc/lynx \
62      --datadir=$docsdir \
63      --mandir=$mandir \
64      --with-zlib \
65      --with-bzlib \
66      --with-ssl \
67      --with-screen=ncursesw \
68      --enable-locale-charset \
69      --enable-ipv6 \
70      --enable-japanese-utf8 \
71      --enable-nested-tables \
72      --build="$(cc -dumpmachine)"
74     make -j${jobs} V=1
75     make -j${jobs} DESTDIR="$destdir" install-full
77     # Tweak configuration file (thanks to BLFS!)
78     sed \
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"
89     then
90         (
91             cd "${destdir}/$mandir"
92             find . -type f -exec lzip -9 '{}' +
93             find . -type l | while read -r file
94             do
95                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
96                 rm -- "$file"
97             done
98         )
99     fi