1 # Build recipe for hldig.
3 # Copyright (c) 2020 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 # Exit immediately on any error
21 version=20200127_277e64a3
24 # Define a category for the output of the package name
25 pkgcategory=networking
27 tarname=${program}-${version}.tar.lz
31 https://rsync.dragora.org/current/sources/$tarname
32 https://mirror.cedia.org.ec/dragora/current/sources/$tarname
35 homepage=https://github.com/solbu/hldig
38 Internet search engine software (fork of htdig).
40 The ht://Dig system is a complete world wide web indexing and searching
41 system for a domain or intranet. This system is not meant to replace
42 the need for powerful internet-wide search systems like Lycos, Infoseek,
43 Google and AltaVista. Instead it is meant to cover the search needs for
44 a single company, campus, or even a particular sub section of a web site.
45 As opposed to some WAIS-based or web-server based search engines,
46 ht://Dig can easily span several web servers. The type of these different
47 web servers doesn't matter as long as they understand common protocols
50 ht://Dig was developed at San Diego State University as a way to search
51 the various web servers on the campus network.
53 hl://Dig is a fork of ht://Dig, a world-wide-web search system for an
54 intranet or small internet. See:
61 # Source documentation
62 docs="AUTHORS.md CONDUCT.md CONTRIBUTING.md COPYING ChangeLog \
63 ChangeLog.md README.md STATUS TESTING.md TRANSLATING.md VERSION"
64 docsdir="${docdir}/${program}-${version}"
68 unpack "${tardir}/$tarname"
72 # Set sane permissions
73 chmod -R u+w,go-w,a+rX-s .
76 #rm -f libhtdigphp/config.log libhtdigphp/config.status
78 ./configure CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS" CXXFLAGS="$QICXXFLAGS" \
79 LDFLAGS="$QILDFLAGS" \
81 --libdir=/usr/lib${libSuffix} \
84 --with-cgi-bin-dir=/usr/lib${libSuffix}/cgi-bin \
85 --with-search-dir=/usr/share/doc/${program}-${version}/examples \
86 --with-image-dir=/var/lib/hldig/www \
87 --with-config-dir=/etc/hldig \
88 --with-common-dir=/etc/hldig \
89 --with-database-dir=/var/lib/hldig \
90 --build="$(gcc -dumpmachine)"
93 make -j${jobs} DESTDIR="$destdir" install
95 # Make symlink at usr/bin for hlsearch(1)
97 cd "${destdir}/usr/bin"
98 ln -sf /usr/lib${libSuffix}/cgi-bin/hlsearch .
101 # Make symlinks for compatibility with htdig commands
103 cd "${destdir}/usr/bin"
107 ln -sf hl${name} ht${name}
111 # To handle config files (.new) via graft(1)
113 touch "${destdir}/etc/hldig/.graft-config"
115 # Compress manual pages, copy the documentation
117 lzip -9 "${destdir}/${mandir}"/man?/*.?
119 mkdir -p "${destdir}${docsdir}"
120 cp -p $docs "${destdir}${docsdir}"