[packages/libmodulemd] - new, TODO: python bindings and introspection data

baggins baggins at pld-linux.org
Sat Mar 13 21:28:04 CET 2021


commit ac8ca4ca0c6db3e64db322c442d5194e578f720c
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sat Mar 13 21:27:17 2021 +0100

    - new, TODO: python bindings and introspection data

 libmodulemd.spec        | 112 ++++++++++++++++++++++++++++++++++++++++++++++++
 no-docs-for-build.patch |  32 ++++++++++++++
 2 files changed, 144 insertions(+)
---
diff --git a/libmodulemd.spec b/libmodulemd.spec
new file mode 100644
index 0000000..bda1bba
--- /dev/null
+++ b/libmodulemd.spec
@@ -0,0 +1,112 @@
+#
+# Conditional build:
+%bcond_without	apidocs		# do not build and package API docs
+%bcond_without	python2		# CPython 2.x module
+%bcond_without	tests		# unit tests
+#
+Summary:	Module metadata manipulation library
+Name:		libmodulemd
+Version:	2.12.0
+Release:	0.1
+License:	MIT
+Group:		Libraries
+Source0:	https://github.com/fedora-modularity/libmodulemd/releases/download/%{name}-%{version}/modulemd-%{version}.tar.xz
+# Source0-md5:	e0b77248ee9d786d6d226492805d2cf2
+Patch0:		no-docs-for-build.patch
+URL:		https://github.com/fedora-modularity/libmodulemd
+BuildRequires:	meson >= 0.47.0
+BuildRequires:	ninja >= 1.5
+BuildRequires:	rpm-devel
+BuildRequires:	pkgconfig
+BuildRequires:	glib2-devel
+BuildRequires:	yaml-devel
+BuildRequires:	libmagic-devel
+%{?with_apidocs:BuildRequires:	gtk-doc}
+#Requires:	
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+C Library for manipulating module metadata files.
+
+%package devel
+Summary:	Header files for %{name} library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki %{name}
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+
+%description devel
+Header files for %{name} library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki %{name}.
+
+%package static
+Summary:	Static %{name} library
+Summary(pl.UTF-8):	Statyczna biblioteka %{name}
+Group:		Development/Libraries
+Requires:	%{name}-devel = %{version}-%{release}
+
+%description static
+Static %{name} library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka %{name}.
+
+%package apidocs
+Summary:	API documentation for %{name} library
+Summary(pl.UTF-8):	Dokumentacja API biblioteki %{name}
+Group:		Documentation
+BuildArch:	noarch
+
+%description apidocs
+API documentation for %{name} library.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API biblioteki %{name}.
+
+%prep
+%setup -q -n modulemd-%{version}
+%patch0 -p1
+
+%build
+%meson build \
+%if %{with doc}
+	-Dwith_docs=true \
+	-Dglib_docpath=%{_gtkdocdir} \
+%endif
+	%{?with_python2:-Dwith_py2=true}
+
+%ninja_build -C build
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%ninja_install -C build
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc README.md
+%attr(755,root,root) %{_libdir}/%{name}.so.*.*.*
+%ghost %{_libdir}/%{name}.so.2
+
+%files devel
+%defattr(644,root,root,755)
+%{_libdir}/%{name}.so
+%{_includedir}/modulemd-2.0
+%{_pkgconfigdir}/modulemd-2.0.pc
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/%{name}.a
+
+%if %{with apidocs}
+%files apidocs
+%defattr(644,root,root,755)
+%doc %{_gtkdocdir}/modulemd-2.0
+%endif
diff --git a/no-docs-for-build.patch b/no-docs-for-build.patch
new file mode 100644
index 0000000..d7422a7
--- /dev/null
+++ b/no-docs-for-build.patch
@@ -0,0 +1,32 @@
+--- modulemd-2.12.0/meson.build~	2021-01-15 03:08:36.000000000 +0100
++++ modulemd-2.12.0/meson.build	2021-03-13 21:03:35.939739304 +0100
+@@ -67,17 +67,7 @@
+ with_docs = get_option('with_docs')
+ if with_docs
+   gtkdoc = dependency('gtk-doc')
+-  glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
+-
+-  ret = run_command ([test, '-e', join_paths(glib_docpath, 'glib/index.html')])
+-  if ret.returncode() != 0
+-    error('Missing documentation for GLib.')
+-  endif
+-
+-  ret = run_command ([test, '-e', join_paths(glib_docpath, 'gobject/index.html')])
+-  if ret.returncode() != 0
+-    error('Missing documentation for GObject.')
+-  endif
++  glib_docpath = get_option('glib_docpath')
+ endif
+ 
+ with_manpages = get_option('with_manpages')
+--- modulemd-2.12.0/meson_options.txt~	2021-01-15 03:08:36.000000000 +0100
++++ modulemd-2.12.0/meson_options.txt	2021-03-13 21:09:46.821667993 +0100
+@@ -32,6 +32,8 @@
+ option('with_docs', type : 'boolean', value : true,
+        description : 'Build API documentation.')
+ 
++option('glib_docpath', type : 'string')
++
+ option('with_manpages', type : 'feature', value : 'auto',
+        description : 'Build manual pages for included executables.')
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libmodulemd.git/commitdiff/ac8ca4ca0c6db3e64db322c442d5194e578f720c



More information about the pld-cvs-commit mailing list