Blame SPECS/asciidoc.spec

f301b7
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
f301b7
%global vimdir %{_datadir}/vim/vimfiles
f301b7
f301b7
Summary: Text based document generation
f301b7
Name: asciidoc
f301b7
Version: 8.6.8
f301b7
Release: 5%{?dist}
f301b7
# The python code does not specify a version.
f301b7
# The javascript example code is GPLv2+.
f301b7
License: GPL+ and GPLv2+
f301b7
Group: Applications/System
f301b7
f301b7
URL: http://www.methods.co.nz/asciidoc/
f301b7
Source: http://sourceforge.net/projects/asciidoc/files/%{name}/%{version}/%{name}-%{version}.tar.gz
f301b7
Patch0: asciidoc-8.6.8-music-noship.patch
f301b7
Patch1: asciidoc-8.6.8-explicit-interpreter.patch
f301b7
f301b7
BuildRequires: python2-devel
f301b7
BuildRequires: dblatex
f301b7
BuildRequires: graphviz
f301b7
BuildRequires: libxslt
f301b7
%if 0%{?rhel} == 0
f301b7
BuildRequires: lilypond
f301b7
%endif
f301b7
BuildRequires: source-highlight
f301b7
BuildRequires: texlive-dvipng-bin
f301b7
BuildRequires: vim-filesystem
f301b7
BuildRequires: symlinks
f301b7
f301b7
f301b7
Requires: python >= 2.4
f301b7
Requires: docbook-style-xsl
f301b7
Requires: graphviz
f301b7
Requires: libxslt
f301b7
Requires: libxslt
f301b7
Requires: source-highlight
f301b7
Requires: vim-filesystem
f301b7
f301b7
BuildArch: noarch
f301b7
f301b7
%description
f301b7
AsciiDoc is a text document format for writing short documents,
f301b7
articles, books and UNIX man pages. AsciiDoc files can be translated
f301b7
to HTML and DocBook markups using the asciidoc(1) command.
f301b7
f301b7
%package doc
f301b7
Summary:  Additional documentation and examples for asciidoc
f301b7
Requires: %{name} = %{version}-%{release}
f301b7
f301b7
%description doc
f301b7
%{summary}.
f301b7
f301b7
%package latex
f301b7
Summary:  Support for asciidoc latex output
f301b7
Requires: %{name} = %{version}-%{release}
f301b7
Requires: dblatex
f301b7
Requires: texlive-dvipng-bin
f301b7
f301b7
%description latex
f301b7
%{summary}.
f301b7
f301b7
%if 0%{?rhel} == 0
f301b7
%package music
f301b7
Summary:  Support for asciidoc music output
f301b7
Requires: %{name} = %{version}-%{release}
f301b7
Requires: lilypond
f301b7
f301b7
%description music
f301b7
%{summary}.
f301b7
%endif
f301b7
f301b7
%prep
f301b7
%setup -q
f301b7
%patch0 -p1 -b .music-noship
f301b7
%patch1 -p1 -b .explicit-interpreter
f301b7
f301b7
# Fix line endings on COPYRIGHT file
f301b7
sed -i "s/\r//g" COPYRIGHT
f301b7
f301b7
# Convert CHANGELOG and README to utf-8
f301b7
for file in CHANGELOG README; do
f301b7
    iconv -f ISO-8859-1 -t UTF-8 -o $file.new $file && \
f301b7
    touch -r $file $file.new && \
f301b7
    mv $file.new $file
f301b7
done
f301b7
f301b7
# Remove music-filter doc
f301b7
rm -f doc/music-filter.txt
f301b7
f301b7
%build
f301b7
%configure
f301b7
f301b7
%install
f301b7
make install docs DESTDIR=%{buildroot}
f301b7
f301b7
install -dm 755 %{buildroot}%{_datadir}/asciidoc/
f301b7
# real conf data goes to sysconfdir, rest to datadir; symlinks so asciidoc works
f301b7
for d in dblatex docbook-xsl images javascripts stylesheets; do
f301b7
    mv -v %{buildroot}%{_sysconfdir}/asciidoc/$d \
f301b7
          %{buildroot}%{_datadir}/asciidoc/
f301b7
    # absolute symlink into buildroot is intentional, see below
f301b7
    ln -s %{buildroot}%{_datadir}/%{name}/$d %{buildroot}%{_sysconfdir}/%{name}/
f301b7
f301b7
    # let's symlink stuff for documentation as well so we don't duplicate things
f301b7
    rm -rf %{buildroot}%{_docdir}/%{name}/$d
