3 Star 0 Fork 1

OpenCloudOS Stream/gi-docgen

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
gi-docgen.spec 3.87 KB
一键复制 编辑 原始数据 按行查看 历史
fanjunkong 提交于 2024-09-05 16:42 . update
%define doc_pdf 1
Name: gi-docgen
Version: 2024.1
Release: 1%{?dist}
Summary: Documentation tool for GObject-based libraries
License: %{shrink:
(Apache-2.0 OR GPL-3.0-or-later) AND
BSD-2-Clause AND
MIT AND
CC0-1.0
}
URL: https://gitlab.gnome.org/GNOME/gi-docgen
Source0: %{url}/-/archive/%{version}/gi-docgen-%{version}.tar.bz2
Patch: gi-docgen-2022.2-no-web-fonts.patch
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3dist(pytest)
%if %{with doc_pdf}
BuildRequires: make
BuildRequires: python3dist(sphinx)
BuildRequires: python3dist(sphinx-rtd-theme)
BuildRequires: python3-sphinx-latex
BuildRequires: latexmk
%endif
BuildRequires: font(redhatdisplay)
BuildRequires: font(redhatdisplayblack)
BuildRequires: font(redhatdisplaymedium)
BuildRequires: font(redhattext)
BuildRequires: font(redhattextmedium)
BuildRequires: font(sourcecodepro)
BuildRequires: font(sourcecodeprosemibold)
Requires: gi-docgen-fonts = %{version}-%{release}
Provides: bundled(js-fzy)
%description
GI-DocGen is a document generator for GObject-based libraries. GObject is the
base type system of the GNOME project. GI-Docgen reuses the introspection data
generated by GObject-based libraries to generate the API reference of these
libraries, as well as other ancillary documentation.
GI-DocGen is not a general purpose documentation tool for C libraries.
While GI-DocGen can be used to generate API references for most GObject/C
libraries that expose introspection data, its main goal is to generate the
reference for GTK and its immediate dependencies. Any and all attempts at
making this tool more generic, or to cover more use cases, will be weighted
heavily against its primary goal.
GI-DocGen is still in development. The recommended use of GI-DocGen is to add
it as a sub-project to your Meson build system, and vendor it when releasing
dist archives.
You should not depend on a system-wide installation until GI-DocGen is declared
stable.
%package fonts
Summary: Metapackage providing fonts for gi-docgen output
License: Apache-2.0 OR GPL-3.0-or-later
Requires: font(redhatdisplay)
Requires: font(redhatdisplayblack)
Requires: font(redhatdisplaymedium)
Requires: font(redhattext)
Requires: font(redhattextmedium)
Requires: font(sourcecodepro)
Requires: font(sourcecodeprosemibold)
%description fonts
Because web fonts from upstream are not bundled in the gi-docgen package,
documentation packages generated with gi-docgen must depend on this metapackage
to ensure the proper system fonts are present.
%package doc
Summary: Documentation for gi-docgen
License: (Apache-2.0 OR GPL-3.0-or-later) AND CC0-1.0
%description doc
Documentation for gi-docgen.
%generate_buildrequires
%pyproject_buildrequires
%prep
%autosetup -p1
find . -type f \( -name '*.woff' -o -name '*.woff2' \) -print -delete
%build
%pyproject_wheel
%if %{with doc_pdf}
sphinx-build -b latex -j%{?_smp_build_ncpus} docs %{_vpath_builddir}/_latex
%make_build -C %{_vpath_builddir}/_latex LATEXMKOPTS='-quiet'
%endif
%install
%pyproject_install
%pyproject_save_files gidocgen
install -t '%{buildroot}%{_pkgdocdir}' -D -m 0644 -p \
CHANGES.md \
CONTRIBUTING.md \
docs/CODEOWNERS
%if %{with doc_pdf}
install -t '%{buildroot}%{_pkgdocdir}' -p -m 0644 \
'%{_vpath_builddir}/_latex/gi-docgen.pdf'
%endif
cp -rp examples '%{buildroot}%{_pkgdocdir}/'
%check
%pytest
%files -f %{pyproject_files}
%license LICENSES/ .reuse/dep5
%{_bindir}/gi-docgen
%{_mandir}/man1/gi-docgen.1*
%{_datadir}/pkgconfig/gi-docgen.pc
%files fonts
%files doc
%license LICENSES/ .reuse/dep5
%doc %{_pkgdocdir}/
%changelog
* Mon Apr 15 2024 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 2024.1-1
- initial build
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/opencloudos-stream/gi-docgen.git
git@gitee.com:opencloudos-stream/gi-docgen.git
opencloudos-stream
gi-docgen
gi-docgen
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385