From f9be5e7f27e957bc40793174bb3e8e6fa662d12c Mon Sep 17 00:00:00 2001 From: Heng Qi Date: Fri, 14 Apr 2023 13:20:13 +0800 Subject: [PATCH] Refactor the spec file Signed-off-by: Heng Qi --- glib-networking.spec | 71 +++++++++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 34 deletions(-) diff --git a/glib-networking.spec b/glib-networking.spec index 5b97d14..6ce119e 100644 --- a/glib-networking.spec +++ b/glib-networking.spec @@ -1,8 +1,8 @@ -%define anolis_release 2 +%define anolis_release 3 -%define glib2_version 2.73.3 +%bcond_without libproxy -%global with_libproxy 1 +%define glib2_version 2.73.3 Name: glib-networking Version: 2.74.0 @@ -13,54 +13,54 @@ License: LGPLv2+ URL: https://gitlab.gnome.org/GNOME/glib-networking Source0: https://download.gnome.org/sources/glib-networking/2.74/%{name}-%{version}.tar.xz -BuildRequires: ca-certificates -BuildRequires: gcc -BuildRequires: gettext -BuildRequires: meson >= 0.60.0 -BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version} -BuildRequires: pkgconfig(gio-2.0) -BuildRequires: pkgconfig(gnutls) >= 3.7.4 +BuildRequires: gcc meson >= 0.60.0 +BuildRequires: systemd-rpm-macros ca-certificates gettext BuildRequires: pkgconfig(gsettings-desktop-schemas) -%if 0%{?with_libproxy} +BuildRequires: pkgconfig(gio-2.0) pkgconfig(glib-2.0) >= %{glib2_version} pkgconfig(gnutls) >= 3.7.4 +%if %{with libproxy} BuildRequires: pkgconfig(libproxy-1.0) >= 0.4.16 %endif -BuildRequires: systemd-rpm-macros Requires: ca-certificates Requires: glib2 >= %{glib2_version} Requires: gsettings-desktop-schemas -# For glib-pacrunner Recommends: libproxy-duktape %description -This package contains modules that extend the networking support in -GIO. In particular, it contains libproxy- and GSettings-based -GProxyResolver implementations and a gnutls-based GTlsConnection -implementation. +Network-related giomodules for glib -%package doc -Summary: Documentation files for %{name} -Requires: %{name} = %{version}-%{release} -BuildArch: noarch +glib-networking contains the implementations of certain GLib networking features +that cannot be implemented directly in GLib itself because of their +dependencies. -%description doc -The %{name}-doc package contains documentation files for %{name}. +Currently it contains GnuTLS and OpenSSL-based implementations of GTlsBackend, +a libproxy-based implementation of GProxyResolver, GLibproxyResolver, +and a GNOME GProxyResolver that uses the proxy information from the GSettings +schemas in gsettings-desktop-schemas. %package tests Summary: Tests for the glib-networking package -Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{EVR} %description tests The glib-networking-tests package contains tests that can be used to verify the functionality of the installed glib-networking package. +%package doc +Summary: Documentation files for %{name} +Requires: %{name} = %{EVR} +BuildArch: noarch + +%description doc +The %{name}-doc package contains documentation files for %{name}. + %prep -%autosetup -p1 -n %{name}-%{version} +%autosetup -n %{name}-%{version} -p1 %build %meson \ -%if !0%{?with_libproxy} +%if %{without libproxy} -Dlibproxy=disabled \ %endif -Dinstalled_tests=true \ @@ -70,36 +70,39 @@ the functionality of the installed glib-networking package. %install %meson_install -%generate_compatibility_deps - %find_lang %{name} +%generate_compatibility_deps + %files -f %{name}.lang -%dir %{abidir} %license COPYING +%dir %{abidir} %{_libdir}/gio/modules/libgioenvironmentproxy.so %{_libdir}/gio/modules/libgiognomeproxy.so %{_libdir}/gio/modules/libgiognutls.so %{abidir}/libgioenvironmentproxy.dump +%{abidir}/mock-pkcs11.dump %{abidir}/libgiognomeproxy.dump %{abidir}/libgiognutls.dump -%if 0%{?with_libproxy} +%if %{with libproxy} %{_libdir}/gio/modules/libgiolibproxy.so %{abidir}/libgiolibproxy.dump %{_libexecdir}/glib-pacrunner %{_datadir}/dbus-1/services/org.gtk.GLib.PACRunner.service %{_userunitdir}/glib-pacrunner.service %endif -%{abidir}/mock-pkcs11.dump - -%files doc -%doc NEWS README %files tests %{_libexecdir}/installed-tests/glib-networking %{_datadir}/installed-tests +%files doc +%doc NEWS README + %changelog +* Fri Apr 14 2023 Heng Qi - 2.74.0-3 +- Refactor the spec file + * Wed Feb 15 2023 Funda Wang - 2.74.0-2 - Prefer libproxy-duktape now -- Gitee