f301b7
    # absolute symlink into buildroot is intentional, see below
f301b7
    ln -s %{buildroot}%{_datadir}/%{name}/$d %{buildroot}%{_docdir}/%{name}/
f301b7
done
f301b7
f301b7
# Python API
f301b7
install -Dpm 644 asciidocapi.py %{buildroot}%{python_sitelib}/asciidocapi.py
f301b7
f301b7
# Make it easier to %exclude these with both rpm < and >= 4.7
f301b7
for file in %{buildroot}{%{_bindir},%{_sysconfdir}/asciidoc/filters/*}/*.py ; do
f301b7
    touch ${file}{c,o}
f301b7
done
f301b7
f301b7
mkdir -p %{buildroot}%{vimdir}/{ftdetect,syntax}
f301b7
for file in $(cd vim; find * -type f); do
f301b7
    install -m 0644 vim/$file %{buildroot}%{vimdir}/$file
f301b7
done
f301b7
f301b7
# Remove music files for RHEL
f301b7
%if 0%{?rhel} >= 0
f301b7
rm -rf %{buildroot}{%{_sysconfdir}/asciidoc/filters/music,%{_sysconfdir}/asciidoc/filters/music/*.conf,%{_sysconfdir}/asciidoc/filters/music/*.py}
f301b7
%endif
f301b7
f301b7
# Absolute symlinks were used above to be able to detect dangling ones. Make
f301b7
# them relative now (sane for being installed) and remove dangling symlinks.
f301b7
symlinks -cdr %{buildroot}
f301b7
f301b7
%check
f301b7
export PATH="../:$PATH"
f301b7
cd tests
f301b7
python testasciidoc.py update
f301b7
python testasciidoc.py run
f301b7
f301b7
%files
f301b7
%doc COPYING COPYRIGHT BUGS CHANGELOG README
f301b7
%doc %{_mandir}/man1/a2x.1*
f301b7
%doc %{_mandir}/man1/asciidoc.1*
f301b7
%config(noreplace) %{_sysconfdir}/asciidoc/
f301b7
%{_bindir}/a2x
f301b7
%{_bindir}/a2x.py
f301b7
%{_bindir}/asciidoc
f301b7
%{_bindir}/asciidoc.py
f301b7
%{_datadir}/asciidoc/
f301b7
%{python_sitelib}/asciidocapi.py*
f301b7
%{vimdir}/ftdetect/asciidoc_filetype.vim
f301b7
%{vimdir}/syntax/asciidoc.vim
f301b7
%exclude %{_bindir}/*.py[co]
f301b7
%exclude %{_sysconfdir}/asciidoc/filters/*/*.py[co]
f301b7
%exclude %{_sysconfdir}/asciidoc/filters/latex
f301b7
%exclude %{_sysconfdir}/asciidoc/filters/music
f301b7
f301b7
%files doc
f301b7
%{_docdir}/%{name}
f301b7
%exclude %{_docdir}/%{name}/{BUGS,CHANGELOG,COPYING,COPYRIGHT,README}
f301b7
f301b7
%files latex
f301b7
%dir %{_sysconfdir}/asciidoc/filters/latex
f301b7
%{_sysconfdir}/asciidoc/filters/latex/*.py
f301b7
%{_sysconfdir}/asciidoc/filters/latex/*.conf
f301b7
f301b7
%if 0%{?rhel} == 0
f301b7
%files music
f301b7
%dir %{_sysconfdir}/asciidoc/filters/music
f301b7
%{_sysconfdir}/asciidoc/filters/music/*.conf
f301b7
%{_sysconfdir}/asciidoc/filters/music/*.py
f301b7
%endif
f301b7
f301b7
f301b7
%changelog
f301b7
* Mon Feb 10 2014 Nils Philippsen <nils@redhat.com> - 8.6.8-5
f301b7
- explicitly use system copy of Python 2.x (#987011)
f301b7
- fix broken and remove dangling symlinks
f301b7
f301b7
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 8.6.8-3
f301b7
- Mass rebuild 2013-12-27
f301b7
f301b7
* Thu Oct  3 2013 Paul W. Frields <pfrields@redhat.com> - 8.6.8-2
f301b7
- Do not build or test musicfilter
f301b7
f301b7
* Thu Mar  7 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 8.6.8-1
f301b7
- Update to latest upstream version
f301b7
- Move things around make docs dir actually working
f301b7
- Add proper requires on vim-filesystem
f301b7
- Run testsuite
f301b7
- Split music and latex support to subpackages
f301b7
f301b7
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.4.5-9
f301b7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
f301b7
f301b7
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.4.5-8
f301b7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
f301b7
f301b7
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.4.5-7
f301b7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
f301b7
f301b7
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.4.5-6
f301b7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
f301b7
f301b7
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 8.4.5-5
f301b7
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
f301b7
f301b7
* Tue Sep  8 2009 Ville Skyttä <ville.skytta@iki.fi> - 8.4.5-4
f301b7
- Remaining improvements from #480288:
f301b7
- Add dependencies on libxslt and docbook-style-xsl.
f301b7
- Install dblatex style sheets.
f301b7
- Exclude unneeded *.py[co].
f301b7
- Install python API.
f301b7
- Specfile cleanups.
f301b7
f301b7
* Thu Aug 13 2009 Todd Zullinger <tmz@pobox.com> - 8.4.5-3
f301b7
- Use 'unsafe' mode by default (bug 506953)
f301b7
- Install filter scripts in %%{_datadir}/asciidoc
f301b7
- Convert spec file, CHANGELOG, and README to utf-8
f301b7
- Preserve timestamps on installed files, where feasible
f301b7
- s/$RPM_BUILD_ROOT/%%{buildroot} and drop duplicated /'s
f301b7
- Fix rpmlint mixed-use-of-spaces-and-tabs and end-of-line-encoding warnings
f301b7
f301b7
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.4.5-2
f301b7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
f301b7
f301b7
* Fri Jun 19 2009 Dave Airlie <airlied@redhat.com> 8.4.5-1
f301b7
- new upstream version 8.4.5 - required by X.org libXi to build
f301b7
f301b7
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.2.5-4
f301b7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
f301b7
f301b7
* Thu May 22 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 8.2.5-3
f301b7
- fix license tag
f301b7
f301b7
* Wed Dec 05 2007 Florian La Roche <laroche@redhat.com> - 8.2.5-2
f301b7
- remove doc/examples from filelist due to dangling symlinks
f301b7
f301b7
* Tue Nov 20 2007 Florian La Roche <laroche@redhat.com> - 8.2.5-1
f301b7
- new upstream version 8.2.5
f301b7
f301b7
* Mon Oct 22 2007 Florian La Roche <laroche@redhat.com> - 8.2.3-1
f301b7
- new upstream version 8.2.3
f301b7
f301b7
* Sat Sep 01 2007 Florian La Roche <laroche@redhat.com> - 8.2.2-1
f301b7
- new upstream version 8.2.2
f301b7
f301b7
* Mon Mar 19 2007 Chris Wright <chrisw@redhat.com> - 8.1.0-1
f301b7
- update to asciidoc 8.1.0
f301b7
f301b7
* Thu Sep 14 2006 Chris Wright <chrisw@redhat.com> - 7.0.2-3
f301b7
- rebuild for Fedora Extras 6
f301b7
f301b7
* Tue Feb 28 2006 Chris Wright <chrisw@redhat.com> - 7.0.2-2
f301b7
- rebuild for Fedora Extras 5
f301b7
f301b7
* Mon Aug 29 2005 Chris Wright <chrisw@osdl.org> - 7.0.2-1
f301b7
- convert spec file to UTF-8
f301b7
- Source should be URL
f301b7
- update to 7.0.2
f301b7
f301b7
* Fri Aug 19 2005 Chris Wright <chrisw@osdl.org> - 7.0.1-3
f301b7
- consistent use of RPM_BUILD_ROOT
f301b7
f301b7
* Thu Aug 18 2005 Chris Wright <chrisw@osdl.org> - 7.0.1-2
f301b7
- Update BuildRoot
f301b7
- use _datadir
f301b7
- use config and _sysconfdir
f301b7
f301b7
* Wed Jun 29 2005 Terje Røsten <terje.rosten@ntnu.no> - 7.0.1-1
f301b7
- 7.0.1
f301b7
- Drop patch now upstream
f301b7
- Build as noarch (Petr Klíma)
f301b7
f301b7
* Sat Jun 11 2005 Terje Røsten <terje.rosten@ntnu.no> - 7.0.0-0.3
f301b7
- Add include patch
f301b7
f301b7
* Fri Jun 10 2005 Terje Røsten <terje.rosten@ntnu.no> - 7.0.0-0.2
f301b7
- Fix stylesheets according to Stuart
f301b7
f301b7
* Fri Jun 10 2005 Terje Røsten <terje.rosten@ntnu.no> - 7.0.0-0.1
f301b7
- Initial package
f301b7
- Based on Debian package, thx!