Use pkgconfig for BuildRequires

Additinally, simplify .la file removal, use autosetup, and remove some
unused dependencies.
epel9
David King 3 years ago
parent 9953e537fd
commit 9ab6b1bf2f

@ -30,22 +30,20 @@ Patch2: gconf-3.2.6-gconf-engine_key_is_writable.patch
Patch99: workaround-crash.patch Patch99: workaround-crash.patch
Patch100: pkill-hack.patch Patch100: pkill-hack.patch
BuildRequires: libxml2-devel >= %{libxml2_version}
BuildRequires: libxslt-devel
BuildRequires: glib2-devel >= %{glib2_version}
BuildRequires: gtk-doc >= 0.9
BuildRequires: pkgconfig >= 0.14
BuildRequires: gettext BuildRequires: gettext
BuildRequires: gtk-doc >= 0.9
BuildRequires: intltool BuildRequires: intltool
BuildRequires: make
BuildRequires: pkgconfig(dbus-glib-1) >= 0.8
BuildRequires: pkgconfig(gio-2.0) >= %{glib2_version}
BuildRequires: pkgconfig(gobject-introspection-1.0) >= 0.6.7
BuildRequires: pkgconfig(libxml-2.0) >= %{libxml2_version}
%if 0%{?defaults_service} %if 0%{?defaults_service}
BuildRequires: polkit-devel >= 0.92 BuildRequires: pkgconfig(polkit-gobject-1) >= 0.92
%endif %endif
BuildRequires: dbus-glib-devel >= 0.8
BuildRequires: gobject-introspection-devel >= 0.6.7
BuildRequires: autoconf automake libtool BuildRequires: autoconf automake libtool
# we need to do python shebang mangling using pathfix.py # we need to do python shebang mangling using pathfix.py
BuildRequires: python3-devel BuildRequires: python3-devel
BuildRequires: make
%if 0%{?defaults_service} %if 0%{?defaults_service}
Requires: dbus Requires: dbus
@ -64,13 +62,7 @@ support workgroup administration.
%package devel %package devel
Summary: Headers and libraries for GConf development Summary: Headers and libraries for GConf development
Requires: %{name} = %{version}-%{release} Requires: %{name}{?_isa} = %{version}-%{release}
Requires: libxml2-devel >= %{libxml2_version}
Requires: glib2-devel >= %{glib2_version}
# we install a pc file
Requires: pkgconfig
# we install an automake macro
Requires: automake
Conflicts: GConf2-dbus-devel Conflicts: GConf2-dbus-devel
%description devel %description devel
@ -78,15 +70,9 @@ GConf development package. Contains files needed for doing
development using GConf. development using GConf.
%prep %prep
%setup -q -n GConf-%{version} %autosetup -p1 -n GConf-%{version}
%patch0 -p1 -b .gettext
%patch1 -p1 -b .drop-spew
%patch2 -p1 -b .abi-break
%patch99 -p1 -b .workaround-crash
%patch100 -p1 -b .pkill-hack
autoreconf -i -f autoreconf --force --install
2to3 --write --nobackup gsettings/gsettings-schema-convert 2to3 --write --nobackup gsettings/gsettings-schema-convert
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" . gsettings/gsettings-schema-convert pathfix.py -pni "%{__python3} %{py3_shbang_opts}" . gsettings/gsettings-schema-convert
@ -95,30 +81,28 @@ pathfix.py -pni "%{__python3} %{py3_shbang_opts}" . gsettings/gsettings-schema-c
%configure --disable-static \ %configure --disable-static \
%{?defaults_service:--enable-defaults-service} \ %{?defaults_service:--enable-defaults-service} \
%{!?defaults_service:--disable-defaults-service} \ %{!?defaults_service:--disable-defaults-service} \
--disable-orbit --without-openldap --with-gtk=3.0 --disable-orbit --without-openldap
# drop unneeded direct library deps with --as-needed # drop unneeded direct library deps with --as-needed
# libtool doesn't make this easy, so we do it the hard way # libtool doesn't make this easy, so we do it the hard way
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' -e 's/ if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then/ func_append compile_command " -Wl,-O1,--as-needed"\n func_append finalize_command " -Wl,-O1,--as-needed"\n\0/' libtool sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' -e 's/ if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then/ func_append compile_command " -Wl,-O1,--as-needed"\n func_append finalize_command " -Wl,-O1,--as-needed"\n\0/' libtool
make %make_build
%install %install
make install DESTDIR=$RPM_BUILD_ROOT %make_install
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/gconf/schemas mkdir -p %{buildroot}%{_sysconfdir}/gconf/schemas
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/gconf/gconf.xml.system mkdir -p %{buildroot}%{_sysconfdir}/gconf/gconf.xml.system
mkdir -p $RPM_BUILD_ROOT%{_rpmconfigdir}/macros.d/ mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d/
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/rpm-state/gconf mkdir -p %{buildroot}%{_localstatedir}/lib/rpm-state/gconf
mkdir -p $RPM_BUILD_ROOT%{_datadir}/GConf/gsettings mkdir -p %{buildroot}%{_datadir}/GConf/gsettings
install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_rpmconfigdir}/macros.d/ install -p -m 644 %{SOURCE1} %{buildroot}%{_rpmconfigdir}/macros.d/
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la find %{buildroot} -name "*.la" -type f -delete
rm -f $RPM_BUILD_ROOT%{_libdir}/GConf/2/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/gio/modules/*.la
mkdir -p $RPM_BUILD_ROOT%{_datadir}/GConf/gsettings mkdir -p %{buildroot}%{_datadir}/GConf/gsettings
%find_lang %name %find_lang %name
@ -182,6 +166,7 @@ fi
%changelog %changelog
* Fri Jan 07 2022 David King <amigadave@amigadave.com> - 3.2.6-32 * Fri Jan 07 2022 David King <amigadave@amigadave.com> - 3.2.6-32
- Update URL (#2036776) - Update URL (#2036776)
- Use pkgconfig for BuildRequires
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.6-31 * Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.6-31
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

Loading…
Cancel
Save