recipe 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. # Build recipe for dialog.
  2. #
  3. # Copyright (c) 2017-2021 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=dialog
  19. version=1.3-20210117
  20. release=1
  21. # Define a category for the output of the package name
  22. pkgcategory=tools
  23. tarname=${program}-${version}.tgz
  24. # Remote source(s)
  25. fetch=https://invisible-mirror.net/archives/dialog/$tarname
  26. description="
  27. Display dialog boxes in scripts.
  28. Dialog is a program that will let you present a variety
  29. of questions or display messages in nice looking color
  30. non-graphical dialog boxes from a shell or perl script.
  31. "
  32. homepage=https://www.gnu.org/software/ncurses
  33. license=LGPLv2.1
  34. # Source documentation
  35. docs="CHANGES COPYING README VERSION"
  36. docsdir="${docdir}/${program}-${version}"
  37. # Custom source directory
  38. srcdir=${program}-${version}
  39. build()
  40. {
  41. unpack "${tardir}/$tarname"
  42. cd "$srcdir"
  43. # Set sane permissions
  44. chmod -R u+w,go-w,a+rX-s .
  45. ./configure CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS -static" \
  46. $configure_args \
  47. --libdir=/usr/lib${libSuffix} \
  48. --mandir=$mandir \
  49. --with-ncursesw \
  50. --disable-rpath-hack \
  51. --build="$(gcc -dumpmachine)"
  52. make -j${jobs}
  53. make -j${jobs} DESTDIR="$destdir" install
  54. # Insert the look & feel for Dragora 3+. ;-)
  55. mkdir -p "${destdir}/etc"
  56. cp -p "${worktree}/archive/dialog/dialogrc" "${destdir}/etc/"
  57. chmod 644 "${destdir}/etc/dialogrc"
  58. # To manage .new (config) files via graft(8)
  59. touch "${destdir}/etc/.graft-config"
  60. # Compress man page and copy documentation
  61. lzip -9 "${destdir}/${mandir}/man1/dialog.1"
  62. mkdir -p "${destdir}${docsdir}"
  63. cp -p $docs "${destdir}${docsdir}"
  64. }