From 06aa6171a925df41fbbc7fe3ff85523ab6e85fb9 Mon Sep 17 00:00:00 2001 From: Andreas Grapentin Date: Wed, 11 Mar 2020 11:37:05 +0100 Subject: libre/asciidoc: cleanup --- libre/asciidoc/PKGBUILD | 62 +++++++++++++++++++++++++++++-------------------- 1 file changed, 37 insertions(+), 25 deletions(-) (limited to 'libre/asciidoc/PKGBUILD') diff --git a/libre/asciidoc/PKGBUILD b/libre/asciidoc/PKGBUILD index 9ee664824..9d2d2be72 100644 --- a/libre/asciidoc/PKGBUILD +++ b/libre/asciidoc/PKGBUILD @@ -1,56 +1,68 @@ -# Maintainer: Andreas Grapentin # Maintainer (Arch): Florian Pritz -# Contributor: André Silva # Contributor (Arch): Chris Brannon # Contributor (Arch): Geoffroy Carrier # Contributor (Arch): Dan McGee # Contributor (Arch): Jaroslaw Rosiek # Contributor (Arch): Darwin Bautista # Contributor (Arch): Daniel J Griffiths +# Contributor: André Silva +# Contributor: Andreas Grapentin 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) +pkgrel=1 +pkgrel+=.parabola2 +pkgdesc='Text document format for short documents, articles, books and UNIX man pages.' +arch=('any') +url='https://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") +source=("${pkgname}-${pkgver}.tar.gz::https://github.com/asciidoc/asciidoc/archive/${pkgver}.tar.gz") sha256sums=('9e52f8578d891beaef25730a92a6e723596ddbd07bfe0d2a56486fcf63a0b983') prepare() { - cd $pkgname-$pkgver + cd ${pkgname}-${pkgver} - # fix missing configure script in release tarball - autoreconf --install + # python2 fix + #for file in asciidocapi.py a2x.py asciidoc.py filters/music/music2png.py filters/latex/latex2png.py \ + #filters/code/code-filter.py filters/graphviz/graphviz2png.py; do + #sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' $file + #done + #sed -i -e 's_sys:python_sys:python2_g' -e 's_sys3:python_sys3:python2_g' xhtml11.conf + #sed -i 's_sys:python_sys:python2_g' xhtml11-quirks.conf + #sed -i -e 's/{python}/{python2}/g' \ + #-e 's#{language@python:py:#{language@python2:py:#' \ + #filters/source/source-highlight-filter.conf \ + #html5.conf xhtml11.conf xhtml11-quirks.conf + #sed -i -e "s#'python'#'python2'#g" filters/code/code-filter.py + sed -i -e 's#python a2x.py#python2 a2x.py#' Makefile.in +} + +build() { + cd ${pkgname}-${pkgver} + autoconf ./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 + cd ${pkgname}-${pkgver} - make install DESTDIR=$pkgdir - make docs DESTDIR=$pkgdir + make install DESTDIR=${pkgdir} + make docs DESTDIR=${pkgdir} install -Dm644 asciidocapi.py \ - $pkgdir/usr/lib/python2.7/site-packages/asciidocapi.py + ${pkgdir}/usr/lib/python2.7/site-packages/asciidocapi.py + + # fix FS#21579 - [asciidoc] 8.6.2-2 "asciidoc" table style doesn't work (mismatched python version) + #sed -i 's/python/python2/' \ + #${pkgdir}/etc/asciidoc/asciidoc.conf } -- cgit v1.2.3