summaryrefslogtreecommitdiff
path: root/libre/asciidoc/PKGBUILD
blob: 9ee6648240b5ce2e3d7c635a893c2f8d41da2214 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Maintainer: Andreas Grapentin <andreas@grapentin.org>
# Maintainer (Arch): Florian Pritz <flo@xinu.at>
# Contributor: André Silva <emulatorman@hyperbola.info>
# Contributor (Arch): Chris Brannon <cmbrannon79@gmail.com>
# Contributor (Arch): Geoffroy Carrier <geoffroy@archlinux.org>
# Contributor (Arch): Dan McGee <dan@archlinux.org>
# Contributor (Arch): Jaroslaw Rosiek <philosoph@interia.pl>
# Contributor (Arch): Darwin Bautista <djclue917@gmail.com>
# Contributor (Arch): Daniel J Griffiths <ghost1227@archlinux.us>

pkgname=asciidoc

pkgver=8.6.10
pkgrel=1.parabola1
arch=(any)

pkgdesc="Text document format for short documents, articles, books and UNIX man pages, without nonfree fop recommendation"
url="http://www.methods.co.nz/asciidoc/"
license=(GPL)

depends=(python2 libxslt docbook-xsl)
optdepends=('lilypond: music-filter'
            'imagemagick: music-filter (used in conjunction with lilypond)'
            'source-highlight: source-highlight-filter'
            'dblatex: pdf generation'
            'lynx: text generation'
            'w3m: text generation (alternative to lynx)')
source=("$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/$pkgver.tar.gz")
sha256sums=('9e52f8578d891beaef25730a92a6e723596ddbd07bfe0d2a56486fcf63a0b983')

prepare() {
  cd $pkgname-$pkgver

  # fix missing configure script in release tarball
  autoreconf --install

  ./configure \
    --prefix=/usr \
    --sysconfdir=/etc

  # python2 fix
  for file in *.py filters/*/*.py; do
    sed -i 's_#!/usr/bin/env python$_#!/usr/bin/env python2_' $file
  done
  sed -i 's_	python_	python2_' Makefile
}

package() {
  cd $pkgname-$pkgver

  make install DESTDIR=$pkgdir
  make docs DESTDIR=$pkgdir

  install -Dm644 asciidocapi.py \
    $pkgdir/usr/lib/python2.7/site-packages/asciidocapi.py
}