recipe 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. # Build recipe for angband
  2. #
  3. # Copyright 2018 Mateus P. Rodrigues <mprodrigues@dragora.org>.
  4. #
  5. # This recipe is free software, under the terms of the Apache License 2.0
  6. program=angband
  7. version=4.1.2
  8. release=1
  9. tarname=${program}-${version}.tar.gz
  10. # Remote source(s)
  11. fetch=http://rephial.org/downloads/4.1/$tarname
  12. description="
  13. Angband - Classic rogue-like game
  14. Angband is one of the best known major rogue likes,
  15. it is derived from Umoria and based on the writings
  16. of J. R. R. Tolkien.
  17. "
  18. homepage=http://example.com
  19. license=GPLv2
  20. # Source documentation
  21. docs="changes.txt copying.txt faq.txt readme.txt thanks.txt"
  22. docsdir="${docdir}/${program}-${version}"
  23. build()
  24. {
  25. set -e
  26. unpack "${tardir}/$tarname"
  27. cd "$srcdir"
  28. ./autogen.sh
  29. ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
  30. $configure_args \
  31. --libdir=/usr/lib${libSuffix} \
  32. --infodir=$infodir \
  33. --mandir=$mandir \
  34. --docdir=$docdir \
  35. --enable-curses \
  36. --enable-x11 \
  37. --enable-sdl \
  38. --build="$(cc -dumpmachine)"
  39. make -j${jobs} V=1
  40. make -j${jobs} DESTDIR="$destdir" install
  41. # Compress and link man pages (if needed)
  42. if test -d "${destdir}/$mandir"
  43. then
  44. (
  45. cd "${destdir}/$mandir"
  46. find . -type f -exec lzip -9 '{}' +
  47. find . -type l | while read -r file
  48. do
  49. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  50. rm -- "$file"
  51. done
  52. )
  53. fi
  54. # Copy documentation
  55. mkdir -p "${destdir}${docsdir}"
  56. cp -p $docs "${destdir}${docsdir}"
  57. }