1 # TODO: allow build without network (npm install)
4 %bcond_without tests # unit tests
5 %bcond_with npm # bootstrap with npm
7 Summary: A documentation tool micro-framework
8 Summary(pl.UTF-8): Mikroszkielet narzędzia do tworzenia dokumentacji
13 Group: Development/Tools
14 #Source0Download: https://github.com/hotdoc/hotdoc/releases
15 Source0: https://github.com/hotdoc/hotdoc/archive/%{version}/%{name}-%{version}.tar.gz
16 # Source0-md5: 9ddff982abb44a31c9c03b7ea00fdaad
17 Source1: https://github.com/MathieuDuponchelle/cmark/archive/db73e39/cmark-db73e39.tar.gz
18 # Source1-md5: 8b7647adcf770ae012e8594fba2a7916
19 Source2: https://github.com/PrismJS/prism/archive/eccf09f/prism-eccf09f.tar.gz
20 # Source2-md5: bf45a06cebc01ef5f36b4521bf97b410
21 Source3: https://github.com/hotdoc/hotdoc_bootstrap_theme/archive/89e04ee/hotdoc_bootstrap_theme-89e04ee.tar.gz
22 # Source3-md5: 504d2876b68042dbbbb45bcd99dc2079
23 # compressed hotdoc/hotdoc_bootstrap_theme/dist after bootstrapping npm with network (node_modules not needed?)
24 Source4: hotdoc-%{version}-hotdoc_bootstrap_theme-dist.tar.xz
25 # Source4-md5: d7907f232dbdc910457a20d445609165
26 Patch0: %{name}-setup.patch
27 Patch1: clang_libdir.patch
28 URL: https://hotdoc.github.io/
29 BuildRequires: cmake >= 2.8.9
31 BuildRequires: glib2-devel >= 2.0
32 BuildRequires: json-glib-devel
33 BuildRequires: libxml2-devel >= 2.0
34 %{?with_npm:BuildRequires: npm}
35 BuildRequires: pkgconfig
36 BuildRequires: python3 >= 1:3.5
37 BuildRequires: python3-modules >= 1:3.5
38 BuildRequires: python3-setuptools
39 BuildRequires: python3-wheel
40 # runtime dependencies, but required at build time to avoid fetching wheels from network
41 BuildRequires: python3-PyYAML >= 5.1
42 BuildRequires: python3-appdirs
43 BuildRequires: python3-cchardet
44 BuildRequires: python3-dbus-deviation >= 0.4.0
45 BuildRequires: python3-lxml
46 BuildRequires: python3-networkx >= 2.5
47 BuildRequires: python3-pkgconfig
48 BuildRequires: python3-schema
49 BuildRequires: python3-toposort >= 1.4
50 BuildRequires: python3-wheezy.template
51 # libclang.so dlopen in c extension
53 # llvm-config in c extension
55 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58 Hotdoc is a documentation micro-framework. It provides an interface
59 for extensions to plug upon, along with some base objects (formatters,
62 %description -l pl.UTF-8
63 Hotdoc to mikroszkielet do tworzenia dokumentacji. Udostępnia
64 interfejs rozszerzeń, a także trochę podstawowych obiektów (formaterów
72 %{__mv} cmark-*/* cmark
73 %{__mv} prism-*/* hotdoc/extensions/syntax_highlighting/prism
74 %{__mv} hotdoc_bootstrap_theme-*/* hotdoc/hotdoc_bootstrap_theme
77 %{__tar} xf %{SOURCE4}
80 %{__sed} -i -e '1s, /usr/bin/env sh,/bin/sh,' hotdoc/extensions/gi/transition_scripts/translate_sections.sh
83 %py3_build %{?with_tests:test}
86 rm -rf $RPM_BUILD_ROOT
90 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/hotdoc/{tests,core/tests,parsers/tests,utils/tests}
93 rm -rf $RPM_BUILD_ROOT
96 %defattr(644,root,root,755)
98 %attr(755,root,root) %{_bindir}/hotdoc
99 %attr(755,root,root) %{_bindir}/hotdoc_dep_printer
100 %{py3_sitedir}/hotdoc
101 %{py3_sitedir}/hotdoc-%{version}-py*.egg-info