recipe 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. # Build recipe for dialog.
  2. #
  3. # Copyright (c) 2017-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=dialog
  19. version=1.3-20220117
  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" \
  46. CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS -static" \
  47. $configure_args \
  48. --libdir=/usr/lib${libSuffix} \
  49. --mandir=$mandir \
  50. --enable-widec \
  51. --enable-nls \
  52. --disable-rpath-hack \
  53. --build="$(gcc -dumpmachine)"
  54. make -j${jobs}
  55. make -j${jobs} DESTDIR="$destdir" install
  56. # Insert the look & feel for Dragora 3+. ;-)
  57. mkdir -p "${destdir}/etc"
  58. cp -p "${worktree}/archive/dialog/dialogrc" "${destdir}/etc/"
  59. chmod 644 "${destdir}/etc/dialogrc"
  60. # To manage .new (config) files via graft(8)
  61. touch "${destdir}/etc/.graft-config"
  62. # Compress man page and copy the documentation
  63. lzip -9 "${destdir}/${mandir}/man1/dialog.1"
  64. mkdir -p "${destdir}/$docsdir"
  65. cp -p $docs "${destdir}/$docsdir"
  66. }