asciidoc-vl.spec 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. Summary: Text based document generation
  2. Summary(ja): テキストベースのドキュメント生成
  3. Name: asciidoc
  4. Version: 9.1.0
  5. Release: 1%{?_dist_release}
  6. Group: office
  7. Vendor: Project Vine
  8. Distribution: Vine Linux
  9. Packager: daisuke, kenta
  10. License: GPLv2+
  11. URL: https://asciidoc.org/
  12. Source0: https://github.com/asciidoc-py/asciidoc-py/releases/download/%{version}/%{name}-%{version}.tar.gz
  13. BuildArch: noarch
  14. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  15. BuildRequires: python3
  16. BuildRequires: symlinks
  17. Requires: python3
  18. Requires: docbook-style-xsl
  19. Requires: libxslt
  20. Requires: graphviz
  21. Requires: source-highlight
  22. %description
  23. AsciiDoc is a text document format for writing short documents,
  24. articles, books and UNIX man pages. AsciiDoc files can be translated
  25. to HTML and DocBook markups using the asciidoc(1) command.
  26. %package doc
  27. Summary: Additional documentation and examples for asciidoc
  28. Group: documentation
  29. Requires: %{name} = %{version}-%{release}
  30. %description doc
  31. %{summary}.
  32. %package latex
  33. Summary: Support for asciidoc latex output
  34. Group: publishing
  35. Requires: %{name} = %{version}-%{release}
  36. Requires: texlive
  37. %description latex
  38. %{summary}.
  39. %prep
  40. %setup -q
  41. # Convert files to utf-8
  42. for file in README.asciidoc doc/*.dict website/*.dict; do
  43. iconv -f ISO-8859-1 -t UTF-8 -o $file.new $file && \
  44. touch -r $file $file.new && \
  45. mv $file.new $file
  46. done
  47. # Remove music files
  48. rm -rf %{buildroot}{%{_sysconfdir}/asciidoc/filters/music,%{_sysconfdir}/asciidoc/filters/music/*.conf,%{_sysconfdir}/asciidoc/filters/music/*.py}
  49. # Fix python shebang
  50. grep -rl '#!/usr/bin/env python' | xargs -r \
  51. sed -i -e '1s@#!/usr/bin/env python3\?$@#!%{__python3}@'
  52. %build
  53. autoreconf -v
  54. %configure
  55. %make_build
  56. %install
  57. make install docs DESTDIR=%{buildroot}
  58. install -dm 755 %{buildroot}%{_datadir}/asciidoc/
  59. # Real conf data goes to sysconfdir, rest to datadir; symlinks so asciidoc works
  60. for d in dblatex docbook-xsl images javascripts stylesheets; do
  61. mv -v %{buildroot}%{_sysconfdir}/asciidoc/$d \
  62. %{buildroot}%{_datadir}/asciidoc/
  63. # Absolute symlink into buildroot is intentional, see below
  64. ln -s %{buildroot}%{_datadir}/%{name}/$d %{buildroot}%{_sysconfdir}/%{name}/
  65. # Let's symlink stuff for documentation as well so we don't duplicate things
  66. rm -rf %{buildroot}%{_docdir}/%{name}/$d
  67. # Absolute symlink into buildroot is intentional, see below
  68. ln -s %{buildroot}%{_datadir}/%{name}/$d %{buildroot}%{_docdir}/%{name}/
  69. done
  70. # Python API
  71. mkdir -p %{buildroot}%{python3_sitelib}/
  72. sed '1d' asciidocapi.py > %{buildroot}%{python3_sitelib}/asciidocapi.py
  73. chmod -x %{buildroot}%{python3_sitelib}/asciidocapi.py
  74. touch -r asciidocapi.py %{buildroot}%{python3_sitelib}/asciidocapi.py
  75. # Make it easier to %%exclude these with both rpm < and >= 4.7
  76. for file in %{buildroot}{%{_bindir},%{_sysconfdir}/asciidoc/filters/*}/*.py ; do
  77. touch ${file}{c,o}
  78. done
  79. # Clean up no needed doc files
  80. rm -f %{buildroot}%{_pkgdocdir}/INSTALL.txt
  81. rm -f %{buildroot}%{_mandir}/man1/testasciidoc.1*
  82. rm -f %{buildroot}%{_bindir}/*.py[co]
  83. rm -f %{buildroot}%{_sysconfdir}/asciidoc/filters/*/*.py[co]
  84. # Absolute symlinks were used above to be able to detect dangling ones. Make
  85. # them relative now (sane for being installed) and remove dangling symlinks.
  86. for l in $(find %{buildroot} -type l); do symlinks -cdov $l; done
  87. %files
  88. %defattr(-,root,root,0755)
  89. %license COPYRIGHT
  90. %doc BUGS.txt CHANGELOG.txt README*
  91. %config(noreplace) %{_sysconfdir}/asciidoc
  92. %{_bindir}/*
  93. %{_mandir}/man1/*
  94. %{python3_sitelib}/asciidocapi.py*
  95. %{_datadir}/asciidoc/
  96. %exclude %{_sysconfdir}/asciidoc/filters/latex
  97. %exclude %{_sysconfdir}/asciidoc/filters/music
  98. %exclude %{_pkgdocdir}/website
  99. %exclude %{_pkgdocdir}/doc
  100. %exclude %{_pkgdocdir}/{dblatex,docbook-xsl,images,javascripts,stylesheets}
  101. %files doc
  102. %{_pkgdocdir}/website
  103. %{_pkgdocdir}/doc
  104. %{_pkgdocdir}/{dblatex,docbook-xsl,images,javascripts,stylesheets}
  105. %exclude %{_docdir}/%{name}/{COPYRIGHT,README.asciidoc}
  106. %files latex
  107. %dir %{_sysconfdir}/asciidoc/filters/latex
  108. %{_sysconfdir}/asciidoc/filters/latex/*.py
  109. %config(noreplace) %{_sysconfdir}/asciidoc/filters/latex/*.conf
  110. %changelog
  111. * Mon Mar 22 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 9.1.0-1
  112. - new upstream release.
  113. * Tue Jan 6 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 8.6.9-1
  114. - new upstream version
  115. - moved to Applications/Text Group
  116. * Sun Feb 26 2012 Munehiro Yamamoto <munepi@vinelinux.org> 8.6.6-1
  117. - new upstream version
  118. * Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 8.6.4-2
  119. - rebuild with python-2.7.2
  120. * Tue Apr 26 2011 NAKAMURA Kenta <kenta@vinelinux.org> 8.6.4-1
  121. - new upstream version 8.6.4
  122. * Wed Aug 20 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 8.2.5-1
  123. - initial build for Vine Linux
  124. * Wed Dec 05 2007 Florian La Roche <laroche@redhat.com> - 8.2.5-2
  125. - remove doc/examples from filelist due to dangling symlinks
  126. * Tue Nov 20 2007 Florian La Roche <laroche@redhat.com> - 8.2.5-1
  127. - new upstream version 8.2.5
  128. * Mon Oct 22 2007 Florian La Roche <laroche@redhat.com> - 8.2.3-1
  129. - new upstream version 8.2.3
  130. * Sat Sep 01 2007 Florian La Roche <laroche@redhat.com> - 8.2.2-1
  131. - new upstream version 8.2.2
  132. * Mon Mar 19 2007 Chris Wright <chrisw@redhat.com> - 8.1.0-1
  133. - update to asciidoc 8.1.0
  134. * Thu Sep 14 2006 Chris Wright <chrisw@redhat.com> - 7.0.2-3
  135. - rebuild for Fedora Extras 6
  136. * Tue Feb 28 2006 Chris Wright <chrisw@redhat.com> - 7.0.2-2
  137. - rebuild for Fedora Extras 5
  138. * Mon Aug 29 2005 Chris Wright <chrisw@osdl.org> - 7.0.2-1
  139. - convert spec file to UTF-8
  140. - Source should be URL
  141. - update to 7.0.2
  142. * Fri Aug 19 2005 Chris Wright <chrisw@osdl.org> - 7.0.1-3
  143. - consistent use of RPM_BUILD_ROOT
  144. * Thu Aug 18 2005 Chris Wright <chrisw@osdl.org> - 7.0.1-2
  145. - Update BuildRoot
  146. - use _datadir
  147. - use config and _sysconfdir
  148. * Wed Jun 29 2005 Terje Røsten <terje.rosten@ntnu.no> - 7.0.1-1
  149. - 7.0.1
  150. - Drop patch now upstream
  151. - Build as noarch (Petr Klíma)
  152. * Sat Jun 11 2005 Terje Røsten <terje.rosten@ntnu.no> - 7.0.0-0.3
  153. - Add include patch
  154. * Fri Jun 10 2005 Terje Røsten <terje.rosten@ntnu.no> - 7.0.0-0.2
  155. - Fix stylesheets according to Stuart
  156. * Fri Jun 10 2005 Terje Røsten <terje.rosten@ntnu.no> - 7.0.0-0.1
  157. - Initial package
  158. - Based on Debian package, thx!