[packages/gi-docgen] - added main patch (fix execution via egg entry_point) - provide pkg-config file from meson
qboosh
qboosh at pld-linux.org
Fri Mar 12 20:11:16 CET 2021
commit 0a042c66ab384daf0b334ffc0220200640d79b0f
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Fri Mar 12 20:12:08 2021 +0100
- added main patch (fix execution via egg entry_point)
- provide pkg-config file from meson
gi-docgen-main.patch | 12 ++++++++++++
gi-docgen.spec | 15 +++++++++++++++
2 files changed, 27 insertions(+)
---
diff --git a/gi-docgen.spec b/gi-docgen.spec
index fdf6d86..b6b3c4a 100644
--- a/gi-docgen.spec
+++ b/gi-docgen.spec
@@ -12,9 +12,12 @@ Group: Development/Tools
#Source0Download: https://gitlab.gnome.org/ebassi/gi-docgen/-/tags
Source0: https://gitlab.gnome.org/ebassi/gi-docgen/-/archive/%{version}/%{name}-%{version}.tar.bz2
# Source0-md5: d8c01aacbaefe8df4ffc9f8c67e51f21
+Patch0: %{name}-main.patch
URL: https://gitlab.gnome.org/ebassi/gi-docgen
BuildRequires: python3-modules >= 1:3.6
BuildRequires: python3-setuptools
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
BuildRequires: sed >= 4.0
%if %{with doc}
BuildRequires: python3-Sphinx
@@ -56,6 +59,7 @@ Dokumentacja do narzędzia GI-Docgen.
%prep
%setup -q
+%patch0 -p1
%{__sed} -i -e '/^ *wheel$/d' setup.cfg
@@ -71,6 +75,16 @@ rm -rf $RPM_BUILD_ROOT
%py3_install
+install -d $RPM_BUILD_ROOT%{_npkgconfigdir}
+cat >$RPM_BUILD_ROOT%{_npkgconfigdir}/gi-docgen.pc <<EOF
+prefix=%{_prefix}
+bindir=%{_bindir}
+
+Name: gi-docgen
+Description: Documentation tool for GObject-based libraries
+Version: %{version}
+EOF
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -80,6 +94,7 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_bindir}/gi-docgen
%{py3_sitescriptdir}/gidocgen
%{py3_sitescriptdir}/gi_docgen-%{version}-py*.egg-info
+%{_npkgconfigdir}/gi-docgen.pc
%files doc
%defattr(644,root,root,755)
diff --git a/gi-docgen-main.patch b/gi-docgen-main.patch
new file mode 100644
index 0000000..9ab2f6f
--- /dev/null
+++ b/gi-docgen-main.patch
@@ -0,0 +1,12 @@
+--- gi-docgen-2021.2/gidocgen/gidocmain.py.orig 2021-03-12 13:46:51.000000000 +0100
++++ gi-docgen-2021.2/gidocgen/gidocmain.py 2021-03-12 20:06:59.426108229 +0100
+@@ -129,5 +129,8 @@
+ return GIDocGenApp().run(args)
+
+
++def main():
++ return run_main(sys.argv[1:])
++
+ if __name__ == '__main__':
+- sys.exit(run_main(sys.argv[1:]))
++ sys.exit(main())
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/gi-docgen.git/commitdiff/0a042c66ab384daf0b334ffc0220200640d79b0f
More information about the pld-cvs-commit
mailing list