diff --git a/glib2.spec b/glib2.spec index cf128e4c6beab42c9e07d6287d20ceab738b49de..312192b66c237be500e9432b2b339c8ac34300ee 100644 --- a/glib2.spec +++ b/glib2.spec @@ -1,5 +1,4 @@ -%define anolis_release 1 -%define url_ver %(echo %{version} | cut -d. -f1,2) +%define anolis_release 2 Name: glib2 Version: 2.76.1 Release: %{anolis_release}%{?dist} @@ -7,101 +6,67 @@ Summary: A library of handy utility functions License: LGPLv2+ URL: https://www.gtk.org -Source0: https://download.gnome.org/sources/glib/%{url_ver}/glib-%{version}.tar.xz - -BuildRequires: gcc -BuildRequires: gettext -BuildRequires: gtk-doc -BuildRequires: perl-interpreter -BuildRequires: meson >= 0.60.0 -# for sys/inotify.h -BuildRequires: glibc-devel -# for sys/sdt.h -BuildRequires: systemtap-sdt-devel -BuildRequires: pkgconfig(bash-completion) >= 2.0 -BuildRequires: pkgconfig(libelf) -BuildRequires: pkgconfig(libffi) >= 3.0.0 -BuildRequires: pkgconfig(libpcre2-8) >= 10.32 -BuildRequires: pkgconfig(libselinux) >= 2.2 -BuildRequires: pkgconfig(mount) >= 2.23 -BuildRequires: pkgconfig(sysprof-capture-4) >= 3.38.0 -BuildRequires: pkgconfig(zlib) -BuildRequires: python3-devel - -# Remove gamin dependency -Obsoletes: glib2-fam < 2.67.1-3 - -Provides: bundled(gnulib) -Provides: bundled(gvdb) -Provides: bundled(libcharset) -Provides: bundled(xdgmime) +Source0: https://download.gnome.org/sources/glib/2.76/glib-%{version}.tar.xz -%description -GLib is the low-level core library that forms the basis for projects -such as GTK+ and GNOME. It provides data structure handling for C, -portability wrappers, and interfaces for such runtime functionality -as an event loop, threads, dynamic loading, and an object system. +BuildRequires: gcc meson >= 0.60.0 gettext gtk-doc perl-interpreter glibc-devel +BuildRequires: systemtap-sdt-devel zlib-devel python3-devel +BuildRequires: bash-completion >= 2.0 elfutils-libelf-devel libffi-devel >= 3.0.0 +BuildRequires: pcre2-devel >= 10.32 libselinux-devel >= 2.2 +BuildRequires: libmount-devel >= 2.23 sysprof-capture-devel >= 3.38.0 +Obsoletes: %{name}-fam < 2.67.1-3 -%package devel -Summary: A library of handy utility functions -Requires: %{name} = %{version}-%{release} +Provides: bundled(gnulib) bundled(gvdb) bundled(libcharset) bundled(xdgmime) -%description devel -The glib2-devel package includes the header files for the GLib library. +%description +GLib is a general-purpose, portable utility library that provides many useful +data types, macros, type conversions, string utilities, file utilities, a +mainloop abstraction and more. It is a low-level core library that forms the +basis for projects such as GTK+ and GNOME. GLib provides data structure +handling for C, portability wrappers, and interfaces for such runtime +functionality as an event loop, threads, dynamic loading, and an object system. -%package doc -Summary: A library of handy utility functions +%package devel +Summary: subpackage for development purpose Requires: %{name} = %{version}-%{release} -BuildArch: noarch -%description doc -The glib2-doc package includes documentation for the GLib library. +%description devel +The %{name}-devel subpackage includes the header files for the GLib library. %package static -Summary: glib static +Summary: subpackage of static library files Requires: %{name}-devel = %{version}-%{release} %description static The %{name}-static subpackage contains static libraries for %{name}. %package tests -Summary: Tests for the glib2 package +Summary: subpackage of tests for the %{name} package Requires: %{name} = %{version}-%{release} %description tests -The glib2-tests package contains tests that can be used to verify -the functionality of the installed glib2 package. +The %{name}-tests subpackage contains tests that can be used to verify +the functionality of the installed %{name} package. + +%package doc +Summary: subpackage of %{name} documentation +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%description doc +The %{name}-doc subpackage includes documentation for the GLib library. %prep %autosetup -n glib-%{version} -p1 %build -%meson \ - -Dman=true \ - -Ddtrace=true \ - -Dsystemtap=true \ - -Dsysprof=enabled \ - -Dglib_debug=disabled \ - -Dgtk_doc=true \ - -Dinstalled_tests=true \ - --default-library=both \ - %{nil} - +%meson --default-library=both -Dglib_debug=disabled -Dinstalled_tests=true \ + -Dman=true -Dgtk_doc=true -Dsysprof=enabled -Ddtrace=true -Dsystemtap=true %meson_build %install %meson_install - -# Since this is a generated .py file, set it to a known timestamp -# because the source timestamp is baked into the .pyc file -# Also copy the timestamp for other .py files, because meson doesn't -# do this, see https://github.com/mesonbuild/meson/issues/5027. touch -r gio/gdbus-2.0/codegen/config.py.in %{buildroot}%{_datadir}/glib-2.0/codegen/*.py - -# Perform byte compilation manually to avoid issues with -# irreproducibility of the default invalidation mode, see -# https://www.python.org/dev/peps/pep-0552/ %py_byte_compile %{python3} %{buildroot}%{_datadir} mkdir -p %{buildroot}%{_libdir}/gio/modules @@ -109,49 +74,41 @@ touch %{buildroot}%{_libdir}/gio/modules/giomodule.cache %find_lang glib20 -%transfiletriggerin -- %{_libdir}/gio/modules -%{_bindir}/gio-querymodules %{_libdir}/gio/modules &> /dev/null || : - %transfiletriggerpostun -- %{_libdir}/gio/modules %{_bindir}/gio-querymodules %{_libdir}/gio/modules &> /dev/null || : - -%transfiletriggerin -- %{_datadir}/glib-2.0/schemas -%{_bindir}/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : + +%transfiletriggerin -- %{_libdir}/gio/modules +%{_bindir}/gio-querymodules %{_libdir}/gio/modules &> /dev/null || : %transfiletriggerpostun -- %{_datadir}/glib-2.0/schemas %{_bindir}/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : + +%transfiletriggerin -- %{_datadir}/glib-2.0/schemas +%{_bindir}/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : %files -f glib20.lang %license COPYING -%{_libdir}/libglib-2.0.so.* -%{_libdir}/libgthread-2.0.so.* %{_libdir}/libgmodule-2.0.so.* %{_libdir}/libgobject-2.0.so.* +%{_libdir}/libglib-2.0.so.* +%{_libdir}/libgthread-2.0.so.* %{_libdir}/libgio-2.0.so.* %dir %{_datadir}/bash-completion %dir %{_datadir}/bash-completion/completions -%{_datadir}/bash-completion/completions/gapplication -%{_datadir}/bash-completion/completions/gdbus -%{_datadir}/bash-completion/completions/gio -%{_datadir}/bash-completion/completions/gsettings +%{_datadir}/bash-completion/completions/{gapplication,gsettings,gdbus,gio} %dir %{_datadir}/glib-2.0 %dir %{_datadir}/glib-2.0/schemas %dir %{_libdir}/gio %dir %{_libdir}/gio/modules %ghost %{_libdir}/gio/modules/giomodule.cache -%{_bindir}/gio -%{_bindir}/gio-querymodules -%{_bindir}/glib-compile-schemas -%{_bindir}/gsettings -%{_bindir}/gdbus -%{_bindir}/gapplication +%{_bindir}/{gsettings,gio,glib-compile-schemas,gapplication,gdbus,gio-querymodules} %{_libexecdir}/gio-launch-desktop +%{_mandir}/man1/glib-compile-schemas.1* %{_mandir}/man1/gio.1* %{_mandir}/man1/gio-querymodules.1* -%{_mandir}/man1/glib-compile-schemas.1* +%{_mandir}/man1/gapplication.1* %{_mandir}/man1/gsettings.1* %{_mandir}/man1/gdbus.1* -%{_mandir}/man1/gapplication.1* %files devel %{_libdir}/lib*.so @@ -164,45 +121,38 @@ touch %{buildroot}%{_libdir}/gio/modules/giomodule.cache %{_datadir}/glib-2.0/schemas/gschema.dtd %{_datadir}/glib-2.0/valgrind/glib.supp %{_datadir}/bash-completion/completions/gresource -%{_bindir}/glib-genmarshal -%{_bindir}/glib-gettextize -%{_bindir}/glib-mkenums -%{_bindir}/gobject-query -%{_bindir}/gtester -%{_bindir}/gdbus-codegen -%{_bindir}/glib-compile-resources -%{_bindir}/gresource +%{_bindir}/{gobject-query,glib-gettextize,gtester,glib-compile-resources} +%{_bindir}/{glib-genmarshal,gdbus-codegen,glib-mkenums,gresource} %{_datadir}/glib-2.0/codegen %attr (0755, root, root) %{_bindir}/gtester-report -%{_mandir}/man1/glib-genmarshal.1* %{_mandir}/man1/glib-gettextize.1* -%{_mandir}/man1/glib-mkenums.1* -%{_mandir}/man1/gobject-query.1* -%{_mandir}/man1/gtester-report.1* %{_mandir}/man1/gtester.1* -%{_mandir}/man1/gdbus-codegen.1* %{_mandir}/man1/glib-compile-resources.1* %{_mandir}/man1/gresource.1* +%{_mandir}/man1/gtester-report.1* +%{_mandir}/man1/gobject-query.1* +%{_mandir}/man1/glib-genmarshal.1* +%{_mandir}/man1/glib-mkenums.1* +%{_mandir}/man1/gdbus-codegen.1* +%{_datadir}/systemtap/ %{_datadir}/gdb/ %{_datadir}/gettext/ -%{_datadir}/systemtap/ - -%files doc -%{_datadir}/gtk-doc/ -%doc NEWS README.md %files static -%{_libdir}/libgio-2.0.a -%{_libdir}/libglib-2.0.a -%{_libdir}/libgmodule-2.0.a -%{_libdir}/libgobject-2.0.a -%{_libdir}/libgthread-2.0.a +%{_libdir}/{libgio-2.0.a,libgobject-2.0.a,libgthread-2.0.a,libglib-2.0.a,libgmodule-2.0.a} %files tests -%{_libexecdir}/installed-tests %{_datadir}/installed-tests +%{_libexecdir}/installed-tests + +%files doc +%{_datadir}/gtk-doc/ +%doc NEWS README.md %changelog +* Mon Apr 10 2023 Zhongling - 2.76.1-2 +- Refactor rpm spec + * Fri Mar 24 2023 Funda Wang - 2.76.1-1 - New version 2.76.1