asciidoc/asciidoc.spec

132 lines
3.8 KiB
RPMSpec
Raw Normal View History

2019-09-30 10:31:39 -04:00
Name: asciidoc
2020-11-12 18:50:53 +08:00
Version: 9.0.4
Release: 1
2019-11-06 19:01:53 +08:00
Summary: Python 3 port of Asciidoc Python.
2019-09-30 10:31:39 -04:00
License: GPLv2
URL: http://asciidoc.org
2020-11-12 18:50:53 +08:00
Source0: https://github.com/%{name}/%{name}-py3/archive/%{version}/%{name}-py3-%{version}.tar.gz
2019-09-30 10:31:39 -04:00
BuildRequires: python3-devel docbook-style-xsl graphviz libxslt source-highlight
2019-11-06 19:01:53 +08:00
BuildRequires: texlive-dvisvgm-bin vim-filesystem symlinks automake autoconf
2019-09-30 10:31:39 -04:00
Requires: python3 docbook-style-xsl graphviz libxslt source-highlight vim-filesystem
Requires: %{name} = %{version}-%{release}
2019-11-06 19:01:53 +08:00
Obsoletes: %{name}-latex < %{version}-%{release} %{name}-music < %{version}-%{release}
Provides: %{name}-latex = %{version}-%{release} %{name}-music = %{version}-%{release}
2019-09-30 10:31:39 -04:00
BuildArch: noarch
%description
Python 3 port of Asciidoc Python, this is a development work in progress,
but passes all tests, real world testing is very much welcomed.
%package_help
Requires: %{name} = %{version}-%{release}
2019-11-06 19:01:53 +08:00
Obsoletes: %{name}-doc < %{version}-%{release}
Provides: %{name}-doc = %{version}-%{release}
2019-09-30 10:31:39 -04:00
%prep
2020-11-12 18:50:53 +08:00
%autosetup -n %{name}-py3-%{version}
2019-09-30 10:31:39 -04:00
%build
autoreconf -v
%configure
%make_build
%install
make install docs DESTDIR=%{buildroot}
2019-11-06 19:01:53 +08:00
install -d -m 755 %{buildroot}%{_datadir}/%{name}/
2019-09-30 10:31:39 -04:00
for d in docbook-xsl images javascripts stylesheets; do
2019-11-06 19:01:53 +08:00
mv -v %{buildroot}%{_sysconfdir}/%{name}/$d %{buildroot}%{_datadir}/%{name}/
2019-09-30 10:31:39 -04:00
ln -s %{buildroot}%{_datadir}/%{name}/$d %{buildroot}%{_sysconfdir}/%{name}/
rm -rf %{buildroot}%{_docdir}/%{name}/$d
ln -s %{buildroot}%{_datadir}/%{name}/$d %{buildroot}%{_docdir}/%{name}/
done
mkdir -p %{buildroot}%{python3_sitelib}/
sed '1d' asciidocapi.py > %{buildroot}%{python3_sitelib}/asciidocapi.py
chmod -x %{buildroot}%{python3_sitelib}/asciidocapi.py
touch -r asciidocapi.py %{buildroot}%{python3_sitelib}/asciidocapi.py
2019-11-06 19:01:53 +08:00
for file in %{buildroot}{%{_bindir},%{_sysconfdir}/%{name}/filters/*}/*.py ; do
2019-09-30 10:31:39 -04:00
touch ${file}{c,o}
done
mkdir -p %{buildroot}/%{_datadir}/vim/vimfiles/{ftdetect,syntax}
for file in $(cd vim; find * -type f); do
install -m 0644 vim/$file %{buildroot}/%{_datadir}/vim/vimfiles/$file
done
symlinks -cdr %{buildroot}
2020-11-12 18:50:53 +08:00
# Clean up no needed doc files
2019-09-30 10:31:39 -04:00
rm -f %{buildroot}/%{_pkgdocdir}/INSTALL.txt
2020-11-12 18:50:53 +08:00
rm -f %{buildroot}/%{_mandir}/man1/testasciidoc.1*
2019-09-30 10:31:39 -04:00
%check
export PATH="../:$PATH"
cd tests
%{__python3} testasciidoc.py update
%{__python3} testasciidoc.py run
cd ..
2019-11-06 19:01:53 +08:00
%pre
%preun
%post
%postun
2019-09-30 10:31:39 -04:00
%files
2019-11-06 19:01:53 +08:00
%doc BUGS.txt CHANGELOG.txt README.asciidoc
2020-11-12 18:50:53 +08:00
%license COPYRIGHT
2019-11-06 19:01:53 +08:00
%config(noreplace) %{_sysconfdir}/%{name}/
%dir %{_sysconfdir}/%{name}/filters/latex
%{_sysconfdir}/%{name}/filters/latex/*.py
%config(noreplace) %{_sysconfdir}/%{name}/filters/latex/*.conf
%dir %{_sysconfdir}/%{name}/filters/music
%config(noreplace) %{_sysconfdir}/%{name}/filters/music/*.conf
%{_sysconfdir}/%{name}/filters/music/*.py
2019-09-30 10:31:39 -04:00
%{_bindir}/a2x
%{_bindir}/a2x.py
2019-11-06 19:01:53 +08:00
%{_bindir}/%{name}
2019-09-30 10:31:39 -04:00
%{_bindir}/asciidoc.py
2019-11-06 19:01:53 +08:00
%{_datadir}/%{name}/
2019-09-30 10:31:39 -04:00
%{python3_sitelib}/asciidocapi.py*
%{python3_sitelib}/__pycache__/asciidocapi*
%exclude %{_bindir}/*.py[co]
2019-11-06 19:01:53 +08:00
%exclude %{_sysconfdir}/%{name}/filters/*/*.py[co]
2019-09-30 10:31:39 -04:00
%exclude %{_pkgdocdir}/doc
2020-11-12 18:50:53 +08:00
%exclude %{_pkgdocdir}/website
2019-09-30 10:31:39 -04:00
%exclude %{_pkgdocdir}/{docbook-xsl,images,javascripts,stylesheets}
%files help
%doc %{_mandir}/man1/a2x.1*
%doc %{_mandir}/man1/asciidoc.1*
%{_pkgdocdir}/doc
2020-11-12 18:50:53 +08:00
%{_pkgdocdir}/website
2019-09-30 10:31:39 -04:00
%{_pkgdocdir}/{dblatex,docbook-xsl,images,javascripts,stylesheets}
%exclude %{_docdir}/%{name}/{COPYING,COPYRIGHT,README.asciidoc}
%changelog
2020-11-12 18:50:53 +08:00
*Thu Nov 12 2020 shixuantong <shixuantong@huawei.com> - 9.0.4-1
- Type:NA
- ID:NA
- SUG:NA
- DESC:Update to latest upstream release 9.0.4 and update Source0
2019-11-06 19:01:53 +08:00
* Mon Oct 28 2019 caomeng <caomeng5@huawei.com> - 8.6.10-3
- Type:NA
- ID:NA
- SUG:NA
- DESC:remove build requirement ImageMagick
* Mon Oct 21 2019 openEuler Buildteam <buildteam@openeuler.org> - 8.6.10-2
- Package rebuild.
2019-09-30 10:31:39 -04:00
* Mon Sep 09 2019 openEuler Buildteam <buildteam@openeuler.org> - 8.6.10-1
2019-11-06 19:01:53 +08:00
- Package init.