Initial package
This commit is contained in:
parent
4652e43af8
commit
2f00d0af29
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/gi-docgen-2021.6.tar.bz2
|
239
gi-docgen-2021.6-no-web-fonts.patch
Normal file
239
gi-docgen-2021.6-no-web-fonts.patch
Normal file
@ -0,0 +1,239 @@
|
|||||||
|
diff -Naur gi-docgen-2021.6-original/gidocgen/templates/basic/basic.toml gi-docgen-2021.6/gidocgen/templates/basic/basic.toml
|
||||||
|
--- gi-docgen-2021.6-original/gidocgen/templates/basic/basic.toml 2021-05-26 13:20:49.000000000 -0400
|
||||||
|
+++ gi-docgen-2021.6/gidocgen/templates/basic/basic.toml 2021-06-25 17:44:49.020779921 -0400
|
||||||
|
@@ -41,35 +41,4 @@
|
||||||
|
"main.js",
|
||||||
|
"pygment.css",
|
||||||
|
"search.js",
|
||||||
|
- "RedHatDisplay-Black.woff",
|
||||||
|
- "RedHatDisplay-Black.woff2",
|
||||||
|
- "RedHatDisplay-BlackItalic.woff",
|
||||||
|
- "RedHatDisplay-BlackItalic.woff2",
|
||||||
|
- "RedHatDisplay-Bold.woff",
|
||||||
|
- "RedHatDisplay-Bold.woff2",
|
||||||
|
- "RedHatDisplay-BoldItalic.woff",
|
||||||
|
- "RedHatDisplay-BoldItalic.woff2",
|
||||||
|
- "RedHatDisplay-Italic.woff",
|
||||||
|
- "RedHatDisplay-Italic.woff2",
|
||||||
|
- "RedHatDisplay-Medium.woff",
|
||||||
|
- "RedHatDisplay-Medium.woff2",
|
||||||
|
- "RedHatDisplay-MediumItalic.woff",
|
||||||
|
- "RedHatDisplay-MediumItalic.woff2",
|
||||||
|
- "RedHatDisplay-Regular.woff",
|
||||||
|
- "RedHatDisplay-Regular.woff2",
|
||||||
|
- "RedHatText-Bold.woff",
|
||||||
|
- "RedHatText-Bold.woff2",
|
||||||
|
- "RedHatText-BoldItalic.woff",
|
||||||
|
- "RedHatText-BoldItalic.woff2",
|
||||||
|
- "RedHatText-Italic.woff",
|
||||||
|
- "RedHatText-Italic.woff2",
|
||||||
|
- "RedHatText-Medium.woff",
|
||||||
|
- "RedHatText-Medium.woff2",
|
||||||
|
- "RedHatText-MediumItalic.woff",
|
||||||
|
- "RedHatText-MediumItalic.woff2",
|
||||||
|
- "RedHatText-Regular.woff",
|
||||||
|
- "RedHatText-Regular.woff2",
|
||||||
|
- "SourceCodePro-It.ttf.woff",
|
||||||
|
- "SourceCodePro-Regular.ttf.woff",
|
||||||
|
- "SourceCodePro-Semibold.ttf.woff",
|
||||||
|
]
|
||||||
|
diff -Naur gi-docgen-2021.6-original/gidocgen/templates/basic/fonts.css gi-docgen-2021.6/gidocgen/templates/basic/fonts.css
|
||||||
|
--- gi-docgen-2021.6-original/gidocgen/templates/basic/fonts.css 2021-05-26 13:20:49.000000000 -0400
|
||||||
|
+++ gi-docgen-2021.6/gidocgen/templates/basic/fonts.css 2021-06-25 17:44:43.167747431 -0400
|
||||||
|
@@ -14,9 +14,7 @@
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: "Red Hat Display";
|
||||||
|
- src: local('RedHatDisplayWeb'),
|
||||||
|
- url("RedHatDisplay-Regular.woff2") format("woff2"),
|
||||||
|
- url("RedHatDisplay-Regular.woff") format("woff");
|
||||||
|
+ src: local('RedHatDisplay-Regular');
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
font-display: fallback;
|
||||||
|
@@ -24,9 +22,7 @@
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: "Red Hat Display";
|
||||||
|
- src: local('RedHatDisplayWeb'),
|
||||||
|
- url("RedHatDisplay-RegularItalic.woff2") format("woff2"),
|
||||||
|
- url("RedHatDisplay-RegularItalic.woff") format("woff");
|
||||||
|
+ src: local('RedHatDisplay-RegularItalic');
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: 400;
|
||||||
|
font-display: fallback;
|
||||||
|
@@ -34,9 +30,7 @@
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: "Red Hat Display";
|
||||||
|
- src: local('RedHatDisplayWeb'),
|
||||||
|
- url("RedHatDisplay-Medium.woff2") format("woff2"),
|
||||||
|
- url("RedHatDisplay-Medium.woff") format("woff");
|
||||||
|
+ src: local('RedHatDisplay-Medium');
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 500;
|
||||||
|
font-display: fallback;
|
||||||
|
@@ -44,9 +38,7 @@
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: "Red Hat Display";
|
||||||
|
- src: local('RedHatDisplayWeb'),
|
||||||
|
- url("RedHatDisplay-MediumItalic.woff2") format("woff2"),
|
||||||
|
- url("RedHatDisplay-MediumItalic.woff") format("woff");
|
||||||
|
+ src: local('RedHatDisplay-MediumItalic');
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: 500;
|
||||||
|
font-display: fallback;
|
||||||
|
@@ -54,9 +46,7 @@
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: "Red Hat Display";
|
||||||
|
- src: local('RedHatDisplayWeb'),
|
||||||
|
- url("RedHatDisplay-Bold.woff2") format("woff2"),
|
||||||
|
- url("RedHatDisplay-Bold.woff") format("woff");
|
||||||
|
+ src: local('RedHatDisplay-Bold');
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 700;
|
||||||
|
font-display: fallback;
|
||||||
|
@@ -64,9 +54,7 @@
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: "Red Hat Display";
|
||||||
|
- src: local('RedHatDisplayWeb'),
|
||||||
|
- url("RedHatDisplay-BoldItalic.woff2") format("woff2"),
|
||||||
|
- url("RedHatDisplay-BoldItalic.woff") format("woff");
|
||||||
|
+ src: local('RedHatDisplay-BoldItalic');
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: 700;
|
||||||
|
font-display: fallback;
|
||||||
|
@@ -75,9 +63,7 @@
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: "Red Hat Display";
|
||||||
|
- src: local('RedHatDisplayWeb'),
|
||||||
|
- url("RedHatDisplay-Black.woff2") format("woff2"),
|
||||||
|
- url("RedHatDisplay-Black.woff") format("woff");
|
||||||
|
+ src: local('RedHatDisplay-Black');
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 900;
|
||||||
|
font-display: fallback;
|
||||||
|
@@ -85,9 +71,7 @@
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: "Red Hat Display";
|
||||||
|
- src: local('RedHatDisplayWeb'),
|
||||||
|
- url("RedHatDisplay-BlackItalic.woff2") format("woff2"),
|
||||||
|
- url("RedHatDisplay-BlackItalic.woff") format("woff");
|
||||||
|
+ src: local('RedHatDisplay-BlackItalic');
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: 900;
|
||||||
|
font-display: fallback;
|
||||||
|
@@ -95,9 +79,7 @@
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: "Red Hat Text";
|
||||||
|
- src: local('RedHatTextWeb'),
|
||||||
|
- url("RedHatText-Regular.woff2") format("woff2"),
|
||||||
|
- url("RedHatText-Regular.woff") format("woff");
|
||||||
|
+ src: local('RedHatText-Regular');
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
font-display: fallback;
|
||||||
|
@@ -105,9 +87,7 @@
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: "Red Hat Text";
|
||||||
|
- src: local('RedHatTextWeb'),
|
||||||
|
- url("RedHatText-Italic.woff2") format("woff2"),
|
||||||
|
- url("RedHatText-Italic.woff") format("woff");
|
||||||
|
+ src: local('RedHatText-Italic');
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: 400;
|
||||||
|
font-display: fallback;
|
||||||
|
@@ -115,9 +95,7 @@
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: "Red Hat Text";
|
||||||
|
- src: local('RedHatTextWeb'),
|
||||||
|
- url("RedHatText-Medium.woff2") format("woff2"),
|
||||||
|
- url("RedHatText-Medium.woff") format("woff");
|
||||||
|
+ src: local('RedHatText-Medium');
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 700;
|
||||||
|
font-display: fallback;
|
||||||
|
@@ -125,9 +103,7 @@
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: "Red Hat Text";
|
||||||
|
- src: local('RedHatTextWeb'),
|
||||||
|
- url("RedHatText-MediumItalic.woff2") format("woff2"),
|
||||||
|
- url("RedHatText-MediumItalic.woff") format("woff");
|
||||||
|
+ src: local('RedHatText-MediumItalic');
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: 700;
|
||||||
|
font-display: fallback;
|
||||||
|
@@ -135,9 +111,7 @@
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: "Red Hat Text";
|
||||||
|
- src: local('RedHatTextWeb'),
|
||||||
|
- url("RedHatText-Bold.woff2") format("woff2"),
|
||||||
|
- url("RedHatText-Bold.woff") format("woff");
|
||||||
|
+ src: local('RedHatText-Bold');
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 900;
|
||||||
|
font-display: fallback;
|
||||||
|
@@ -145,22 +119,17 @@
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: "Red Hat Text";
|
||||||
|
- src: local('RedHatTextWeb'),
|
||||||
|
- url("RedHatText-BoldItalic.woff2") format("woff2"),
|
||||||
|
- url("RedHatText-BoldItalic.woff") format("woff");
|
||||||
|
+ src: local('RedHatText-BoldItalic');
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: 900;
|
||||||
|
font-display: fallback;
|
||||||
|
}
|
||||||
|
|
||||||
|
-/* Do not fall back to locally installed SourceCodePro, as there are
|
||||||
|
- * known bad copies being distributed to this day
|
||||||
|
- */
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Source Code Pro';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
- src: url("SourceCodePro-Regular.ttf.woff") format('woff');
|
||||||
|
+ src: local('SourceCodePro-Regular');
|
||||||
|
font-display: swap;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -168,7 +137,7 @@
|
||||||
|
font-family: 'Source Code Pro';
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: 400;
|
||||||
|
- src: url("SourceCodePro-It.ttf.woff") format('woff');
|
||||||
|
+ src: local('SourceCodePro-It');
|
||||||
|
font-display: swap;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -176,6 +145,6 @@
|
||||||
|
font-family: 'Source Code Pro';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 600;
|
||||||
|
- src: url("SourceCodePro-Semibold.ttf.woff") format('woff');
|
||||||
|
+ src: local('SourceCodePro-Semibold');
|
||||||
|
font-display: swap;
|
||||||
|
}
|
||||||
|
diff -Naur gi-docgen-2021.6-original/setup.py gi-docgen-2021.6/setup.py
|
||||||
|
--- gi-docgen-2021.6-original/setup.py 2021-05-26 13:20:49.000000000 -0400
|
||||||
|
+++ gi-docgen-2021.6/setup.py 2021-06-25 17:39:54.383146097 -0400
|
||||||
|
@@ -49,8 +49,6 @@
|
||||||
|
"templates/basic/*.html",
|
||||||
|
"templates/basic/*.js",
|
||||||
|
"templates/basic/*.png",
|
||||||
|
- "templates/basic/*.woff2",
|
||||||
|
- "templates/basic/*.woff",
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
179
gi-docgen.spec
Normal file
179
gi-docgen.spec
Normal file
@ -0,0 +1,179 @@
|
|||||||
|
%global forgeurl https://gitlab.gnome.org/GNOME/%{name}/
|
||||||
|
%global tag %{version}
|
||||||
|
|
||||||
|
Name: gi-docgen
|
||||||
|
Version: 2021.6
|
||||||
|
%forgemeta
|
||||||
|
Release: 1%{?dist}
|
||||||
|
Summary: Documentation tool for GObject-based libraries
|
||||||
|
|
||||||
|
# The entire source is (ASL 2.0 or GPLv3+) except:
|
||||||
|
#
|
||||||
|
# MIT:
|
||||||
|
# - gidocgen/templates/basic/fzy.js
|
||||||
|
#
|
||||||
|
# CC0:
|
||||||
|
# - docs/CODEOWNERS (-doc subpackage)
|
||||||
|
# - examples/*.toml (-doc subpackage)
|
||||||
|
# - gi-docgen.doap (not installed)
|
||||||
|
# - gidocgen/porter.py
|
||||||
|
# - MANIFEST.in (not installed)
|
||||||
|
#
|
||||||
|
# CC-BY:
|
||||||
|
# - code-of-conduct.md (-doc subpackage)
|
||||||
|
#
|
||||||
|
# OFL:
|
||||||
|
# - gidocgen/templates/basic/RedHat* (removed in prep)
|
||||||
|
# - gidocgen/templates/basic/SourceCodePro* (removed in prep)
|
||||||
|
License: (ASL 2.0 or GPLv3+) and MIT and CC0
|
||||||
|
URL: %{forgeurl}
|
||||||
|
Source0: %{forgesource}
|
||||||
|
|
||||||
|
# We are prohibited from bundling fonts, and we are prohibited from shipping
|
||||||
|
# fonts in web font formats; see
|
||||||
|
# https://docs.fedoraproject.org/en-US/packaging-guidelines/FontsPolicy/#_web_fonts.
|
||||||
|
#
|
||||||
|
# Since upstream uses *only* web fonts, we need a patch. We haven’t offered it
|
||||||
|
# upstream since upstream has no reason NOT to use web fonts.
|
||||||
|
#
|
||||||
|
# This patch removes all references to WOFF/WOFF2 font files (which we still
|
||||||
|
# must remove in %%prep) and ensures the CSS correctly references corresponding
|
||||||
|
# local system fonts.
|
||||||
|
Patch0: %{name}-2021.6-no-web-fonts.patch
|
||||||
|
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: pyproject-rpm-macros
|
||||||
|
|
||||||
|
# Documentation
|
||||||
|
BuildRequires: make
|
||||||
|
BuildRequires: python3dist(sphinx)
|
||||||
|
BuildRequires: python3dist(sphinx-rtd-theme)
|
||||||
|
|
||||||
|
# Unbundling fonts:
|
||||||
|
BuildRequires: font(redhatdisplay)
|
||||||
|
BuildRequires: font(redhatdisplayblack)
|
||||||
|
BuildRequires: font(redhatdisplaymedium)
|
||||||
|
BuildRequires: font(redhattext)
|
||||||
|
BuildRequires: font(redhattextmedium)
|
||||||
|
BuildRequires: font(sourcecodepro)
|
||||||
|
BuildRequires: font(sourcecodeprosemibold)
|
||||||
|
|
||||||
|
# Unbundling fonts:
|
||||||
|
Requires: %{name}-fonts = %{version}-%{release}
|
||||||
|
|
||||||
|
# Trivial fork of https://github.com/jhawthorn/fzy.js (looks like it was
|
||||||
|
# basically just wrapped in an IIFE). Given that modification, it’s not clear
|
||||||
|
# how we could unbundle it, either downstream or with some kind of upstream
|
||||||
|
# support.
|
||||||
|
#
|
||||||
|
# It’s not clear what version was used for the fork.
|
||||||
|
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
|
||||||
|
# Really, there is nothing copyrightable in this metapackage, so we give it the
|
||||||
|
# overall license of the project.
|
||||||
|
License: (ASL 2.0 or GPLv3+)
|
||||||
|
|
||||||
|
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 %{name} package,
|
||||||
|
documentation packages generated with %{name} must depend on this metapackage
|
||||||
|
to ensure the proper system fonts are present.
|
||||||
|
|
||||||
|
|
||||||
|
%package doc
|
||||||
|
Summary: Documentation for %{name}
|
||||||
|
License: (ASL 2.0 or GPLv3+) and CC0 and CC-BY
|
||||||
|
|
||||||
|
%description doc
|
||||||
|
Documentation for %{name}.
|
||||||
|
|
||||||
|
|
||||||
|
%generate_buildrequires
|
||||||
|
# We do not run the tests; but we add the runtime requirements as BR’s anyway
|
||||||
|
# so that the build will fail if some are not available in the distribution.
|
||||||
|
%pyproject_buildrequires -r
|
||||||
|
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -p1
|
||||||
|
|
||||||
|
# Remove all bundled fonts. See Patch0.
|
||||||
|
find . -type f \( -name '*.woff' -o -name '*.woff2' \) -print -delete
|
||||||
|
|
||||||
|
|
||||||
|
%build
|
||||||
|
%pyproject_wheel
|
||||||
|
|
||||||
|
%make_build -C docs
|
||||||
|
rm -rvf docs/_build/.buildinfo docs/_build/.doctrees
|
||||||
|
|
||||||
|
|
||||||
|
%install
|
||||||
|
%pyproject_install
|
||||||
|
%pyproject_save_files gidocgen
|
||||||
|
|
||||||
|
install -t '%{buildroot}%{_pkgdocdir}' -D -m 0644 -p \
|
||||||
|
code-of-conduct.md \
|
||||||
|
CONTRIBUTING.md \
|
||||||
|
docs/CODEOWNERS \
|
||||||
|
README.md
|
||||||
|
cp -rp docs/_build '%{buildroot}%{_pkgdocdir}/html'
|
||||||
|
cp -rp examples '%{buildroot}%{_pkgdocdir}/'
|
||||||
|
|
||||||
|
|
||||||
|
%files -f %{pyproject_files}
|
||||||
|
%license LICENSES/*.txt
|
||||||
|
|
||||||
|
%{_bindir}/%{name}
|
||||||
|
%{_mandir}/man1/%{name}.1*
|
||||||
|
# Normally, this would go in a -devel package, but there is little point in
|
||||||
|
# providing a -devel package for *just* the .pc file when there are no
|
||||||
|
# libraries or headers.
|
||||||
|
%{_datadir}/pkgconfig/%{name}.pc
|
||||||
|
|
||||||
|
|
||||||
|
%files fonts
|
||||||
|
# Empty; this is a metapackage
|
||||||
|
|
||||||
|
|
||||||
|
%files doc
|
||||||
|
%license LICENSES/*.txt
|
||||||
|
%doc %{_pkgdocdir}
|
||||||
|
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Fri Jun 25 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 2021.6-1
|
||||||
|
- Initial package
|
Loading…
Reference in New Issue
Block a user