fix wrongly splitted tools and ui-tools

(cherry picked from commit 23eccfe05f81a7e58d2ef4e3c45b723d560857e1)
This commit is contained in:
Funda Wang 2024-09-23 15:43:17 +08:00 committed by openeuler-sync-bot
parent a07482ef8f
commit e02f61e082
2 changed files with 53 additions and 96 deletions

View File

@ -3,11 +3,11 @@
Name: avahi Name: avahi
Version: 0.8 Version: 0.8
Release: 20 Release: 21
Summary: Avahi is a local network service discovery Summary: Avahi is a local network service discovery
License: LGPLv2+ License: LGPL-2.1-or-later AND LGPL-2.0-or-later AND BSD-2-Clause-Views AND MIT
URL: http://avahi.org URL: https://avahi.org
Source0: http://avahi.org/download/%{name}-%{version}.tar.gz Source0: https://avahi.org/download/%{name}-%{version}.tar.gz
## upstream patches ## upstream patches
Patch0: 0000-avahi-dnsconfd.service-Drop-Also-avahi-daemon.socket.patch Patch0: 0000-avahi-dnsconfd.service-Drop-Also-avahi-daemon.socket.patch
@ -29,7 +29,7 @@ Patch6008: backport-CVE-2023-38469.patch
BuildRequires: gcc automake libtool desktop-file-utils gtk2-devel glib2-devel gcc-c++ BuildRequires: gcc automake libtool desktop-file-utils gtk2-devel glib2-devel gcc-c++
BuildRequires: libcap-devel expat-devel gdbm-devel make BuildRequires: libcap-devel expat-devel gdbm-devel make
BuildRequires: intltool perl-XML-Parser systemd libevent-devel BuildRequires: intltool perl-XML-Parser systemd libevent-devel
BuildRequires: dbus-devel >= 0.90 dbus-glib-devel >= 0.70 libdaemon-devel >= 0.11 BuildRequires: dbus-devel >= 0.90 libdaemon-devel >= 0.11
BuildRequires: pkgconfig(libevent) >= 2.0.21 BuildRequires: pkgconfig(libevent) >= 2.0.21
%if 0%{?build_cross} == 0 %if 0%{?build_cross} == 0
BuildRequires: pkgconfig(pygobject-3.0) xmltoman gtk3-devel >= 2.99.0 BuildRequires: pkgconfig(pygobject-3.0) xmltoman gtk3-devel >= 2.99.0
@ -74,8 +74,12 @@ Requires: %{name} = %{version}-%{release}
Requires: %{name}-libs = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-glib = %{version}-%{release} Requires: %{name}-glib = %{version}-%{release}
Requires: %{name}-ui-gtk3 = %{version}-%{release} Requires: %{name}-ui-gtk3 = %{version}-%{release}
Requires: tigervnc openssh-clients pygtk2 pygtk2-libglade gdbm Requires: tigervnc openssh-clients
Conflicts: %{name}-tools < 0.8-21
%if %{WITH_PYTHON} %if %{WITH_PYTHON}
Requires: gdbm
Requires: pygtk2
Requires: pygtk2-libglade
Requires: python2-avahi = %{version}-%{release} Requires: python2-avahi = %{version}-%{release}
Requires: python2-dbus Requires: python2-dbus
Requires: python2-gobject-base Requires: python2-gobject-base
@ -88,7 +92,6 @@ Avahi Graphical user interface tools for mDNS services.
Summary: Gtk uesr interface library for Avahi (Gtk2) Summary: Gtk uesr interface library for Avahi (Gtk2)
Requires: %{name}-libs = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-glib = %{version}-%{release} Requires: %{name}-glib = %{version}-%{release}
Requires: gtk2
%description ui %description ui
This package contains a Gtk 2.x widget for browsing services. This package contains a Gtk 2.x widget for browsing services.
@ -187,7 +190,6 @@ Libraries for easy use of avahi from glib applications.
Summary: Libraries and header files for avahi glib development Summary: Libraries and header files for avahi glib development
Requires: %{name}-devel%{?_isa} = %{version}-%{release} Requires: %{name}-devel%{?_isa} = %{version}-%{release}
Requires: %{name}-glib%{?_isa} = %{version}-%{release} Requires: %{name}-glib%{?_isa} = %{version}-%{release}
Requires: glib2-devel
%description glib-devel %description glib-devel
The avahi-devel package contains the header files and libraries The avahi-devel package contains the header files and libraries
@ -205,7 +207,6 @@ This library contains a GObject wrapper for the Avahi API
Summary: Libraries and header files for Avahi GObject development Summary: Libraries and header files for Avahi GObject development
Requires: %{name}-devel%{?_isa} = %{version}-%{release} Requires: %{name}-devel%{?_isa} = %{version}-%{release}
Requires: %{name}-gobject%{?_isa} = %{version}-%{release} Requires: %{name}-gobject%{?_isa} = %{version}-%{release}
#Requires: %{name}-glib-devel = %{version}-%{release}
%description gobject-devel %description gobject-devel
The avahi-gobject-devel package contains the header files and libraries The avahi-gobject-devel package contains the header files and libraries
@ -216,7 +217,6 @@ necessary for developing programs using avahi-gobject.
Summary: Gtk user interface library for Avahi (Gtk+ 3 version) Summary: Gtk user interface library for Avahi (Gtk+ 3 version)
Requires: %{name}-libs = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-glib = %{version}-%{release} Requires: %{name}-glib = %{version}-%{release}
Requires: gtk3
%description ui-gtk3 %description ui-gtk3
This library contains a Gtk 3.x widget for browsing services. This library contains a Gtk 3.x widget for browsing services.
@ -292,6 +292,11 @@ NOCONFIGURE=1 ./autogen.sh
%install %install
%make_install %make_install
%delete_la
# remove example
rm -fv %{buildroot}%{_sysconfdir}/avahi/services/ssh.service
rm -fv %{buildroot}%{_sysconfdir}/avahi/services/sftp-ssh.service
ln -s avahi-compat-howl.pc %{buildroot}/%{_libdir}/pkgconfig/howl.pc ln -s avahi-compat-howl.pc %{buildroot}/%{_libdir}/pkgconfig/howl.pc
ln -s avahi-compat-libdns_sd.pc %{buildroot}/%{_libdir}/pkgconfig/libdns_sd.pc ln -s avahi-compat-libdns_sd.pc %{buildroot}/%{_libdir}/pkgconfig/libdns_sd.pc
@ -316,14 +321,9 @@ if [ -n "$(grep '^GenericName=$' $i)" ]; then
desktop-file-edit --copy-name-to-generic-name $i desktop-file-edit --copy-name-to-generic-name $i
fi fi
done done
%else
# unpackaged files
rm -fv $RPM_BUILD_ROOT%{_datadir}/applications/{bssh,bvnc}.desktop
rm -fv $RPM_BUILD_ROOT%{_datadir}/avahi/interfaces/avahi-discover.ui
%endif %endif
%find_lang %{name} %find_lang %{name}
%delete_la_and_a
%check %check
%if %{WITH_PYTHON} %if %{WITH_PYTHON}
@ -364,7 +364,6 @@ exit 0
%systemd_preun avahi-daemon.socket avahi-daemon.service %systemd_preun avahi-daemon.socket avahi-daemon.service
%post %post
/sbin/ldconfig
/usr/bin/dbus-send --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig >/dev/null 2>&1 || : /usr/bin/dbus-send --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig >/dev/null 2>&1 || :
if [ "$1" -eq 1 -a -s /etc/localtime ]; then if [ "$1" -eq 1 -a -s /etc/localtime ]; then
/usr/bin/cp -cfp /etc/localtime /etc/avahi/etc/localtime >/dev/null 2>&1 || : /usr/bin/cp -cfp /etc/localtime /etc/avahi/etc/localtime >/dev/null 2>&1 || :
@ -376,7 +375,6 @@ if [ $1 -eq 1 ]; then
fi fi
%postun %postun
/sbin/ldconfig
%systemd_postun_with_restart avahi-daemon.socket avahi-daemon.service %systemd_postun_with_restart avahi-daemon.socket avahi-daemon.service
%post dnsconfd %post dnsconfd
@ -388,73 +386,29 @@ fi
%postun dnsconfd %postun dnsconfd
%systemd_postun_with_restart avahi-dnsconfd.service %systemd_postun_with_restart avahi-dnsconfd.service
%post compat-howl -p /sbin/ldconfig
%postun compat-howl -p /sbin/ldconfig
%post compat-libdns_sd -p /sbin/ldconfig
%postun compat-libdns_sd -p /sbin/ldconfig
%if 0%{?build_cross} == 0
%post ui -p /sbin/ldconfig
%postun ui -p /sbin/ldconfig
%endif
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
%post glib -p /sbin/ldconfig
%postun glib -p /sbin/ldconfig
%if 0%{?build_cross} == 0
%post ui-gtk3 -p /sbin/ldconfig
%postun ui-gtk3 -p /sbin/ldconfig
%endif
%post gobject -p /sbin/ldconfig
%postun gobject -p /sbin/ldconfig
%files -f %{name}.lang %files -f %{name}.lang
%doc README %doc README
%license LICENSE %license LICENSE
%{_sbindir}/avahi-daemon
%dir %{_libdir}/avahi
%if %{WITH_PYTHON}
%{_libdir}/avahi/service-types.db
%endif
%{_libdir}/libavahi-core.so.*
%dir %{_datadir}/avahi
%{_datadir}/avahi/*.dtd
%{_datadir}/dbus-1/interfaces/*.xml
%{_datadir}/dbus-1/system-services/org.freedesktop.Avahi.service
%dir %{_sysconfdir}/avahi %dir %{_sysconfdir}/avahi
%dir %{_sysconfdir}/avahi/etc %dir %{_sysconfdir}/avahi/etc
%ghost %{_sysconfdir}/avahi/etc/localtime %ghost %{_sysconfdir}/avahi/etc/localtime
%config(noreplace) %{_sysconfdir}/avahi/hosts %config(noreplace) %{_sysconfdir}/avahi/hosts
%dir %{_sysconfdir}/avahi/services
%ghost %attr(0755, avahi, avahi) %dir %{_localstatedir}/run/avahi-daemon
%config(noreplace) %{_sysconfdir}/avahi/avahi-daemon.conf %config(noreplace) %{_sysconfdir}/avahi/avahi-daemon.conf
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/avahi-dbus.conf %config(noreplace) %{_sysconfdir}/dbus-1/system.d/avahi-dbus.conf
%{_sbindir}/avahi-daemon
%dir %{_sysconfdir}/avahi/services %dir %{_datadir}/avahi
%ghost %dir %{_localstatedir}/run/avahi-daemon %{_datadir}/avahi/*.dtd
%attr(1770,avahi-autoipd,avahi-autoipd) %dir %{_localstatedir}/lib/avahi-autoipd/ %dir %{_libdir}/avahi
%if %{WITH_PYTHON}
%{_libdir}/avahi/service-types.db
%endif
%{_unitdir}/avahi-daemon.service %{_unitdir}/avahi-daemon.service
%{_unitdir}/avahi-daemon.socket %{_unitdir}/avahi-daemon.socket
%{_datadir}/dbus-1/interfaces/*.xml
%attr(1770,avahi-autoipd,avahi-autoipd) %dir %{_localstatedir}/lib/avahi-autoipd/ %{_datadir}/dbus-1/system-services/org.freedesktop.Avahi.service
%exclude %{_sysconfdir}/rc.d/init.d/avahi-daemon %{_libdir}/libavahi-core.so.*
%exclude %{_sysconfdir}/rc.d/init.d/avahi-dnsconfd
%exclude %{_datadir}/%{name}-%{version}/*
%exclude %{_sysconfdir}/avahi/services/ssh.service
%exclude %{_sysconfdir}/avahi/services/sftp-ssh.service
%files autoipd %files autoipd
%{_sbindir}/avahi-autoipd %{_sbindir}/avahi-autoipd
@ -501,17 +455,13 @@ fi
%{_libdir}/libavahi-core.so %{_libdir}/libavahi-core.so
%{_libdir}/libavahi-client.so %{_libdir}/libavahi-client.so
%{_libdir}/libavahi-libevent.so %{_libdir}/libavahi-libevent.so
%{_includedir}/avahi-client
%{_includedir}/avahi-common
%{_includedir}/avahi-core
%{_includedir}/avahi-libevent
%{_libdir}/pkgconfig/avahi-core.pc %{_libdir}/pkgconfig/avahi-core.pc
%{_libdir}/pkgconfig/avahi-client.pc %{_libdir}/pkgconfig/avahi-client.pc
%{_libdir}/pkgconfig/avahi-libevent.pc %{_libdir}/pkgconfig/avahi-libevent.pc
%{_includedir}/*
%if 0%{?build_cross} == 0
%exclude %{_includedir}/avahi-ui
%endif
%exclude %{_includedir}/avahi-compat-howl
%exclude %{_includedir}/avahi-compat-libdns_sd
%exclude %{_includedir}/dns_sd.h
%exclude %{_includedir}/avahi-glib
%if %{WITH_PYTHON} %if %{WITH_PYTHON}
%files -n python2-avahi %files -n python2-avahi
@ -527,19 +477,26 @@ fi
%config(noreplace) %{_sysconfdir}/avahi/avahi-dnsconfd.action %config(noreplace) %{_sysconfdir}/avahi/avahi-dnsconfd.action
%files tools %files tools
%{_bindir}/* %{_bindir}/avahi-browse
%if %{WITH_PYTHON} %{_bindir}/avahi-browse-domains
%exclude %{_bindir}/b* %{_bindir}/avahi-publish
%exclude %{_bindir}/avahi-discover* %{_bindir}/avahi-publish-address
%exclude %{_bindir}/avahi-bookmarks %{_bindir}/avahi-publish-service
%{_bindir}/avahi-resolve
%{_bindir}/avahi-resolve-address
%{_bindir}/avahi-resolve-host-name
%{_bindir}/avahi-set-host-name
%files ui-tools %files ui-tools
%{_bindir}/b* %{_bindir}/avahi-discover-standalone
%{_bindir}/avahi-discover %{_bindir}/bshell
%{_bindir}/avahi-bookmarks %{_bindir}/bssh
%{_bindir}/bvnc
%{_datadir}/applications/b*.desktop %{_datadir}/applications/b*.desktop
%{_datadir}/avahi/interfaces
%if %{WITH_PYTHON}
%{_bindir}/avahi-bookmarks
%{_datadir}/applications/avahi-discover.desktop %{_datadir}/applications/avahi-discover.desktop
%{_datadir}/avahi/interfaces/
%{python2_sitelib}/avahi_discover/ %{python2_sitelib}/avahi_discover/
%endif %endif
@ -569,7 +526,6 @@ fi
%{_libdir}/pkgconfig/libdns_sd.pc %{_libdir}/pkgconfig/libdns_sd.pc
%if %{WITH_QT5} %if %{WITH_QT5}
%ldconfig_scriptlets qt5
%files qt5 %files qt5
%{_libdir}/libavahi-qt5.so.* %{_libdir}/libavahi-qt5.so.*
@ -581,13 +537,14 @@ fi
%endif %endif
%files help %files help
%defattr(644,root,root)
%doc docs/* avahi-daemon/example.service avahi-daemon/sftp-ssh.service avahi-daemon/ssh.service %doc docs/* avahi-daemon/example.service avahi-daemon/sftp-ssh.service avahi-daemon/ssh.service
%{_mandir}/man1/* %{_mandir}/man?/*
%{_mandir}/man5/*
%{_mandir}/man8/*
%changelog %changelog
* Sun Aug 11 2024 Funda Wang <fundawang@yeah.net> - 0.8-21
- fix wrongly splitted tools and ui-tools
- cleanup spec
* Mon Jun 24 2024 zhangpan <zhangpan103@h-partners.com> - 0.8-20 * Mon Jun 24 2024 zhangpan <zhangpan103@h-partners.com> - 0.8-20
- disable avahi-daemon.service default - disable avahi-daemon.service default

View File

@ -1,4 +1,4 @@
version_control: github version_control: github
src_repo: lathiat/avahi src_repo: lathiat/avahi
tag_prefix: "^v" tag_prefix: "^v"
seperator: "." separator: "."