1 Star 0 Fork 17

桐小哥/avahi

forked from src-openEuler/avahi 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
avahi.spec 13.00 KB
一键复制 编辑 原始数据 按行查看 历史
Name: avahi
Version: 0.7
Release: 21
Summary: Avahi is a local network service discovery
License: LGPLv2+
URL: http://avahi.org
Source0: http://avahi.org/download/%{name}-%{version}.tar.gz
Patch1: avahi-0.6.30-mono-libdir.patch
Patch6000: CVE-2017-6519-Drop-legacy-unicast-queries-from-address-not-on-loca.patch
Patch9000: avahi-modify-fuzz-test-err.patch
BuildRequires: gcc automake libtool python2-dbus python2-libxml2 desktop-file-utils gtk2-devel glib2-devel
BuildRequires: libcap-devel expat-devel python2-devel python3-devel gdbm-devel pygobject3-devel pygtk2
BuildRequires: intltool perl-XML-Parser xmltoman systemd
BuildRequires: dbus-devel >= 0.90 dbus-glib-devel >= 0.70 gtk3-devel >= 2.99.0 libdaemon-devel >= 0.11
Requires: dbus expat libdaemon >= 0.11 %{name}-libs = %{version}-%{release}
Requires(pre): shadow-utils coreutils
Requires(post): dbus systemd
Requires(preun): systemd
Requires(postun): systemd
Provides: avahi-autoipd = %{version}-%{release}
Obsoletes: avahi-autoipd < %{version}-%{release}
%description
Avahi is a system which facilitates service discovery on a local network
via the mDNS/DNS-SD protocol suite. This enables you to plug your laptop
or computer into a network and instantly be able to view other people who
you can chat with, find printers to print to or find files being shared.
%package tools
Summary: CMD tools for mDNS browsing and publishing
Requires: %{name}-libs = %{version}-%{release}
%description tools
CMD tools for mDNS services.
%package ui-tools
Summary: ui-tools for mDNS
Requires: %{name}-libs = %{version}-%{release} python2-avahi = %{version}-%{release}
Requires: tigervnc openssh-clients pygtk2 pygtk2-libglade gdbm python2-dbus pygobject3-base
%description ui-tools
Avahi Graphical user interface tools for mDNS services.
%package ui
Summary: Gtk library for Avahi (Gtk2)
Requires: %{name}-libs = %{version}-%{release} gtk2
%description ui
This package contains a Gtk 2.x widget for browsing services.
%package dnsconfd
Summary: This is useful for configuring unicast DNS servers in a DHCP-like fashion with mDNS
Requires: %{name}-libs = %{version}-%{release}
%description dnsconfd
This is useful for configuring unicast DNS servers in a DHCP-like fashion with mDNS.
%package compat-howl
Summary: Libraries for compat-howl
Requires: %{name}-libs = %{version}-%{release}
Obsoletes: howl-libs
Provides: howl-libs
%description compat-howl
Libraries for compat-howl.
%package compat-howl-devel
Summary: Header files and libs for howl compatibility libraries
Requires: %{name}-compat-howl = %{version}-%{release}
Requires: %{name}-devel = %{version}-%{release}
Obsoletes: howl-devel
Provides: howl-devel
%description compat-howl-devel
Header files and libs for howl compatibility libraries
%package compat-libdns_sd
Summary: Libraries for compat-libdns_sd
Requires: %{name}-libs = %{version}-%{release}
%description compat-libdns_sd
Libraries for compat-libdns_sd.
%package compat-libdns_sd-devel
Summary: Header files and libs for compat-libdns_sd-devel
Requires: %{name}-compat-libdns_sd = %{version}-%{release}
Requires: %{name}-devel = %{version}-%{release}
%description compat-libdns_sd-devel
Header files and libs for compat-libdns_sd-devel
%package devel
Summary: Libraries and header files for avahi development
Requires: %{name}-libs = %{version}-%{release} %{name}-ui = %{version}-%{release}
Requires: glib2-devel
Provides: %{name}-glib-devel = %{version}-%{release} %{name}-gobject-devel = %{version}-%{release} %{name}-ui-devel = %{version}-%{release}
Obsoletes: %{name}-glib-devel = %{version}-%{release} %{name}-gobject-devel = %{version}-%{release} %{name}-ui-devel = %{version}-%{release}
%description devel
Header files for using the avahi libraries.
%package -n python2-avahi
Summary: Python2 Avahi api
Obsoletes: python-avahi < 0.7
Provides: python-avahi = %{version}-%{release}
Requires: %{name}-libs = %{version}-%{release}
%description -n python2-avahi
Python2 Avahi api.
%package -n python3-avahi
Summary: Python3 Avahi api
Requires: %{name}-libs = %{version}-%{release}
%description -n python3-avahi
Python3 Avahi api.
%package glib
Summary: Glib libraries for avahi
Requires: %{name}-libs = %{version}-%{release}
%description glib
Libraries for easy use of avahi from glib applications.
%package gobject
Summary: GObject wrapper library for Avahi
Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-glib = %{version}-%{release}
%description gobject
This library contains a GObject wrapper for the Avahi API
%package ui-gtk3
Summary: Gtk user interface library for Avahi (Gtk+ 3 version)
Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-glib = %{version}-%{release}
Requires: gtk3
%description ui-gtk3
This library contains a Gtk 3.x widget for browsing services.
%package libs
Summary: Libraries for avahi run-time use
%description libs
The avahi-libs package contains the libraries needed
to run programs that use avahi.
%package_help
%prep
%autosetup -n %{name}-%{version} -p1
%build
NOCONFIGURE=1 ./autogen.sh
%configure --disable-monodoc --with-avahi-user=avahi \
--with-avahi-group=avahi --with-avahi-priv-access-group=avahi \
--with-autoipd-user=avahi-autoipd --with-autoipd-group=avahi-autoipd \
--with-systemdsystemunitdir=%{_unitdir} --enable-introspection=no \
--enable-shared=yes --enable-static=no --disable-silent-rules \
--enable-compat-libdns_sd --enable-compat-howl --disable-qt3 \
--disable-qt4 --disable-mono \
--with-distro=none PYTHON=%{__python2}
%make_build -k V=1 || make V=1
%install
%make_install
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/dns_sd.h %{buildroot}/%{_includedir}/
install -d $RPM_BUILD_ROOT%{_localstatedir}/run/avahi-daemon
install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/avahi-autoipd
mkdir -p $RPM_BUILD_ROOT/etc/avahi/etc
touch $RPM_BUILD_ROOT/etc/avahi/etc/localtime
install -d %{buildroot}%{python3_sitelib}/avahi
cp -r $RPM_BUILD_ROOT%{python2_sitelib}/avahi/* $RPM_BUILD_ROOT%{python3_sitelib}/avahi/
rm -f $RPM_BUILD_ROOT%{python3_sitelib}/avahi/*.py{c,o}
sed -i 's!/usr/bin/python2!/usr/bin/python3!' $RPM_BUILD_ROOT%{python3_sitelib}/avahi/ServiceTypeDatabase.py
for i in $RPM_BUILD_ROOT%{_datadir}/applications/*.desktop ; do
if [ -n "$(grep '^GenericName=$' $i)" ]; then
desktop-file-edit --copy-name-to-generic-name $i
fi
done
%find_lang %{name}
%delete_la_and_a
%check
for i in $RPM_BUILD_ROOT%{_datadir}/applications/*.desktop ; do
desktop-file-validate $i
done
%pre
%define gid_uid 70
if ! getent group avahi > /dev/null ; then
groupadd -f -g %{gid_uid} -r avahi
fi
if ! getent passwd avahi > /dev/null ; then
if ! getent passwd %{gid_uid} > /dev/null ; then
useradd -r -l -u %{gid_uid} -g avahi -d %{_localstatedir}/run/avahi-daemon -s /sbin/nologin -c "Avahi mDNS/DNS-SD Stack" avahi
else
useradd -r -l -g avahi -d %{_localstatedir}/run/avahi-daemon -s /sbin/nologin -c "Avahi mDNS/DNS-SD Stack" avahi
fi
fi
%define autoipd_gid_pid 170
if ! getent group avahi-autoipd >/dev/null ; then
groupadd -f -g %{autoipd_gid_pid} -r avahi-autoipd
fi
if ! getent passwd avahi-autoipd > /dev/null ; then
if ! getent passwd %{autoipd_gid_pid} > /dev/null; then
useradd -r -u %{autoipd_gid_pid} -l -g avahi-autoipd -d %{_localstatedir}/lib/avahi-autoipd -s /sbin/nologin -c "Avahi IPv4LL Stack" avahi-autoipd
else
useradd -r -l -g avahi-autoipd -d %{_localstatedir}/lib/avahi-autoipd -s /sbin/nologin -c "Avahi IPv4LL Stack" avahi-autoipd
fi
fi
exit 0
%preun
%systemd_preun avahi-daemon.socket avahi-daemon.service
%post
/sbin/ldconfig
/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
/usr/bin/cp -cfp /etc/localtime /etc/avahi/etc/localtime >/dev/null 2>&1 || :
fi
%systemd_post avahi-daemon.socket avahi-daemon.service
%postun
/sbin/ldconfig
%systemd_postun_with_restart avahi-daemon.socket avahi-daemon.service
%post dnsconfd
%systemd_post avahi-dnsconfd.service
%preun dnsconfd
%systemd_preun avahi-dnsconfd.service
%postun dnsconfd
%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
%post ui -p /sbin/ldconfig
%postun ui -p /sbin/ldconfig
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
%post glib -p /sbin/ldconfig
%postun glib -p /sbin/ldconfig
%post ui-gtk3 -p /sbin/ldconfig
%postun ui-gtk3 -p /sbin/ldconfig
%post gobject -p /sbin/ldconfig
%postun gobject -p /sbin/ldconfig
%files -f %{name}.lang
%doc README
%license LICENSE
%{_sbindir}/avahi-daemon
%{_sbindir}/avahi-autoipd
%dir %{_libdir}/avahi
%{_libdir}/avahi/service-types.db
%{_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/etc
%ghost %{_sysconfdir}/avahi/etc/localtime
%config(noreplace) %{_sysconfdir}/avahi/hosts
%config(noreplace) %{_sysconfdir}/avahi/avahi-daemon.conf
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/avahi-dbus.conf
%config(noreplace) %{_sysconfdir}/avahi/avahi-autoipd.action
%dir %{_sysconfdir}/avahi/services
%ghost %dir %{_localstatedir}/run/avahi-daemon
%attr(1770,avahi-autoipd,avahi-autoipd) %dir %{_localstatedir}/lib/avahi-autoipd/
%{_unitdir}/avahi-daemon.service
%{_unitdir}/avahi-daemon.socket
%attr(1770,avahi-autoipd,avahi-autoipd) %dir %{_localstatedir}/lib/avahi-autoipd/
%exclude %{_sysconfdir}/rc.d/init.d/avahi-daemon
%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 libs
%doc README
%license LICENSE
%{_libdir}/libavahi-common.so.*
%{_libdir}/libavahi-client.so.*
%files glib
%{_libdir}/libavahi-glib.so.*
%files gobject
%{_libdir}/libavahi-gobject.so.*
%files ui-gtk3
%{_libdir}/libavahi-ui-gtk3.so.*
%files devel
%{_libdir}/libavahi-common.so
%{_libdir}/libavahi-core.so
%{_libdir}/libavahi-client.so
%{_libdir}/libavahi-glib.so
%{_libdir}/libavahi-gobject.so
%{_libdir}/libavahi-ui.so
%{_libdir}/libavahi-ui-gtk3.so
%{_libdir}/pkgconfig/avahi-ui.pc
%{_libdir}/pkgconfig/avahi-ui-gtk3.pc
%{_libdir}/pkgconfig/avahi-gobject.pc
%{_libdir}/pkgconfig/avahi-glib.pc
%{_libdir}/pkgconfig/avahi-core.pc
%{_libdir}/pkgconfig/avahi-client.pc
%{_includedir}/*
%exclude %{_includedir}/avahi-compat-howl
%exclude %{_includedir}/avahi-compat-libdns_sd
%exclude %{_includedir}/dns_sd.h
%files -n python2-avahi
%{python2_sitelib}/avahi/
%files -n python3-avahi
%{python3_sitelib}/avahi/
%files dnsconfd
%{_sbindir}/avahi-dnsconfd
%{_unitdir}/avahi-dnsconfd.service
%config(noreplace) %{_sysconfdir}/avahi/avahi-dnsconfd.action
%files tools
%{_bindir}/*
%exclude %{_bindir}/b*
%exclude %{_bindir}/avahi-discover*
%exclude %{_bindir}/avahi-bookmarks
%files ui
%{_libdir}/libavahi-ui.so.*
%files ui-tools
%{_bindir}/b*
%{_bindir}/avahi-discover
%{_bindir}/avahi-bookmarks
%{_datadir}/applications/b*.desktop
%{_datadir}/applications/avahi-discover.desktop
%{_datadir}/avahi/interfaces/
%{python2_sitelib}/avahi_discover/
%files compat-howl
%{_libdir}/libhowl.so.*
%files compat-howl-devel
%{_libdir}/libhowl.so
%{_includedir}/avahi-compat-howl
%{_libdir}/pkgconfig/avahi-compat-howl.pc
%{_libdir}/pkgconfig/howl.pc
%files compat-libdns_sd
%{_libdir}/libdns_sd.so.*
%files compat-libdns_sd-devel
%{_libdir}/libdns_sd.so
%{_includedir}/avahi-compat-libdns_sd
%{_includedir}/dns_sd.h
%{_libdir}/pkgconfig/avahi-compat-libdns_sd.pc
%{_libdir}/pkgconfig/libdns_sd.pc
%files help
%defattr(644,root,root)
%doc docs/* avahi-daemon/example.service avahi-daemon/sftp-ssh.service avahi-daemon/ssh.service
%{_mandir}/man1/*
%{_mandir}/man5/*
%{_mandir}/man8/*
%changelog
* Sat Feb 29 2020 hexiujun <[email protected]> - 0.7-21
- Type:NA
- ID:NA
- SUG:NA
- DESC:use python2 explicitly in build environment
* Tue Feb 25 2020 openEuler Buildteam <[email protected]> - 0.7-20
- Type:NA
- ID:NA
- SUG:NA
- DESC:modify fuzz test err
* Tue Dec 24 2019 openEuler Buildteam <[email protected]> - 0.7-19
- rename docs subpackage as help subpackage
* Wed Oct 30 2019 openEuler Buildteam <[email protected]> - 0.7-18
- Type:NA
- ID:NA
- SUG:NA
- DESC:Solve the problem of compilation failures
* Mon Sep 23 2019 hufeng <[email protected]> - 0.7-17
-Create spec
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/tong_1001/avahi.git
[email protected]:tong_1001/avahi.git
tong_1001
avahi
avahi
master

搜索帮助