recipe 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # Build recipe for fossil.
  2. #
  3. # Copyright (C) 2017 Mateus P. Rodrigues <mprodrigues@dragora.org>.
  4. #
  5. # This recipe is free software: you have unlimited permission
  6. # to copy, distribute and modify it.
  7. program=fossil
  8. version=2.3
  9. release=1
  10. tarname=${program}-src-${version}.tar.gz
  11. # Remote source(s)
  12. fetch=http://fossil-scm.org/index.html/uv/$tarname
  13. description="
  14. Simple, high-reliability, distributed software configuration management.
  15. "
  16. homepage=https://fossil-scm.org/index.html/doc/trunk/www/index.wiki
  17. license="2-clause BSD"
  18. # Source documentation
  19. docs="VERSION"
  20. docsdir="${docdir}/${program}-${version}"
  21. build()
  22. {
  23. set -e
  24. unpack "${tardir}/$tarname"
  25. cd "$srcdir"
  26. ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
  27. $configure_args \
  28. --libdir=/usr/lib${libSuffix} \
  29. --mandir=$mandir \
  30. --build="$(cc -dumpmachine)" \
  31. || true
  32. make -j${jobs} V=1
  33. make -j${jobs} DESTDIR="$destdir" install
  34. # Compress and link man pages (if needed)
  35. if test -d "${destdir}/$mandir"
  36. then
  37. (
  38. cd "${destdir}/$mandir"
  39. find . -type f -exec lzip -9 '{}' +
  40. find . -type l | while read -r file
  41. do
  42. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  43. rm -- "$file"
  44. done
  45. )
  46. fi
  47. # Copy documentation
  48. mkdir -p "${destdir}${docsdir}"
  49. for file in $docs
  50. do
  51. if test -e $file
  52. then
  53. cp -p $file "${destdir}${docsdir}"
  54. fi
  55. done
  56. }