recipe 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. # Build recipe for hldig.
  2. #
  3. # Copyright (c) 2020, 2022 Matias Fonzo, <selk@dragora.org>.
  4. #
  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
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  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.
  16. # Exit immediately on any error
  17. set -e
  18. program=hldig
  19. version=20210616_9427c9cd
  20. release=2
  21. # Define a category for the output of the package name
  22. pkgcategory=networking
  23. tarname=${program}-${version}.tar.lz
  24. # Remote source(s)
  25. fetch="
  26. https://dragora.mirror.garr.it/current/sources/$tarname
  27. rsync://rsync.dragora.org/current/sources/$tarname
  28. "
  29. homepage=https://github.com/solbu/hldig
  30. description="
  31. Internet search engine software (fork of htdig).
  32. The ht://Dig system is a complete world wide web indexing and searching
  33. system for a domain or intranet. This system is not meant to replace
  34. the need for powerful internet-wide search systems like Lycos, Infoseek,
  35. Google and AltaVista. Instead it is meant to cover the search needs for
  36. a single company, campus, or even a particular sub section of a web site.
  37. As opposed to some WAIS-based or web-server based search engines,
  38. ht://Dig can easily span several web servers. The type of these different
  39. web servers doesn't matter as long as they understand common protocols
  40. like HTTP.
  41. ht://Dig was developed at San Diego State University as a way to search
  42. the various web servers on the campus network.
  43. hl://Dig is a fork of ht://Dig, a world-wide-web search system for an
  44. intranet or small internet. See:
  45. $homepage
  46. "
  47. license=GPLv2+
  48. # Source documentation
  49. docs="AUTHORS.md CONDUCT.md CONTRIBUTING.md COPYING ChangeLog \
  50. ChangeLog.md README.md STATUS TESTING.md TRANSLATING.md VERSION"
  51. docsdir="${docdir}/${program}-${version}"
  52. build()
  53. {
  54. unpack "${tardir}/$tarname"
  55. cd "$srcdir"
  56. # Set sane permissions
  57. chmod -R u+w,go-w,a+rX-s .
  58. #autoreconf -v
  59. #rm -f libhtdigphp/config.log libhtdigphp/config.status
  60. ./configure CPPFLAGS="$QICPPFLAGS" \
  61. CFLAGS="$QICFLAGS" CXXFLAGS="$QICXXFLAGS -std=c++14" \
  62. LDFLAGS="$QILDFLAGS" \
  63. $configure_args \
  64. --libdir=/usr/lib${libSuffix} \
  65. --mandir=$mandir \
  66. --with-gnu-ld \
  67. --with-cgi-bin-dir=/usr/lib${libSuffix}/cgi-bin \
  68. --with-search-dir=/usr/share/doc/${program}-${version}/examples \
  69. --with-image-dir=/var/lib/hldig/www \
  70. --with-config-dir=/etc/hldig \
  71. --with-common-dir=/etc/hldig \
  72. --with-database-dir=/var/lib/hldig \
  73. --build="$(gcc -dumpmachine)"
  74. make -j${jobs} V=1
  75. make -j${jobs} DESTDIR="$destdir" install-strip
  76. # Make symlink at usr/bin for hlsearch(1)
  77. (
  78. cd "${destdir}/usr/bin"
  79. ln -sf /usr/lib${libSuffix}/cgi-bin/hlsearch .
  80. )
  81. # Make symlinks for compatibility with htdig commands
  82. (
  83. cd "${destdir}/usr/bin"
  84. for name in hl*
  85. do
  86. name="${name#hl}"
  87. ln -sf hl${name} ht${name}
  88. done
  89. )
  90. # To handle config files (.new) via graft(1)
  91. touch "${destdir}/etc/hldig/.graft-config"
  92. # Compress manual pages, copy the documentation
  93. lzip -9 "${destdir}/${mandir}"/man?/*.?
  94. mkdir -p "${destdir}/$docsdir"
  95. cp -p $docs "${destdir}/$docsdir"
  96. }