drop python bindings/support (includes -ui-tools that use the bindings) on f31+ (#1751484)
This commit is contained in:
parent
a311802c04
commit
8d87c1f62b
65
avahi.spec
65
avahi.spec
@ -3,11 +3,17 @@
|
||||
%{?!WITH_COMPAT_HOWL: %global WITH_COMPAT_HOWL 1}
|
||||
%{?!WITH_QT3: %global WITH_QT3 1}
|
||||
%{?!WITH_QT4: %global WITH_QT4 1}
|
||||
%{?!WITH_PYTHON: %global WITH_PYTHON 1}
|
||||
|
||||
%ifnarch %{mono_arches}
|
||||
%define WITH_MONO 0
|
||||
%endif
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1751484
|
||||
%if 0%{?fedora} > 30
|
||||
%global WITH_PYTHON 0
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel}
|
||||
%define WITH_MONO 0
|
||||
%if 0%{?rhel} >= 6
|
||||
@ -42,15 +48,6 @@ BuildRequires: automake
|
||||
BuildRequires: libtool
|
||||
BuildRequires: dbus-devel >= 0.90
|
||||
BuildRequires: dbus-glib-devel >= 0.70
|
||||
%if 0%{?fedora} > 27
|
||||
%global python2_dbus python2-dbus
|
||||
%global python2_libxml2 python2-libxml2
|
||||
%else
|
||||
%global python2_dbus dbus-python
|
||||
%global python2_libxml2 libxml2-python
|
||||
%endif
|
||||
BuildRequires: %{python2_dbus}
|
||||
BuildRequires: %{python2_libxml2}
|
||||
BuildRequires: desktop-file-utils
|
||||
BuildRequires: gtk2-devel
|
||||
BuildRequires: gtk3-devel >= 2.99.0
|
||||
@ -65,8 +62,24 @@ BuildRequires: libdaemon-devel >= 0.11
|
||||
BuildRequires: glib2-devel
|
||||
BuildRequires: libcap-devel
|
||||
BuildRequires: expat-devel
|
||||
%if %{WITH_PYTHON}
|
||||
%if 0%{?fedora} > 27
|
||||
%global python2_dbus python2-dbus
|
||||
%global python2_libxml2 python2-libxml2
|
||||
%else
|
||||
%global python2_dbus dbus-python
|
||||
%global python2_libxml2 libxml2-python
|
||||
%endif
|
||||
BuildRequires: %{python2_dbus}
|
||||
BuildRequires: %{python2_libxml2}
|
||||
# really only need interpreter + rpm-macros -- rex
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: python3-devel
|
||||
%else
|
||||
Obsoletes: python2-avahi < %{version}-%{release}
|
||||
Obsoletes: python3-avahi < %{version}-%{release}
|
||||
Obsoletes: avahi-ui-tools < %{version}-%{release}
|
||||
%endif
|
||||
BuildRequires: gdbm-devel
|
||||
BuildRequires: pkgconfig(pygobject-3.0)
|
||||
BuildRequires: pygtk2
|
||||
@ -117,14 +130,16 @@ Requires: %{name} = %{version}-%{release}
|
||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
Requires: %{name}-glib%{?_isa} = %{version}-%{release}
|
||||
Requires: %{name}-ui-gtk3%{?_isa} = %{version}-%{release}
|
||||
Requires: python2-avahi = %{version}-%{release}
|
||||
Requires: tigervnc
|
||||
Requires: openssh-clients
|
||||
Requires: pygtk2
|
||||
Requires: pygtk2-libglade
|
||||
Requires: gdbm
|
||||
%if %{WITH_PYTHON}
|
||||
Requires: python2-avahi = %{version}-%{release}
|
||||
Requires: %{python2_dbus}
|
||||
Requires: python2-gobject-base
|
||||
%endif
|
||||
|
||||
%description ui-tools
|
||||
Graphical user interface tools that use Avahi to browse for mDNS services.
|
||||
@ -340,6 +355,7 @@ avahi-dnsconfd connects to a running avahi-daemon and runs the script
|
||||
local LAN. This is useful for configuring unicast DNS servers in a DHCP-like
|
||||
fashion with mDNS.
|
||||
|
||||
%if %{WITH_PYTHON}
|
||||
%package -n python2-avahi
|
||||
Summary: Python2 Avahi bindings
|
||||
Obsoletes: python-avahi < 0.7
|
||||
@ -357,6 +373,7 @@ Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description -n python3-avahi
|
||||
%{summary}.
|
||||
%endif
|
||||
|
||||
|
||||
%prep
|
||||
@ -384,6 +401,9 @@ NOCONFIGURE=1 ./autogen.sh
|
||||
--enable-shared=yes \
|
||||
--enable-static=no \
|
||||
--disable-silent-rules \
|
||||
%if ! %{WITH_PYTHON}
|
||||
--disable-python \
|
||||
%endif
|
||||
%if %{WITH_COMPAT_DNSSD}
|
||||
--enable-compat-libdns_sd \
|
||||
%endif
|
||||
@ -435,29 +455,37 @@ ln -s avahi-compat-libdns_sd.pc %{buildroot}/%{_libdir}/pkgconfig/libdns_sd.pc
|
||||
ln -s avahi-compat-libdns_sd/dns_sd.h %{buildroot}/%{_includedir}/
|
||||
%endif
|
||||
|
||||
%if %{WITH_PYTHON}
|
||||
# Add python3 support
|
||||
mkdir -p %{buildroot}%{python3_sitelib}/avahi/
|
||||
cp -r %{buildroot}%{python2_sitelib}/avahi/* %{buildroot}%{python3_sitelib}/avahi/
|
||||
rm -fv %{buildroot}%{buildroot}%{python3_sitelib}/avahi/*.py{c,o}
|
||||
sed -i 's!/usr/bin/python2!/usr/bin/python3!' %{buildroot}%{python3_sitelib}/avahi/ServiceTypeDatabase.py
|
||||
|
||||
rm -fv %{buildroot}%{_sysconfdir}/rc.d/init.d/avahi-daemon
|
||||
rm -fv %{buildroot}%{_sysconfdir}/rc.d/init.d/avahi-dnsconfd
|
||||
|
||||
# avoid empty GenericName keys from .desktop files
|
||||
for i in %{buildroot}%{_datadir}/applications/*.desktop ; do
|
||||
if [ -n "$(grep '^GenericName=$' $i)" ]; then
|
||||
desktop-file-edit --copy-name-to-generic-name $i
|
||||
fi
|
||||
done
|
||||
%else
|
||||
# unpackaged files
|
||||
rm -fv %{buildroot}%{_datadir}/applications/{bssh,bvnc}.desktop
|
||||
rm -fv %{buildroot}%{_datadir}/avahi/interfaces/avahi-discover.ui
|
||||
%endif
|
||||
|
||||
rm -fv %{buildroot}%{_sysconfdir}/rc.d/init.d/avahi-daemon
|
||||
rm -fv %{buildroot}%{_sysconfdir}/rc.d/init.d/avahi-dnsconfd
|
||||
|
||||
%find_lang %{name}
|
||||
|
||||
|
||||
%check
|
||||
%if %{WITH_PYTHON}
|
||||
for i in %{buildroot}%{_datadir}/applications/*.desktop ; do
|
||||
desktop-file-validate $i
|
||||
done
|
||||
%endif
|
||||
|
||||
|
||||
%pre
|
||||
@ -534,7 +562,9 @@ exit 0
|
||||
%dir %{_datadir}/avahi
|
||||
%{_datadir}/avahi/*.dtd
|
||||
%dir %{_libdir}/avahi
|
||||
%if %{WITH_PYTHON}
|
||||
%{_libdir}/avahi/service-types.db
|
||||
%endif
|
||||
%{_mandir}/man5/*
|
||||
%{_mandir}/man8/avahi-daemon.*
|
||||
%{_unitdir}/avahi-daemon.service
|
||||
@ -558,6 +588,7 @@ exit 0
|
||||
%files tools
|
||||
%{_bindir}/*
|
||||
%{_mandir}/man1/*
|
||||
%if %{WITH_PYTHON}
|
||||
%exclude %{_bindir}/b*
|
||||
%exclude %{_bindir}/avahi-discover*
|
||||
%exclude %{_bindir}/avahi-bookmarks
|
||||
@ -577,6 +608,7 @@ exit 0
|
||||
%{_datadir}/applications/avahi-discover.desktop
|
||||
%{_datadir}/avahi/interfaces/
|
||||
%{python2_sitelib}/avahi_discover/
|
||||
%endif
|
||||
|
||||
%files devel
|
||||
%{_libdir}/libavahi-common.so
|
||||
@ -688,16 +720,19 @@ exit 0
|
||||
%{_libdir}/pkgconfig/libdns_sd.pc
|
||||
%endif
|
||||
|
||||
%if %{WITH_PYTHON}
|
||||
%files -n python2-avahi
|
||||
# These are .py files only, so they don't go in lib64
|
||||
%{python2_sitelib}/avahi/
|
||||
|
||||
%files -n python3-avahi
|
||||
# These are .py files only, so they don't go in lib64
|
||||
%{python3_sitelib}/avahi/
|
||||
%endif
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Sep 19 2019 Rex Dieter <rdieter@fedoraproject.org> - 0.7-21
|
||||
- drop python bindings/support (includes -ui-tools that use the bindings) on f31+ (#1751484)
|
||||
|
||||
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.7-21
|
||||
- Rebuilt for Python 3.8
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user