gobject-introspection/gobject-introspection.spec

178 lines
6.1 KiB
RPMSpec
Raw Normal View History

#
# spec file for package gobject-introspection
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: gobject-introspection
Version: 1.80.1
Release: 0
# FIXME: Find a way to identify if we need python3-gobject or python-gobject from gi-find-deps.sh.
Summary: GObject Introspection Tools
License: GPL-2.0-or-later AND LGPL-2.1-or-later
Group: Development/Libraries/GNOME
URL: https://wiki.gnome.org/Projects/GObjectIntrospection
Source0: %{name}-%{version}.tar.zst
# gi-find-deps.sh is a rpm helper for Provides and Requires. Script creates typelib()-style Provides/Requires.
Source1: gi-find-deps.sh
Source2: gobjectintrospection.attr
Source3: gobject-introspection-typelib.template
Source98: baselibs.conf
Source99: %{name}-rpmlintrc
BuildRequires: bison
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: glib2-stage1-devel
BuildRequires: gtk-doc
#!BuildIgnore: glib2-devel
BuildRequires: meson >= 0.55.3
BuildRequires: pkgconfig
BuildRequires: python3-Mako
BuildRequires: python3-Markdown
BuildRequires: python3-devel
BuildRequires: python3-xml
BuildRequires: pkgconfig(libffi) >= 3.0.0
# gi-find-deps makes use of 'file' to identify the types.
Requires: file
Requires: libgirepository-1_0-1 = %{version}
# gi-find-deps uses the enhanced grep variant in order to do multi-line matching (for pkg.requires(..))
Requires: pcre2-tools
Requires: python3-xml
Requires: python(abi) = %{python3_version}
%description
The goal of the project is to describe the APIs and collect them in
a uniform, machine readable format.
%package -n libgirepository-1_0-1
Summary: GObject Introspection Library
License: LGPL-2.1-or-later
Group: System/Libraries
Requires: girepository-1_0 >= %{version}
%description -n libgirepository-1_0-1
The goal of the project is to describe the APIs and collect them in
a uniform, machine readable format.
%package -n girepository-1_0
Summary: Base GObject Introspection Bindings
License: LGPL-2.1-or-later
Group: System/Libraries
Requires: libgirepository-1_0-1 >= %{version}
# Provide typelib() symbols based on gobject-introspection-typelib.template
# The template is checked during install if it matches the installed *.typelib files.
%(cat %{SOURCE3} | awk '{ print "Provides: " $0}')
%description -n girepository-1_0
The goal of the project is to describe the APIs and collect them in
a uniform, machine readable format.
%package devel
Summary: GObject Introspection Development Files
# Note: the devel package requires the binaries, not just the library
License: LGPL-2.1-or-later
Group: Development/Libraries/GNOME
Requires: %{name} = %{version}
Requires: libffi-devel
Requires: libgirepository-1_0-1 = %{version}
%description devel
The goal of the project is to describe the APIs and collect them in
a uniform, machine readable format.
%prep
%autosetup -p1
%build
# cairo is only needed for some tests, don't enable it
%meson \
-Dcairo=disabled \
-Ddoctool=enabled \
Accepting request 689484 from GNOME:Next - Update to version 1.60.0: + gir: Update glib annotations. - Update to version 1.59.5: + gir: - Include C header in cairo gir file. - Skip glib-enumtypes.h for GObject-2.0. - Update to version 1.59.4: + tests: Add functions using flat struct arrays. + Clean shebangs out of non-executable scripts and drop exec perm from xmlwriter.py. + maintransformer: parse deprecation annotations for section blocks. + repository: g_irepository_get_object_gtype_interfaces. + message: handle fatal errors even if warnings are disabled. + autotools: Fix build with ``-Wl,--as-needed``. + maintransformer: Don't warn on (optional) annotations on (inout). + girepository: Fix a possible use-after-free if g_mapped_file_new() fails and fix possible leak of transitive dependency names. - Fix shebangs for files installed to /usr/bin to not use /usr/bin/env. - Update to version 1.59.3: + meson: - Use underscore as a separator in build options (gtk-doc-> gtk_doc etc). - Warn that not all tests will be run if building without cairo/doctool. + scanner: - Merge specifiers and qualifiers when merging basic types. Fixes "unsigned char" being wrongly parsed as "unsigned" etc. - Rework source root directory guessing code to not depend on the build directory. - Remove incorrect c:type generated for array of synthesized unions. - Flatten multi-dimensional arrays fields. + website: add cppgir C++ binding. - Replace -Dgtk-doc=true call to meson with -Dgtk_doc=true. - Pass -Ddoctool=true and -Dcairo=true to meson, build and install g-ir-doc-tool and use cairo during meson_check (tests). - Update to version 1.59.2: + Everything included in 1.58.3. + meson: Various fixes and all tests have been ported. + scanner: Save preprocessor input and output files with ``save-temps``. + automake: Use the wildcard function where needed. + build: extend ``PYTHONPATH`` instead of replacing it. + gir/cairo: add ``cairo_rectangle_t``. + Add a ``--version`` option to g-ir-compiler and g-ir-generate. + tests: various test improvements. + ccompiler: don't use Python compiler flags. + parser: Do not bail out when parsing GIR files without doc positions. + gimarshallingtests: Remove declarations of nonexistent functions. - Changes from version 1.59.1: + Everything included in 1.58.2. + build: - Drop Python 2 support, require Python 3.4+. - Add option to make .gir files installation paths configurable. - Skip gobject/gvaluecollector.h when constructing GObject GIR. - Port various tests to work with meson. + regress: - Add test for write-only property. - Implement interface and override properties. + writer: Include documentation and symbol position in source files. + giscanner: - Print relative filename paths when warning. - Define grefcount and gatomicrefcount as aliases to gint. - Allow empty declarations. Fixes warnings with mingw headers. - Replace linked lists with arrays in source scanner. + girepository: - Various docs cleanups and fixes. - Don't abort when calling g_base_info_get_name() on a GITypeInfo. - Add version macros and functions. OBS-URL: https://build.opensuse.org/request/show/689484 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gobject-introspection?expand=0&rev=200
2019-03-29 00:04:52 +01:00
-Dgtk_doc=true \
-Dpython='%{_bindir}/python3' \
%{nil}
%meson_build
%check
# Needed due to https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/458
%ifarch %ix86 x86_64
%meson_test
%endif
%install
%meson_install
install -D %{SOURCE1} %{buildroot}%{_rpmconfigdir}/gi-find-deps.sh
install -D %{SOURCE2} -m 0644 %{buildroot}%{_rpmconfigdir}/fileattrs/gobjectintrospection.attr
# comparing, if we provide all the symbols expected.
ls %{buildroot}%{_libdir}/girepository-1.0/*.typelib | bash %{SOURCE1} -P > gobject-introspection-typelib.installed
diff -s %{SOURCE3} gobject-introspection-typelib.installed
%fdupes %{buildroot}
Accepting request 689484 from GNOME:Next - Update to version 1.60.0: + gir: Update glib annotations. - Update to version 1.59.5: + gir: - Include C header in cairo gir file. - Skip glib-enumtypes.h for GObject-2.0. - Update to version 1.59.4: + tests: Add functions using flat struct arrays. + Clean shebangs out of non-executable scripts and drop exec perm from xmlwriter.py. + maintransformer: parse deprecation annotations for section blocks. + repository: g_irepository_get_object_gtype_interfaces. + message: handle fatal errors even if warnings are disabled. + autotools: Fix build with ``-Wl,--as-needed``. + maintransformer: Don't warn on (optional) annotations on (inout). + girepository: Fix a possible use-after-free if g_mapped_file_new() fails and fix possible leak of transitive dependency names. - Fix shebangs for files installed to /usr/bin to not use /usr/bin/env. - Update to version 1.59.3: + meson: - Use underscore as a separator in build options (gtk-doc-> gtk_doc etc). - Warn that not all tests will be run if building without cairo/doctool. + scanner: - Merge specifiers and qualifiers when merging basic types. Fixes "unsigned char" being wrongly parsed as "unsigned" etc. - Rework source root directory guessing code to not depend on the build directory. - Remove incorrect c:type generated for array of synthesized unions. - Flatten multi-dimensional arrays fields. + website: add cppgir C++ binding. - Replace -Dgtk-doc=true call to meson with -Dgtk_doc=true. - Pass -Ddoctool=true and -Dcairo=true to meson, build and install g-ir-doc-tool and use cairo during meson_check (tests). - Update to version 1.59.2: + Everything included in 1.58.3. + meson: Various fixes and all tests have been ported. + scanner: Save preprocessor input and output files with ``save-temps``. + automake: Use the wildcard function where needed. + build: extend ``PYTHONPATH`` instead of replacing it. + gir/cairo: add ``cairo_rectangle_t``. + Add a ``--version`` option to g-ir-compiler and g-ir-generate. + tests: various test improvements. + ccompiler: don't use Python compiler flags. + parser: Do not bail out when parsing GIR files without doc positions. + gimarshallingtests: Remove declarations of nonexistent functions. - Changes from version 1.59.1: + Everything included in 1.58.2. + build: - Drop Python 2 support, require Python 3.4+. - Add option to make .gir files installation paths configurable. - Skip gobject/gvaluecollector.h when constructing GObject GIR. - Port various tests to work with meson. + regress: - Add test for write-only property. - Implement interface and override properties. + writer: Include documentation and symbol position in source files. + giscanner: - Print relative filename paths when warning. - Define grefcount and gatomicrefcount as aliases to gint. - Allow empty declarations. Fixes warnings with mingw headers. - Replace linked lists with arrays in source scanner. + girepository: - Various docs cleanups and fixes. - Don't abort when calling g_base_info_get_name() on a GITypeInfo. - Add version macros and functions. OBS-URL: https://build.opensuse.org/request/show/689484 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gobject-introspection?expand=0&rev=200
2019-03-29 00:04:52 +01:00
# fixup shebangs in files installed to /usr/bin
sed -i "s|%{_bindir}/env python|%{_bindir}/python|" %{buildroot}%{_bindir}/*
%ldconfig_scriptlets -n libgirepository-1_0-1
%files
%license COPYING COPYING.GPL
%doc NEWS README.rst
%{_bindir}/g-ir-annotation-tool
%{_bindir}/g-ir-compiler
%{_bindir}/g-ir-doc-tool
%{_bindir}/g-ir-generate
%{_bindir}/g-ir-inspect
%{_bindir}/g-ir-scanner
%{_mandir}/man1/g-ir-compiler.1%{?ext_man}
%{_mandir}/man1/g-ir-generate.1%{?ext_man}
%{_mandir}/man1/g-ir-scanner.1%{?ext_man}
%{_mandir}/man1/g-ir-doc-tool.1%{?ext_man}
%{_datadir}/aclocal/introspection.m4
%{_datadir}/gir-1.0/*.gir
%{_datadir}/gir-1.0/gir-1.2.rnc
# We don't include directly %%{_libdir}/gobject-introspection since there might
# be files there in the future that belong to the library package
%dir %{_libdir}/gobject-introspection
%{_libdir}/gobject-introspection/giscanner/
# We explicitly list the content of the directory that is of interest to us,
# since there might be files there in the future that belong to the library
# package
%dir %{_datadir}/gobject-introspection-1.0
%{_datadir}/gobject-introspection-1.0/Makefile.introspection
%{_datadir}/gobject-introspection-1.0/tests/
%{_datadir}/gobject-introspection-1.0/gdump.c
%{_rpmconfigdir}/gi-find-deps.sh
%{_rpmconfigdir}/fileattrs/gobjectintrospection.attr
%files -n libgirepository-1_0-1
%license COPYING.LGPL
# We own this directory here instead of devel to make sure other packages do
# not have to own it
%dir %{_datadir}/gir-1.0
%{_libdir}/libgirepository-1.0.so.*
%dir %{_libdir}/girepository-1.0
%files -n girepository-1_0
%{_libdir}/girepository-1.0/*.typelib
%files devel
%doc %{_datadir}/gtk-doc/html/gi/
%{_includedir}/gobject-introspection-1.0/
%{_libdir}/libgirepository-1.0.so
%{_libdir}/pkgconfig/gobject-introspection-1.0.pc
%{_libdir}/pkgconfig/gobject-introspection-no-export-1.0.pc
%changelog