recipe 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. # Build recipe for dialog.
  2. #
  3. # Copyright (c) 2017-2019 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. program=dialog
  17. version=1.3-20191210
  18. pkgversion=$(echo $version | tr - _)
  19. release=1
  20. # Set 'outdir' for a nice and well-organized output directory
  21. outdir="${outdir}/${arch}/tools"
  22. tarname=${program}-${version}.tgz
  23. # Remote source(s)
  24. fetch=http://invisible-mirror.net/archives/dialog/$tarname
  25. description="
  26. Display dialog boxes in scripts.
  27. Dialog is a program that will let you present a variety
  28. of questions or display messages in nice looking color
  29. non-graphical dialog boxes from a shell or perl script.
  30. "
  31. homepage=http://www.gnu.org/software/ncurses
  32. license=LGPLv2.1
  33. # Source documentation
  34. docs="CHANGES COPYING README VERSION"
  35. docsdir="${docdir}/${program}-${pkgversion}"
  36. # Custom source directory
  37. srcdir=${program}-${version}
  38. build()
  39. {
  40. set -e
  41. unpack "${tardir}/$tarname"
  42. cd "$srcdir"
  43. # Set sane permissions
  44. chmod -R u+w,go-w,a+rX-s .
  45. ./configure 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="$(cc -dumpmachine)"
  52. make -j${jobs}
  53. make -j${jobs} DESTDIR="$destdir" install
  54. # Insert the look & feel from 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. }