recipe 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # Build recipe for asciidoctor.
  2. #
  3. # Copyright (C) 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=asciidoctor
  17. version=2.0.10
  18. release=1
  19. # Set 'outdir' for a nice and well-organized output directory
  20. outdir="${outdir}/${arch}/ruby"
  21. tarname=${program}-${version}.gem
  22. # Remote source(s)
  23. fetch=http://rubygems.org/downloads/$tarname
  24. description="
  25. Asciidoctor is a fast, open source text processor.
  26. It converts AsciiDoc content to HTML5, DocBook, PDF, and other formats.
  27. Asciidoctor is written in Ruby and runs on all major operating systems.
  28. "
  29. homepage=http://asciidoctor.org
  30. license=MIT
  31. build()
  32. {
  33. set -e
  34. # Figure out directory for Ruby Gems
  35. _gemdir="$(ruby -W0 -e 'puts Gem.default_dir')"
  36. if test -z "_$gemdir"
  37. then
  38. echo "recipe: Error: the _gemdir variable is empty." 1>&2
  39. exit 1
  40. fi
  41. mkdir -p "${destdir}/${_gemdir}" "${destdir}/usr/bin"
  42. gem install \
  43. --ignore-dependencies \
  44. --no-user-install \
  45. --backtrace --verbose \
  46. --install-dir "${destdir}/${_gemdir}" \
  47. --bindir "${destdir}/usr/bin" \
  48. "${tardir}/$tarname"
  49. }