%define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)") %define python_sitelib64 %(python_64 -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)") Summary: Text based document generation Name: asciidoc Version: 8.5.1 Release: 1 # The python code does not specify a version. # The javascript example code is GPLv2+. License: GPL+ and GPLv2+ Group: Applications/System URL: http://www.methods.co.nz/asciidoc/ Source0: http://www.methods.co.nz/asciidoc/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: python >= 2.6, make, getopt >= 1.1.4, coreutils Requires: python >= 2.6 Requires: libxslt >= 1.1.22 %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. %prep %setup -q %build ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} export PATH=/opt/freeware/bin:$PATH gmake install DESTDIR=${RPM_BUILD_ROOT} mkdir -p ${RPM_BUILD_ROOT}%{_datadir} # real conf data goes to sysconfdir, rest to datadir; symlinks so asciidoc works for d in dblatex docbook-xsl images javascripts stylesheets ; do mv ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/${d} \ ${RPM_BUILD_ROOT}%{_datadir}/%{name} ln -s %{_datadir}/%{name}/$d ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/ done # Python API install -Dpm 644 asciidocapi.py ${RPM_BUILD_ROOT}%{python_sitelib}/asciidocapi.py install -Dpm 644 asciidocapi.py ${RPM_BUILD_ROOT}%{python_sitelib64}/asciidocapi.py cd ${RPM_BUILD_ROOT} mkdir -p usr/bin cd usr/bin ln -sf ../..%{_bindir}/* . %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system) %doc README BUGS CHANGELOG COPYRIGHT %config(noreplace) %{_sysconfdir}/%{name} %{_bindir}/* %{_mandir}/man1/* %{_datadir}/%{name} %{python_sitelib}/* %{python_sitelib64}/* /usr/bin/* %changelog * Thu Nov 05 2009 Michael Perzl - 8.5.1-1 - first version for AIX V5.1 and higher