1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
11 groups = Application/System
12 url = http://www.methods.co.nz/asciidoc/
13 license = GPL+ and GPLv2+
14 summary = Text based document generation.
17 AsciiDoc is a text document format for writing short documents,
18 articles, books and UNIX man pages. AsciiDoc files can be translated
19 to HTML and DocBook markups using the asciidoc(1) command.
22 source_dl = http://sourceforge.net/projects/asciidoc/files/%{name}/%{version}/
30 # Remove forbidden "env" interpreter from script.
31 sed -e "s@#!.*@#!/bin/bash@g" -i a2x
35 # Determite python version.
36 PYTHON_VERSION=$(python -c "import platform; print '.'.join(platform.python_version_tuple()[:2])")
39 mkdir -pv %{BUILDROOT}/etc/asciidoc
40 mkdir -pv %{BUILDROOT}/usr/lib/python${PYTHON_VERSION}/site-packages
42 # Move config data to /etc and link it to correct place,
43 # so asciidoc will work.
44 for dir in dblatex docbook-xsl images javascripts stylesheets ; do
45 mv %{BUILDROOT}/etc/asciidoc/$dir \
46 %{BUILDROOT}/usr/share/asciidoc
47 ln -svf ../../usr/share/asciidoc/$dir %{BUILDROOT}/etc/asciidoc/
51 install -Dpm 644 asciidocapi.py %{BUILDROOT}/usr/lib/python${PYTHON_VERSION}/site-packages/asciidocapi.py