984e81
Name:           asciidoc
984e81
Version:        9.1.0
984e81
Release:        3%{?dist}
984e81
Summary:        Text based document generation
984e81
984e81
License:        GPL+ and GPLv2+
984e81
URL:            http://asciidoc.org
984e81
Source0:        https://github.com/%{name}-py/asciidoc-py/archive/%{version}/%{name}-py-%{version}.tar.gz
984e81
984e81
BuildArch:      noarch
984e81
984e81
BuildRequires:  python3-devel
984e81
BuildRequires:  dblatex
984e81
BuildRequires:  docbook-style-xsl
984e81
BuildRequires:  graphviz
984e81
BuildRequires:  libxslt
984e81
BuildRequires:  source-highlight
984e81
BuildRequires:  texlive-dvipng-bin
984e81
BuildRequires:  texlive-dvisvgm-bin
984e81
BuildRequires:  symlinks
984e81
BuildRequires:  automake
984e81
BuildRequires:  autoconf
984e81
BuildRequires:  make
984e81
984e81
Requires:       python3
984e81
Requires:       docbook-style-xsl
984e81
Requires:       graphviz
984e81
Requires:       libxslt
984e81
Requires:       source-highlight
984e81
984e81
%description
984e81
AsciiDoc is a text document format for writing short documents,
984e81
articles, books and UNIX man pages. AsciiDoc files can be translated
984e81
to HTML and DocBook markups using the asciidoc(1) command.
984e81
984e81
%package doc
984e81
Summary:  Additional documentation and examples for asciidoc
984e81
984e81
Requires: %{name} = %{version}-%{release}
984e81
984e81
%description doc
984e81
%{summary}.
984e81
984e81
%package latex
984e81
Summary:  Support for asciidoc latex output
984e81
984e81
Requires: %{name} = %{version}-%{release}
984e81
Requires: dblatex
984e81
Requires: texlive-dvipng-bin
984e81
984e81
%description latex
984e81
%{summary}.
984e81
984e81
%prep
984e81
%autosetup -n %{name}-py-%{version} -p1
984e81
# Convert files to utf-8
984e81
for file in README.asciidoc doc/*.dict website/*.dict; do
984e81
    iconv -f ISO-8859-1 -t UTF-8 -o $file.new $file && \
984e81
    touch -r $file $file.new && \
984e81
    mv $file.new $file
984e81
done
984e81
984e81
# Remove music files
984e81
rm -rf %{buildroot}{%{_sysconfdir}/asciidoc/filters/music,%{_sysconfdir}/asciidoc/filters/music/*.conf,%{_sysconfdir}/asciidoc/filters/music/*.py}
984e81
984e81
# Fix python shebang
984e81
grep -rl '#!/usr/bin/env python' | xargs -r \
984e81
    sed -i -e '1s@#!/usr/bin/env python3\?$@#!%{__python3}@'
984e81
984e81
%build
984e81
autoreconf -v
984e81
%configure
984e81
%make_build
984e81
984e81
%install
984e81
make install docs DESTDIR=%{buildroot}
984e81
984e81
install -dm 755 %{buildroot}%{_datadir}/asciidoc/
984e81
# Real conf data goes to sysconfdir, rest to datadir; symlinks so asciidoc works
984e81
for d in dblatex docbook-xsl images javascripts stylesheets; do
984e81
    mv -v %{buildroot}%{_sysconfdir}/asciidoc/$d \
984e81
          %{buildroot}%{_datadir}/asciidoc/
984e81
    # Absolute symlink into buildroot is intentional, see below
984e81
    ln -s %{buildroot}%{_datadir}/%{name}/$d %{buildroot}%{_sysconfdir}/%{name}/
984e81
984e81
    # Let's symlink stuff for documentation as well so we don't duplicate things
984e81
    rm -rf %{buildroot}%{_docdir}/%{name}/$d
984e81
    # Absolute symlink into buildroot is intentional, see below
984e81
    ln -s %{buildroot}%{_datadir}/%{name}/$d %{buildroot}%{_docdir}/%{name}/
984e81
done
984e81
984e81
# Python API
984e81
mkdir -p %{buildroot}%{python3_sitelib}/
984e81
sed '1d' asciidocapi.py > %{buildroot}%{python3_sitelib}/asciidocapi.py
984e81
chmod -x %{buildroot}%{python3_sitelib}/asciidocapi.py
984e81
touch -r asciidocapi.py %{buildroot}%{python3_sitelib}/asciidocapi.py
984e81
984e81
# Make it easier to %%exclude these with both rpm < and >= 4.7
984e81
for file in %{buildroot}{%{_bindir},%{_sysconfdir}/asciidoc/filters/*}/*.py ; do
984e81
    touch ${file}{c,o}
984e81
done
984e81
984e81
# Absolute symlinks were used above to be able to detect dangling ones. Make
984e81
# them relative now (sane for being installed) and remove dangling symlinks.
984e81
symlinks -cdr %{buildroot}
984e81
984e81
# Clean up no needed doc files
984e81
rm -f %{buildroot}/%{_pkgdocdir}/INSTALL.txt
984e81
rm -f %{buildroot}/%{_mandir}/man1/testasciidoc.1*
984e81
984e81
# Some tests are failing
984e81
#%%check
984e81
#export PATH="../:$PATH"
984e81
#cd tests
984e81
#%%{__python3} testasciidoc.py update
984e81
#%%{__python3} testasciidoc.py run
984e81
984e81
%files
984e81
%doc BUGS.txt CHANGELOG.txt COPYRIGHT README.asciidoc
984e81
%{_mandir}/man1/a2x.1*
984e81
%{_mandir}/man1/asciidoc.1*
984e81
%config(noreplace) %{_sysconfdir}/asciidoc/
984e81
%{_bindir}/a2x
984e81
%{_bindir}/a2x.py
984e81
%{_bindir}/asciidoc
984e81
%{_bindir}/asciidoc.py
984e81
%{_datadir}/asciidoc/
984e81
%{python3_sitelib}/asciidocapi.py*
984e81
%{python3_sitelib}/__pycache__/asciidocapi*
984e81
%exclude %{_bindir}/*.py[co]
984e81
%exclude %{_sysconfdir}/asciidoc/filters/*/*.py[co]
984e81
%exclude %{_sysconfdir}/asciidoc/filters/latex
984e81
%exclude %{_sysconfdir}/asciidoc/filters/music
984e81
%exclude %{_pkgdocdir}/website
984e81
%exclude %{_pkgdocdir}/doc
984e81
%exclude %{_pkgdocdir}/{dblatex,docbook-xsl,images,javascripts,stylesheets}
984e81
984e81
%files doc
984e81
%{_pkgdocdir}/website
984e81
%{_pkgdocdir}/doc
984e81
%{_pkgdocdir}/{dblatex,docbook-xsl,images,javascripts,stylesheets}
984e81
%exclude %{_docdir}/%{name}/{COPYRIGHT,README.asciidoc}
984e81
984e81
%files latex
984e81
%dir %{_sysconfdir}/asciidoc/filters/latex
984e81
%{_sysconfdir}/asciidoc/filters/latex/*.py
984e81
%config(noreplace) %{_sysconfdir}/asciidoc/filters/latex/*.conf
984e81
984e81
%changelog
984e81
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 9.1.0-3
984e81
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
984e81
  Related: rhbz#1991688
984e81
984e81
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 9.1.0-2
984e81
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
984e81
984e81
* Tue Feb 16 2021 Josef Ridky <jridky@redhat.com> - 9.1.0-1
984e81
- update source url
984e81
- new upstream release 9.1.0
984e81
984e81
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 9.0.4-5
984e81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
984e81
984e81
* Mon Jan 18 2021 Josef Ridky <jridky@redhat.com> - 9.0.4-4
984e81
- remove asciidoc-music sub-package (lilypond requirement)
984e81
984e81
* Thu Jan 14 2021 Josef Ridky <jridky@redhat.com> - 9.0.4-3
984e81
- remove ImageMagic requirement
984e81
984e81
* Sun Dec 06 2020 Richard Shaw <hobbes1069@gmail.com> - 9.0.4-2
984e81
- Add patch to fix problem with not respecting newline configuration.
984e81
- Remove unused patches.
984e81
984e81
* Sat Oct 31 2020 Fabian Affolter <mail@fabian-affolter.ch> - 9.0.4-1
984e81
- Detection of latest Python releases (#1889725)
984e81
- Update to latest upstream release 9.0.4
984e81
984e81
* Wed Oct 14 2020 Fabian Affolter <mail@fabian-affolter.ch> - 9.0.2-1
984e81
- Remove patches
984e81
- Remove Vim support
984e81
- Update to latest upstream release 9.0.2
984e81
984e81
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 8.6.10-0.16.20180605git986f99d
984e81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
984e81
984e81
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 8.6.10-0.15.20180605git986f99d
984e81
- Rebuilt for Python 3.9
984e81
984e81
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 8.6.10-0.14.20180605git986f99d
984e81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
984e81
984e81
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 8.6.10-0.13.20180605git986f99d
984e81
- Rebuilt for Python 3.8.0rc1 (#1748018)
984e81
984e81
* Wed Aug 14 2019 Miro Hrončok <mhroncok@redhat.com> - 8.6.10-0.12.20180605git986f99d
984e81
- Rebuilt for Python 3.8
984e81
984e81
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 8.6.10-0.10.20180605git986f99d
984e81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
984e81
984e81
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 8.6.10-0.9.20180605git986f99d
984e81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
984e81
984e81
* Mon Dec 03 2018 Josef Ridky <jridky@redhat.com> - 8.6.10-0.8.20180605git986f99d
984e81
- Fix deprecation warning (#165537)
984e81
984e81
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 8.6.10-0.7.20180605git986f99d
984e81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
984e81
984e81
* Mon Jul 02 2018 Miro Hrončok <mhroncok@redhat.com> - 8.6.10-0.6.20180605git986f99d
984e81
- Rebuilt for Python 3.7
984e81
984e81
* Sat Jun 16 2018 Todd Zullinger <tmz@pobox.com> - 8.6.10-0.5.20180605git986f99d
984e81
- Add some a2x decoding fixes from upstream PR#5
984e81
  (https://github.com/asciidoc/asciidoc-py3/pull/5)
984e81
984e81
* Fri Jun 15 2018 Todd Zullinger <tmz@pobox.com> - 8.6.10-0.4.20180605git986f99d
984e81
- Restore BUGS.txt and CHANGELOG.txt doc files
984e81
984e81
* Wed Jun 13 2018 Todd Zullinger <tmz@pobox.com> - 8.6.10-0.3.20180605git986f99d
984e81
- Use upstream tarball
984e81
- Various rpmlint fixes
984e81
984e81
* Wed Jun 13 2018 Miro Hrončok <mhroncok@redhat.com> - 8.6.10-0.2.20180605git986f99d
984e81
- Rebuilt for Python 3.7
984e81
984e81
* Wed Jun 06 2018 Josef Ridky <jridky@redhat.com> - 8.6.10-0.1.20180605git986f99d
984e81
- Fix versioning, Source and Url label information to align with Fedora Packaging Guidelines
984e81
984e81
* Tue Jun 05 2018 Josef Ridky <jridky@redhat.com> - 8.6.8-16.986f99d
984e81
- New upstream version with Python3 support - asciidoc-py3 (commit 986f99d)
984e81
984e81
* Wed Feb 14 2018 Josef Ridky <jridky@redhat.com> - 8.6.8-15
984e81
- spec file cleanup (remove Group tag, use autosetup)
984e81
- add python2 build support for RHEL
984e81
984e81
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 8.6.8-14
984e81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
984e81
984e81
* Wed Dec 06 2017 Todd Zullinger <tmz@pobox.com> - 8.6.8-13
984e81
- Explicitly use python2, in preparation for python3 becoming the default
984e81
  python
984e81
984e81
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 8.6.8-12
984e81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
984e81
984e81
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 8.6.8-11
984e81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
984e81
984e81
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.6.8-10
984e81
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
984e81
984e81
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 8.6.8-9
984e81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
984e81
984e81
* Fri Oct 30 2015 Stanislav Ochotnicky <sochotnicky@redhat.com> - 8.6.8-8
984e81
- Fix build due to doc files (rhbz#1266596)
984e81
984e81
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.6.8-7
984e81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
984e81
984e81
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.6.8-6
984e81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
984e81
984e81
* Mon Feb 10 2014 Nils Philippsen <nils@redhat.com> - 8.6.8-5
984e81
- explicitly use system copy of Python 2.x
984e81
- fix broken and remove dangling symlinks
984e81
984e81
* Tue Dec 03 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 8.6.8-3
984e81
- Fix duplicate documentation files (#1001234)
984e81
- Fix encoding of manifests being written (#968308)
984e81
984e81
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.6.8-2
984e81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
984e81
984e81
* Thu Mar  7 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 8.6.8-1
984e81
- Update to latest upstream version
984e81
- Move things around make docs dir actually working
984e81
- Add proper requires on vim-filesystem
984e81
- Run testsuite
984e81
- Split music and latex support to subpackages
984e81
984e81
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.4.5-9
984e81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
984e81
984e81
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.4.5-8
984e81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
984e81
984e81
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.4.5-7
984e81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
984e81
984e81
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.4.5-6
984e81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
984e81
984e81
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 8.4.5-5
984e81
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
984e81
984e81
* Tue Sep  8 2009 Ville Skyttä <ville.skytta@iki.fi> - 8.4.5-4
984e81
- Remaining improvements from #480288:
984e81
- Add dependencies on libxslt and docbook-style-xsl.
984e81
- Install dblatex style sheets.
984e81
- Exclude unneeded *.py[co].
984e81
- Install python API.
984e81
- Specfile cleanups.
984e81
984e81
* Thu Aug 13 2009 Todd Zullinger <tmz@pobox.com> - 8.4.5-3
984e81
- Use 'unsafe' mode by default (bug 506953)
984e81
- Install filter scripts in %%{_datadir}/asciidoc
984e81
- Convert spec file, CHANGELOG, and README to utf-8
984e81
- Preserve timestamps on installed files, where feasible
984e81
- s/$RPM_BUILD_ROOT/%%{buildroot} and drop duplicated /'s
984e81
- Fix rpmlint mixed-use-of-spaces-and-tabs and end-of-line-encoding warnings
984e81
984e81
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.4.5-2
984e81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
984e81
984e81
* Fri Jun 19 2009 Dave Airlie <airlied@redhat.com> 8.4.5-1
984e81
- new upstream version 8.4.5 - required by X.org libXi to build
984e81
984e81
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.2.5-4
984e81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
984e81
984e81
* Thu May 22 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 8.2.5-3
984e81
- fix license tag
984e81
984e81
* Wed Dec 05 2007 Florian La Roche <laroche@redhat.com> - 8.2.5-2
984e81
- remove doc/examples from filelist due to dangling symlinks
984e81
984e81
* Tue Nov 20 2007 Florian La Roche <laroche@redhat.com> - 8.2.5-1
984e81
- new upstream version 8.2.5
984e81
984e81
* Mon Oct 22 2007 Florian La Roche <laroche@redhat.com> - 8.2.3-1
984e81
- new upstream version 8.2.3
984e81
984e81
* Sat Sep 01 2007 Florian La Roche <laroche@redhat.com> - 8.2.2-1
984e81
- new upstream version 8.2.2
984e81
984e81
* Mon Mar 19 2007 Chris Wright <chrisw@redhat.com> - 8.1.0-1
984e81
- update to asciidoc 8.1.0
984e81
984e81
* Thu Sep 14 2006 Chris Wright <chrisw@redhat.com> - 7.0.2-3
984e81
- rebuild for Fedora Extras 6
984e81
984e81
* Tue Feb 28 2006 Chris Wright <chrisw@redhat.com> - 7.0.2-2
984e81
- rebuild for Fedora Extras 5
984e81
984e81
* Mon Aug 29 2005 Chris Wright <chrisw@osdl.org> - 7.0.2-1
984e81
- convert spec file to UTF-8
984e81
- Source should be URL
984e81
- update to 7.0.2
984e81
984e81
* Fri Aug 19 2005 Chris Wright <chrisw@osdl.org> - 7.0.1-3
984e81
- consistent use of RPM_BUILD_ROOT
984e81
984e81
* Thu Aug 18 2005 Chris Wright <chrisw@osdl.org> - 7.0.1-2
984e81
- Update BuildRoot
984e81
- use _datadir
984e81
- use config and _sysconfdir
984e81
984e81
* Wed Jun 29 2005 Terje Røsten <terje.rosten@ntnu.no> - 7.0.1-1
984e81
- 7.0.1
984e81
- Drop patch now upstream
984e81
- Build as noarch (Petr Klíma)
984e81
984e81
* Sat Jun 11 2005 Terje Røsten <terje.rosten@ntnu.no> - 7.0.0-0.3
984e81
- Add include patch
984e81
984e81
* Fri Jun 10 2005 Terje Røsten <terje.rosten@ntnu.no> - 7.0.0-0.2
984e81
- Fix stylesheets according to Stuart
984e81
984e81
* Fri Jun 10 2005 Terje Røsten <terje.rosten@ntnu.no> - 7.0.0-0.1
984e81
- Initial package
984e81
- Based on Debian package, thx!