From 83525516f56daec30b2813338027c6f1ad26c4cc Mon Sep 17 00:00:00 2001 From: basebuilder_pel7ppc64lebuilder0 Date: Mon, 27 Aug 2018 18:58:11 +0200 Subject: [PATCH] asciidoc package update Signed-off-by: basebuilder_pel7ppc64lebuilder0 --- .../asciidoc-8.6.8-explicit-interpreter.patch | 73 +++++ SOURCES/asciidoc-8.6.8-music-noship.patch | 103 +++++++ SPECS/asciidoc.spec | 281 ++++++++++++++++++ 3 files changed, 457 insertions(+) create mode 100644 SOURCES/asciidoc-8.6.8-explicit-interpreter.patch create mode 100644 SOURCES/asciidoc-8.6.8-music-noship.patch create mode 100644 SPECS/asciidoc.spec diff --git a/SOURCES/asciidoc-8.6.8-explicit-interpreter.patch b/SOURCES/asciidoc-8.6.8-explicit-interpreter.patch new file mode 100644 index 00000000..dddde5a8 --- /dev/null +++ b/SOURCES/asciidoc-8.6.8-explicit-interpreter.patch @@ -0,0 +1,73 @@ +diff -up asciidoc-8.6.8/a2x.py.explicit-interpreter asciidoc-8.6.8/a2x.py +--- asciidoc-8.6.8/a2x.py.explicit-interpreter 2014-02-10 17:09:28.400042041 +0100 ++++ asciidoc-8.6.8/a2x.py 2014-02-10 17:16:54.945502122 +0100 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python2 + ''' + a2x - A toolchain manager for AsciiDoc (converts Asciidoc text files to other + file formats) +diff -up asciidoc-8.6.8/asciidocapi.py.explicit-interpreter asciidoc-8.6.8/asciidocapi.py +--- asciidoc-8.6.8/asciidocapi.py.explicit-interpreter 2012-02-29 23:21:24.000000000 +0100 ++++ asciidoc-8.6.8/asciidocapi.py 2014-02-10 17:16:54.932502080 +0100 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python2 + """ + asciidocapi - AsciiDoc API wrapper class. + +diff -up asciidoc-8.6.8/asciidoc.py.explicit-interpreter asciidoc-8.6.8/asciidoc.py +--- asciidoc-8.6.8/asciidoc.py.explicit-interpreter 2012-07-10 04:47:22.000000000 +0200 ++++ asciidoc-8.6.8/asciidoc.py 2014-02-10 17:16:54.960502172 +0100 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python2 + """ + asciidoc - converts an AsciiDoc text file to HTML or DocBook + +diff -up asciidoc-8.6.8/filters/code/code-filter.py.explicit-interpreter asciidoc-8.6.8/filters/code/code-filter.py +--- asciidoc-8.6.8/filters/code/code-filter.py.explicit-interpreter 2008-12-31 02:37:47.000000000 +0100 ++++ asciidoc-8.6.8/filters/code/code-filter.py 2014-02-10 17:16:54.939502103 +0100 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python2 + ''' + NAME + code-filter - AsciiDoc filter to highlight language keywords +diff -up asciidoc-8.6.8/filters/graphviz/graphviz2png.py.explicit-interpreter asciidoc-8.6.8/filters/graphviz/graphviz2png.py +--- asciidoc-8.6.8/filters/graphviz/graphviz2png.py.explicit-interpreter 2011-01-31 21:52:09.000000000 +0100 ++++ asciidoc-8.6.8/filters/graphviz/graphviz2png.py 2014-02-10 17:16:54.941502110 +0100 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python2 + + import os, sys, subprocess + from optparse import * +diff -up asciidoc-8.6.8/filters/latex/latex2png.py.explicit-interpreter asciidoc-8.6.8/filters/latex/latex2png.py +--- asciidoc-8.6.8/filters/latex/latex2png.py.explicit-interpreter 2012-02-29 03:05:58.000000000 +0100 ++++ asciidoc-8.6.8/filters/latex/latex2png.py 2014-02-10 17:16:54.936502093 +0100 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python2 + ''' + NAME + latex2png - Converts LaTeX source to PNG file +diff -up asciidoc-8.6.8/filters/music/music2png.py.explicit-interpreter asciidoc-8.6.8/filters/music/music2png.py +--- asciidoc-8.6.8/filters/music/music2png.py.explicit-interpreter 2012-07-10 23:32:19.000000000 +0200 ++++ asciidoc-8.6.8/filters/music/music2png.py 2014-02-10 17:16:54.934502087 +0100 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python2 + ''' + NAME + music2png - Converts textual music notation to classically notated PNG file +diff -up asciidoc-8.6.8/tests/asciidocapi.py.explicit-interpreter asciidoc-8.6.8/tests/asciidocapi.py +diff -up asciidoc-8.6.8/tests/testasciidoc.py.explicit-interpreter asciidoc-8.6.8/tests/testasciidoc.py +--- asciidoc-8.6.8/tests/testasciidoc.py.explicit-interpreter 2012-03-01 00:19:57.000000000 +0100 ++++ asciidoc-8.6.8/tests/testasciidoc.py 2014-02-10 17:16:54.965502188 +0100 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python2 + + USAGE = '''Usage: testasciidoc.py [OPTIONS] COMMAND + diff --git a/SOURCES/asciidoc-8.6.8-music-noship.patch b/SOURCES/asciidoc-8.6.8-music-noship.patch new file mode 100644 index 00000000..c0fc89b1 --- /dev/null +++ b/SOURCES/asciidoc-8.6.8-music-noship.patch @@ -0,0 +1,103 @@ +diff -uNr asciidoc-8.6.8-orig/examples/website/build-website.sh asciidoc-8.6.8/examples/website/build-website.sh +--- asciidoc-8.6.8-orig/examples/website/build-website.sh 2013-09-13 10:46:05.486227851 -0400 ++++ asciidoc-8.6.8/examples/website/build-website.sh 2013-09-13 10:50:35.036112150 -0400 +@@ -20,6 +20,5 @@ + $ASCIIDOC_HTML README-website.txt + $ASCIIDOC_HTML support.txt + $ASCIIDOC_HTML source-highlight-filter.txt +-$ASCIIDOC_HTML music-filter.txt + $ASCIIDOC_HTML a2x.1.txt + $ASCIIDOC_HTML asciimath.txt +diff -uNr asciidoc-8.6.8-orig/tests/data/filters-test.txt asciidoc-8.6.8/tests/data/filters-test.txt +--- asciidoc-8.6.8-orig/tests/data/filters-test.txt 2013-09-13 10:46:05.496229029 -0400 ++++ asciidoc-8.6.8/tests/data/filters-test.txt 2013-09-13 10:51:12.370110678 -0400 +@@ -54,37 +54,3 @@ + --------------------------------------------------------------------- + + +-== Music filter +- +-.A tune generated from ABC notation +-[music,music1.png] +---------------------------------------------------------------------- +-T:The Butterfly +-R:slip jig +-C:Tommy Potts +-H:Fiddle player Tommy Potts made this tune from two older slip jigs, +-H:one of which is called "Skin the Peelers" in Roche's collection. +-D:Bothy Band: 1975. +-M:9/8 +-K:Em +-vB2(E G2)(E F3)|B2(E G2)(E F)ED|vB2(E G2)(E F3)|(B2d) d2(uB A)FD:| +-|:(vB2c) (e2f) g3|(uB2d) (g2e) (dBA)|(B2c) (e2f) g2(ua|b2a) (g2e) (dBA):| +-|:~B3 (B2A) G2A|~B3 BA(uB d)BA|~B3 (B2A) G2(A|B2d) (g2e) (dBA):| +---------------------------------------------------------------------- +- +-<>. +- +-[[X1]] +-.A fragment generated from LilyPond source +-["music", "music2.png", "ly", link="music2.ly"] +---------------------------------------------------------------------- +-\version "2.10.0" +-\paper { +- ragged-right = ##t +-} +-{ +- \time 3/4 +- \clef bass +- c2 e4 g2. f4 e d c2 r4 +-} +---------------------------------------------------------------------- +diff -uNr asciidoc-8.6.8-orig/tests/data/open-block-test.txt asciidoc-8.6.8/tests/data/open-block-test.txt +--- asciidoc-8.6.8-orig/tests/data/open-block-test.txt 2013-09-13 10:46:05.498229242 -0400 ++++ asciidoc-8.6.8/tests/data/open-block-test.txt 2013-09-13 10:51:28.746109565 -0400 +@@ -103,15 +103,3 @@ + digraph G { rankdir=LR; Graphviz->AsciiDoc->HTML} + -- + +-[music] +--- +-\version "2.10.0" +-\paper { +- ragged-right = ##t +-} +-{ +- \time 3/4 +- \clef bass +- c2 e4 g2. f4 e d c2 r4 +-} +--- +diff -uNr asciidoc-8.6.8-orig/tests/data/testcases.txt asciidoc-8.6.8/tests/data/testcases.txt +--- asciidoc-8.6.8-orig/tests/data/testcases.txt 2013-09-13 10:46:05.498229242 -0400 ++++ asciidoc-8.6.8/tests/data/testcases.txt 2013-09-13 10:50:35.037112150 -0400 +@@ -310,7 +310,7 @@ + + // Images and icons directories. + :imagesdir: ../../doc +-image::music2.png[] ++// image::music2.png[] + + :icons: + :iconsdir: ../../images/icons +diff -uNr asciidoc-8.6.8-orig/doc/slidy-example.txt asciidoc-8.6.8/doc/slidy-example.txt +--- asciidoc-8.6.8-orig/doc/slidy-example.txt 2013-09-13 10:46:05.484227592 -0400 ++++ asciidoc-8.6.8/doc/slidy-example.txt 2013-09-13 12:30:43.225757230 -0400 +@@ -151,17 +151,3 @@ + else: + return word + --------------------------------------------------------------------- +- +-[music] +-.Music +---------------------------------------------------------------------- +-\version "2.10.0" +-\paper { +- ragged-right = ##t +-} +-{ +- \time 3/4 +- \clef bass +- c2 e4 g2. f4 e d c2 r4 +-} +---------------------------------------------------------------------- diff --git a/SPECS/asciidoc.spec b/SPECS/asciidoc.spec new file mode 100644 index 00000000..fcb12eb9 --- /dev/null +++ b/SPECS/asciidoc.spec @@ -0,0 +1,281 @@ +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%global vimdir %{_datadir}/vim/vimfiles + +Summary: Text based document generation +Name: asciidoc +Version: 8.6.8 +Release: 5%{?dist} +# 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/ +Source: http://sourceforge.net/projects/asciidoc/files/%{name}/%{version}/%{name}-%{version}.tar.gz +Patch0: asciidoc-8.6.8-music-noship.patch +Patch1: asciidoc-8.6.8-explicit-interpreter.patch + +BuildRequires: python2-devel +BuildRequires: dblatex +BuildRequires: graphviz +BuildRequires: libxslt +%if 0%{?rhel} == 0 +BuildRequires: lilypond +%endif +BuildRequires: source-highlight +BuildRequires: texlive-dvipng-bin +BuildRequires: vim-filesystem +BuildRequires: symlinks + + +Requires: python >= 2.4 +Requires: docbook-style-xsl +Requires: graphviz +Requires: libxslt +Requires: libxslt +Requires: source-highlight +Requires: vim-filesystem + +BuildArch: noarch + +%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. + +%package doc +Summary: Additional documentation and examples for asciidoc +Requires: %{name} = %{version}-%{release} + +%description doc +%{summary}. + +%package latex +Summary: Support for asciidoc latex output +Requires: %{name} = %{version}-%{release} +Requires: dblatex +Requires: texlive-dvipng-bin + +%description latex +%{summary}. + +%if 0%{?rhel} == 0 +%package music +Summary: Support for asciidoc music output +Requires: %{name} = %{version}-%{release} +Requires: lilypond + +%description music +%{summary}. +%endif + +%prep +%setup -q +%patch0 -p1 -b .music-noship +%patch1 -p1 -b .explicit-interpreter + +# Fix line endings on COPYRIGHT file +sed -i "s/\r//g" COPYRIGHT + +# Convert CHANGELOG and README to utf-8 +for file in CHANGELOG README; do + iconv -f ISO-8859-1 -t UTF-8 -o $file.new $file && \ + touch -r $file $file.new && \ + mv $file.new $file +done + +# Remove music-filter doc +rm -f doc/music-filter.txt + +%build +%configure + +%install +make install docs DESTDIR=%{buildroot} + +install -dm 755 %{buildroot}%{_datadir}/asciidoc/ +# real conf data goes to sysconfdir, rest to datadir; symlinks so asciidoc works +for d in dblatex docbook-xsl images javascripts stylesheets; do + mv -v %{buildroot}%{_sysconfdir}/asciidoc/$d \ + %{buildroot}%{_datadir}/asciidoc/ + # absolute symlink into buildroot is intentional, see below + ln -s %{buildroot}%{_datadir}/%{name}/$d %{buildroot}%{_sysconfdir}/%{name}/ + + # let's symlink stuff for documentation as well so we don't duplicate things + rm -rf %{buildroot}%{_docdir}/%{name}/$d + # absolute symlink into buildroot is intentional, see below + ln -s %{buildroot}%{_datadir}/%{name}/$d %{buildroot}%{_docdir}/%{name}/ +done + +# Python API +install -Dpm 644 asciidocapi.py %{buildroot}%{python_sitelib}/asciidocapi.py + +# Make it easier to %exclude these with both rpm < and >= 4.7 +for file in %{buildroot}{%{_bindir},%{_sysconfdir}/asciidoc/filters/*}/*.py ; do + touch ${file}{c,o} +done + +mkdir -p %{buildroot}%{vimdir}/{ftdetect,syntax} +for file in $(cd vim; find * -type f); do + install -m 0644 vim/$file %{buildroot}%{vimdir}/$file +done + +# Remove music files for RHEL +%if 0%{?rhel} >= 0 +rm -rf %{buildroot}{%{_sysconfdir}/asciidoc/filters/music,%{_sysconfdir}/asciidoc/filters/music/*.conf,%{_sysconfdir}/asciidoc/filters/music/*.py} +%endif + +# Absolute symlinks were used above to be able to detect dangling ones. Make +# them relative now (sane for being installed) and remove dangling symlinks. +symlinks -cdr %{buildroot} + +%check +export PATH="../:$PATH" +cd tests +python testasciidoc.py update +python testasciidoc.py run + +%files +%doc COPYING COPYRIGHT BUGS CHANGELOG README +%doc %{_mandir}/man1/a2x.1* +%doc %{_mandir}/man1/asciidoc.1* +%config(noreplace) %{_sysconfdir}/asciidoc/ +%{_bindir}/a2x +%{_bindir}/a2x.py +%{_bindir}/asciidoc +%{_bindir}/asciidoc.py +%{_datadir}/asciidoc/ +%{python_sitelib}/asciidocapi.py* +%{vimdir}/ftdetect/asciidoc_filetype.vim +%{vimdir}/syntax/asciidoc.vim +%exclude %{_bindir}/*.py[co] +%exclude %{_sysconfdir}/asciidoc/filters/*/*.py[co] +%exclude %{_sysconfdir}/asciidoc/filters/latex +%exclude %{_sysconfdir}/asciidoc/filters/music + +%files doc +%{_docdir}/%{name} +%exclude %{_docdir}/%{name}/{BUGS,CHANGELOG,COPYING,COPYRIGHT,README} + +%files latex +%dir %{_sysconfdir}/asciidoc/filters/latex +%{_sysconfdir}/asciidoc/filters/latex/*.py +%{_sysconfdir}/asciidoc/filters/latex/*.conf + +%if 0%{?rhel} == 0 +%files music +%dir %{_sysconfdir}/asciidoc/filters/music +%{_sysconfdir}/asciidoc/filters/music/*.conf +%{_sysconfdir}/asciidoc/filters/music/*.py +%endif + + +%changelog +* Mon Feb 10 2014 Nils Philippsen - 8.6.8-5 +- explicitly use system copy of Python 2.x (#987011) +- fix broken and remove dangling symlinks + +* Fri Dec 27 2013 Daniel Mach - 8.6.8-3 +- Mass rebuild 2013-12-27 + +* Thu Oct 3 2013 Paul W. Frields - 8.6.8-2 +- Do not build or test musicfilter + +* Thu Mar 7 2013 Stanislav Ochotnicky - 8.6.8-1 +- Update to latest upstream version +- Move things around make docs dir actually working +- Add proper requires on vim-filesystem +- Run testsuite +- Split music and latex support to subpackages + +* Wed Feb 13 2013 Fedora Release Engineering - 8.4.5-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Jul 18 2012 Fedora Release Engineering - 8.4.5-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Thu Jan 12 2012 Fedora Release Engineering - 8.4.5-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Feb 09 2011 Fedora Release Engineering - 8.4.5-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Wed Jul 21 2010 David Malcolm - 8.4.5-5 +- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild + +* Tue Sep 8 2009 Ville Skyttä - 8.4.5-4 +- Remaining improvements from #480288: +- Add dependencies on libxslt and docbook-style-xsl. +- Install dblatex style sheets. +- Exclude unneeded *.py[co]. +- Install python API. +- Specfile cleanups. + +* Thu Aug 13 2009 Todd Zullinger - 8.4.5-3 +- Use 'unsafe' mode by default (bug 506953) +- Install filter scripts in %%{_datadir}/asciidoc +- Convert spec file, CHANGELOG, and README to utf-8 +- Preserve timestamps on installed files, where feasible +- s/$RPM_BUILD_ROOT/%%{buildroot} and drop duplicated /'s +- Fix rpmlint mixed-use-of-spaces-and-tabs and end-of-line-encoding warnings + +* Fri Jul 24 2009 Fedora Release Engineering - 8.4.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Fri Jun 19 2009 Dave Airlie 8.4.5-1 +- new upstream version 8.4.5 - required by X.org libXi to build + +* Mon Feb 23 2009 Fedora Release Engineering - 8.2.5-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Thu May 22 2008 Tom "spot" Callaway - 8.2.5-3 +- fix license tag + +* Wed Dec 05 2007 Florian La Roche - 8.2.5-2 +- remove doc/examples from filelist due to dangling symlinks + +* Tue Nov 20 2007 Florian La Roche - 8.2.5-1 +- new upstream version 8.2.5 + +* Mon Oct 22 2007 Florian La Roche - 8.2.3-1 +- new upstream version 8.2.3 + +* Sat Sep 01 2007 Florian La Roche - 8.2.2-1 +- new upstream version 8.2.2 + +* Mon Mar 19 2007 Chris Wright - 8.1.0-1 +- update to asciidoc 8.1.0 + +* Thu Sep 14 2006 Chris Wright - 7.0.2-3 +- rebuild for Fedora Extras 6 + +* Tue Feb 28 2006 Chris Wright - 7.0.2-2 +- rebuild for Fedora Extras 5 + +* Mon Aug 29 2005 Chris Wright - 7.0.2-1 +- convert spec file to UTF-8 +- Source should be URL +- update to 7.0.2 + +* Fri Aug 19 2005 Chris Wright - 7.0.1-3 +- consistent use of RPM_BUILD_ROOT + +* Thu Aug 18 2005 Chris Wright - 7.0.1-2 +- Update BuildRoot +- use _datadir +- use config and _sysconfdir + +* Wed Jun 29 2005 Terje Røsten - 7.0.1-1 +- 7.0.1 +- Drop patch now upstream +- Build as noarch (Petr Klíma) + +* Sat Jun 11 2005 Terje Røsten - 7.0.0-0.3 +- Add include patch + +* Fri Jun 10 2005 Terje Røsten - 7.0.0-0.2 +- Fix stylesheets according to Stuart + +* Fri Jun 10 2005 Terje Røsten - 7.0.0-0.1 +- Initial package +- Based on Debian package, thx!