|
|
|
##
|
|
|
|
## asciidoc.spec -- OpenPKG RPM Package Specification
|
|
|
|
## Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
|
|
|
|
## Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/>
|
|
|
|
##
|
|
|
|
## Permission to use, copy, modify, and distribute this software for
|
|
|
|
## any purpose with or without fee is hereby granted, provided that
|
|
|
|
## the above copyright notice and this permission notice appear in all
|
|
|
|
## copies.
|
|
|
|
##
|
|
|
|
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
|
|
|
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
|
|
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
|
|
|
|
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
|
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
|
|
|
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
|
|
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
|
|
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
|
|
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
## SUCH DAMAGE.
|
|
|
|
##
|
|
|
|
|
|
|
|
# package information
|
|
|
|
Name: asciidoc
|
|
|
|
Summary: Text-Based Document Generation
|
|
|
|
URL: http://www.methods.co.nz/asciidoc/
|
|
|
|
Vendor: Stuart Rackham
|
|
|
|
Packager: OpenPKG Foundation e.V.
|
|
|
|
Distribution: OpenPKG Community
|
|
|
|
Class: EVAL
|
|
|
|
Group: Typesetting
|
|
|
|
License: GPL
|
|
|
|
Version: 8.1.0
|
|
|
|
Release: 20061022
|
|
|
|
|
|
|
|
# list of sources
|
|
|
|
Source0: http://www.methods.co.nz/asciidoc/asciidoc-%{version}.tar.gz
|
|
|
|
|
|
|
|
# build information
|
|
|
|
Prefix: %{l_prefix}
|
|
|
|
BuildRoot: %{l_buildroot}
|
|
|
|
BuildPreReq: OpenPKG, openpkg >= 20040130
|
|
|
|
PreReq: OpenPKG, openpkg >= 20040130, bash, python
|
|
|
|
AutoReq: no
|
|
|
|
AutoReqProv: no
|
|
|
|
|
|
|
|
%description
|
|
|
|
AsciiDoc is a text document format for writing short documents,
|
|
|
|
articles, books and UNIX man pages. AsciiDoc files can be translated
|
|
|
|
to HTML and DocBook markups using the asciidoc(1) command.
|
|
|
|
|
|
|
|
AsciiDoc is highly configurable: both the AsciiDoc source file
|
|
|
|
syntax and the backend output markups (which can be almost any type
|
|
|
|
of SGML/XML markup) can be customized and extended by the user.
|
|
|
|
|
|
|
|
%track
|
|
|
|
prog asciidoc = {
|
|
|
|
version = %{version}
|
|
|
|
url = http://www.methods.co.nz/asciidoc/downloads.html
|
|
|
|
regex = asciidoc-(__VER__)\.tar\.gz
|
|
|
|
}
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
%{l_shtool} subst -e 's;\r$;;' \
|
|
|
|
*.conf \
|
|
|
|
docbook-xsl/*.{patch,txt,xsl} \
|
|
|
|
filters/*.{conf,py,txt} \
|
|
|
|
stylesheets/*.css
|
|
|
|
|
|
|
|
%build
|
|
|
|
:
|
|
|
|
|
|
|
|
%install
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
# install binaries
|
|
|
|
%{l_shtool} mkdir -f -p -m 755 \
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/bin
|
|
|
|
%{l_shtool} install -c -m 755 \
|
|
|
|
-e 's;^#!/usr/bin/env python;#!%{l_prefix}/bin/python;g' \
|
|
|
|
-e 's;/etc/asciidoc;%{l_prefix}/etc/asciidoc;g' \
|
|
|
|
asciidoc.py \
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/bin/asciidoc
|
|
|
|
%{l_shtool} install -c -m 755 \
|
|
|
|
-e 's;^#!/bin/bash;#!%{l_prefix}/bin/bash;g' \
|
|
|
|
-e 's;/etc/asciidoc;%{l_prefix}/etc/asciidoc;g' \
|
|
|
|
a2x \
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/bin/
|
|
|
|
|
|
|
|
# install configuration files
|
|
|
|
%{l_shtool} mkdir -f -p -m 755 \
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/asciidoc
|
|
|
|
%{l_shtool} install -c -m 644 \
|
|
|
|
-e 's;\.\(/stylesheets\);%{l_prefix}/share/asciidoc\1;g' \
|
|
|
|
*.conf \
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/asciidoc/
|
|
|
|
|
|
|
|
# install man pages
|
|
|
|
%{l_shtool} mkdir -f -p -m 755 \
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/man/man1
|
|
|
|
%{l_shtool} install -c -m 644 \
|
|
|
|
doc/*.1 \
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/man/man1/
|
|
|
|
|
|
|
|
# install architecture-independent shared data
|
|
|
|
for i in doc docbook-xsl examples filters images stylesheets; do
|
|
|
|
%{l_shtool} mkdir -f -p -m 755 \
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/share/asciidoc/$i
|
|
|
|
%{l_tar} cf - $i | %{l_tar} xf - --no-same-permissions \
|
|
|
|
-C $RPM_BUILD_ROOT%{l_prefix}/share/asciidoc/
|
|
|
|
done
|
|
|
|
|
|
|
|
# strip installation
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/asciidoc/{doc,examples} \
|
|
|
|
>/dev/null 2>&1 || true
|
|
|
|
|
|
|
|
# determine installation files
|
|
|
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
|
|
|
|
%{l_files_std} \
|
|
|
|
'%config %{l_prefix}/etc/asciidoc/*'
|
|
|
|
|
|
|
|
%files -f files
|
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|