PKGBUILD 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # Contributor (Arch): Chris Brannon <cmbrannon79@gmail.com>
  2. # Contributor (Arch): Geoffroy Carrier <geoffroy@archlinux.org>
  3. # Contributor (Arch): Dan McGee <dan@archlinux.org>
  4. # Contributor (Arch): Jaroslaw Rosiek <philosoph@interia.pl>
  5. # Contributor (Arch): Darwin Bautista <djclue917@gmail.com>
  6. # Contributor (Arch): Daniel J Griffiths <ghost1227@archlinux.us>
  7. # Maintainer (Arch): Florian Pritz <flo@xinu.at>
  8. # Contributor: André Silva <emulatorman@hyperbola.info>
  9. # Contributor: Andreas Grapentin <andreas@grapentin.org>
  10. pkgname=asciidoc
  11. pkgver=8.6.10
  12. pkgrel=2
  13. pkgrel+=.parabola1
  14. pkgdesc='Text document format for short documents, articles, books and UNIX man pages.'
  15. arch=('any')
  16. url='https://www.methods.co.nz/asciidoc/'
  17. license=('GPL')
  18. depends=('python2' 'libxslt' 'docbook-xsl')
  19. optdepends=('lilypond: music-filter'
  20. 'imagemagick: music-filter (used in conjunction with lilypond)'
  21. 'source-highlight: source-highlight-filter'
  22. 'dblatex: pdf generation'
  23. 'lynx: text generation'
  24. 'w3m: text generation (alternative to lynx)')
  25. source=("${pkgname}-${pkgver}.tar.gz::https://github.com/asciidoc/asciidoc/archive/${pkgver}.tar.gz")
  26. sha256sums=('9e52f8578d891beaef25730a92a6e723596ddbd07bfe0d2a56486fcf63a0b983')
  27. prepare() {
  28. cd ${pkgname}-${pkgver}
  29. # python2 fix
  30. #for file in asciidocapi.py a2x.py asciidoc.py filters/music/music2png.py filters/latex/latex2png.py \
  31. #filters/code/code-filter.py filters/graphviz/graphviz2png.py; do
  32. #sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' $file
  33. #done
  34. #sed -i -e 's_sys:python_sys:python2_g' -e 's_sys3:python_sys3:python2_g' xhtml11.conf
  35. #sed -i 's_sys:python_sys:python2_g' xhtml11-quirks.conf
  36. #sed -i -e 's/{python}/{python2}/g' \
  37. #-e 's#{language@python:py:#{language@python2:py:#' \
  38. #filters/source/source-highlight-filter.conf \
  39. #html5.conf xhtml11.conf xhtml11-quirks.conf
  40. #sed -i -e "s#'python'#'python2'#g" filters/code/code-filter.py
  41. sed -i -e 's#python a2x.py#python2 a2x.py#' Makefile.in
  42. }
  43. build() {
  44. cd ${pkgname}-${pkgver}
  45. autoconf
  46. ./configure \
  47. --prefix=/usr \
  48. --sysconfdir=/etc
  49. }
  50. package() {
  51. cd ${pkgname}-${pkgver}
  52. make install DESTDIR=${pkgdir}
  53. make docs DESTDIR=${pkgdir}
  54. install -Dm644 asciidocapi.py \
  55. ${pkgdir}/usr/lib/python2.7/site-packages/asciidocapi.py
  56. # fix FS#21579 - [asciidoc] 8.6.2-2 "asciidoc" table style doesn't work (mismatched python version)
  57. #sed -i 's/python/python2/' \
  58. #${pkgdir}/etc/asciidoc/asciidoc.conf
  59. }