%define name avahi %define version 0.6.31 %define release %mkrel 2 %define client_name %{name}-client %define common_name %{name}-common %define core_name %{name}-core %define dns_sd_name %{name}-compat-libdns_sd %define glib_name %{name}-glib %define gobject_name %name-gobject %define howl_name %{name}-compat-howl %define qt4_name %{name}-qt4 %define ui_name %{name}-ui %define gtk3_name %{name}-ui-gtk3 %define dns_sd_old_name mDNSResponder %define howl_old_name howl %define client_major 3 %define common_major 3 %define core_major 7 %define dns_sd_major 1 %define glib_major 1 %define gobject_major 0 %define howl_major 0 %define qt4_major 1 %define qt3_major 1 %define gtk3_major 0 %define ui_major 0 %define lib_client_name %mklibname %{client_name} %{client_major} %define develnameclient %mklibname -d %client_name %define lib_common_name %mklibname %{common_name} %{common_major} %define develnamecommon %mklibname -d %common_name %define lib_core_name %mklibname %{core_name} %{core_major} %define develnamecore %mklibname -d %core_name %define lib_dns_sd_name %mklibname %{dns_sd_name} %{dns_sd_major} %define develnamedns_sd %mklibname -d %dns_sd_name %define lib_glib_name %mklibname %{glib_name} %{glib_major} %define develnameglib %mklibname -d %glib_name %define lib_gobject_name %mklibname %{gobject_name} %{gobject_major} %define develnamegobject %mklibname -d %gobject_name %define lib_howl_name %mklibname %{howl_name} %{howl_major} %define develnamehowl %mklibname -d %howl_name %define lib_qt4_name %mklibname %{qt4_name}_ %{qt4_major} %define develnameqt4 %mklibname -d %qt4_name %define lib_gtk3_name %mklibname %{gtk3_name}_ %{gtk3_major} %define develnamegtk3 %mklibname -d %gtk3_name %define lib_ui_name %mklibname %{ui_name} %{qt3_major} %define develnameui %mklibname -d %ui_name %define lib_dns_sd_old_name %mklibname %{dns_sd_old_name} 1 %define lib_howl_old_name %mklibname %{howl_old_name} 0 %define lib_howl_fake_EVR 1.0.0-7mdk %define build_mono 1 %{?_with_mono: %{expand: %%global build_mono 1}} %{?_without_mono: %{expand: %%global build_mono 0}} %ifarch %arm %mips %define build_mono 0 %endif %define build_qt4 1 %{?_with_qt4: %{expand: %%global build_qt4 1}} %{?_without_qt4: %{expand: %%global build_qt4 0}} %define build_gtk3 1 %{?_with_gtk3: %{expand: %%global build_gtk3 1}} %{?_without_gtk3: %{expand: %%global build_gtk3 0}} %define build_bootstrap 0 %{?_with_bootstrap: %{expand: %%global build_bootstrap 1}} %if %{build_bootstrap} %define build_mono 0 %define build_qt4 0 %define build_gtk3 0 %endif Name: %{name} Version: %{version} Release: %{release} Summary: Avahi service discovery (mDNS/DNS-SD) suite License: LGPLv2+ Group: System/Servers Url: http://avahi.org/ Source0: http://avahi.org/download/%{name}-%{version}.tar.gz Source1: avahi-hostname.sh BuildRequires: daemon-devel BuildRequires: dbus-devel BuildRequires: dbus-python BuildRequires: libexpat-devel >= 2.0.1 BuildRequires: libgdbm-devel BuildRequires: libglade2.0-devel BuildRequires: pygtk2.0 BuildRequires: libcap-devel #needed by autoreconf BuildRequires: intltool %if %build_qt4 BuildRequires: qt4-devel BuildRequires: gtk+3-devel %endif BuildRequires: systemd-units BuildRequires: pkgconfig(systemd) Requires(post): rpm-helper >= 0.24.8-1 Requires(preun): rpm-helper >= 0.24.8-1 Requires(post): dbus Requires(preun): dbus Suggests: nss_mdns %description Avahi is a system which facilitates service discovery on a local network -- this means that you can 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. This kind of technology is already found in MacOS X (branded 'Rendezvous', 'Bonjour' and sometimes 'ZeroConf') and is very convenient. %package dnsconfd Group: System/Servers Summary: Avahi DNS configuration server Requires: %{name} = %{version} Requires(post): rpm-helper >= 0.24.8-1 Requires(preun): rpm-helper >= 0.24.8-1 %description dnsconfd avahi-dnsconfd is a small daemon which may be used to configure conventional DNS servers using mDNS in a DHCP-like fashion. Especially useful on IPv6. %package x11 Group: System/Servers Summary: Graphical tools for Avahi Requires: %{name} = %{version} %description x11 Graphical tools for Avahi. It includes avahi-discover-standalone. %package python Group: System/Libraries Summary: Python bindings and utilities for Avahi Requires: pygtk2.0-libglade python-twisted-core Requires: python-twisted-web dbus-python avahi Requires: %{name}-x11 %description python Python bindings and utilities for Avahi. It includes avahi-bookmarks and avahi-discover. %if %build_mono %package sharp Group: System/Libraries Summary: Mono bindings for Avahi BuildRequires: mono-devel mono-tools #gw this is needed by mono-find-requires: BuildRequires: avahi-ui-devel Requires: %lib_client_name = %version Requires: %lib_common_name = %version Requires: %lib_glib_name = %version %description sharp Mono bindings for Avahi. %package sharp-doc Summary: Development documentation for avahi-sharp Group: Development/Other Requires(post): mono-tools >= 1.1.9 Requires(postun): mono-tools >= 1.1.9 %description sharp-doc This package contains the API documentation for the avahi-sharp in Monodoc format. %endif %package -n %{lib_client_name} Group: System/Libraries Summary: Library for avahi-client Requires: %{name} >= %{version} %description -n %{lib_client_name} Library for avahi-client. %package -n %develnameclient Group: Development/C Summary: Devel library for avahi-client Provides: %{client_name}-devel = %{version}-%{release} Provides: lib%{client_name}-devel = %{version}-%{release} Requires: %{lib_client_name} = %{version} Obsoletes: %mklibname -d %client_name 3 %description -n %develnameclient Devel library for avahi-client. %package -n %{lib_common_name} Group: System/Libraries Summary: Library for avahi-common %description -n %{lib_common_name} Library for avahi-common. %package -n %develnamecommon Group: Development/C Summary: Devel library for avahi-common Provides: %{common_name}-devel = %{version}-%{release} Provides: lib%{common_name}-devel = %{version}-%{release} Requires: %{lib_common_name} = %{version} Obsoletes: %mklibname -d %common_name 3 %description -n %develnamecommon Devel library for avahi-common. %package -n %{lib_core_name} Group: System/Libraries Summary: Library for avahi-core %description -n %{lib_core_name} Library for avahi-core. %package -n %develnamecore Group: Development/C Summary: Devel library for avahi-core Provides: %{core_name}-devel = %{version}-%{release} Provides: lib%{core_name}-devel = %{version}-%{release} Requires: %{lib_core_name} = %{version} Obsoletes: %mklibname -d %core_name 5 %description -n %develnamecore Devel library for avahi-core. %package -n %{lib_dns_sd_name} Group: System/Libraries Summary: Avahi compatibility library for libdns_sd Obsoletes: %{lib_dns_sd_old_name} Provides: %{lib_dns_sd_old_name} %description -n %{lib_dns_sd_name} Avahi compatibility library for libdns_sd %package -n %develnamedns_sd Group: Development/C Summary: Avahi devel compatibility library for libdns_sd Provides: %{dns_sd_name}-devel = %{version}-%{release} Provides: lib%{dns_sd_name}-devel = %{version}-%{release} Requires: %{lib_dns_sd_name} = %{version} Obsoletes: %{lib_dns_sd_old_name}-devel Provides: %{lib_dns_sd_old_name}-devel Provides: %{dns_sd_old_name}-devel = %{version}-%{release} Provides: lib%{dns_sd_old_name}-devel = %{version}-%{release} Obsoletes: %mklibname -d %dns_sd_name 1 %description -n %develnamedns_sd Avahi devel compatibility library for libdns_sd. %package -n %{lib_glib_name} Group: System/Libraries Summary: Library for avahi-glib %description -n %{lib_glib_name} Library for avahi-glib. %package -n %develnameglib Group: Development/C Summary: Devel library for avahi-glib Provides: %{glib_name}-devel = %{version}-%{release} Provides: lib%{glib_name}-devel = %{version}-%{release} Requires: %{lib_glib_name} = %{version} Obsoletes: %mklibname -d %glib_name 1 %description -n %develnameglib Devel library for avahi-glib. %package -n %{lib_gobject_name} Group: System/Libraries Summary: Library for avahi-gobject %description -n %{lib_gobject_name} Library for avahi-gobject. %package -n %develnamegobject Group: Development/C Summary: Devel library for avahi-gobject Provides: %{gobject_name}-devel = %{version}-%{release} Provides: lib%{gobject_name}-devel = %{version}-%{release} Requires: %{lib_gobject_name} = %{version} %description -n %develnamegobject Devel library for avahi-gobject. %package -n %{lib_howl_name} Group: System/Libraries Summary: Avahi compatibility library for howl Obsoletes: %{lib_howl_old_name} Provides: %{lib_howl_old_name} = %{lib_howl_fake_EVR} %description -n %{lib_howl_name} Avahi compatibility library for howl. %package -n %develnamehowl Group: Development/C Summary: Avahi devel compatibility library for libdns_sd for howl Provides: %{howl_name}-devel = %{version}-%{release} Provides: lib%{howl_name}-devel = %{version}-%{release} Requires: %{lib_howl_name} = %{version} Obsoletes: %{lib_howl_old_name}-devel Provides: %{lib_howl_old_name}-devel = %{lib_howl_fake_EVR} Provides: %{howl_old_name}-devel = %{version}-%{release} Provides: lib%{howl_old_name}-devel = %{version}-%{release} Obsoletes: %mklibname -d %howl_name 0 %description -n %develnamehowl Avahi devel compatibility library for libdns_sd for howl. %if %build_qt4 %package -n %{lib_qt4_name} Group: System/Libraries Summary: Library for avahi-qt4 %description -n %{lib_qt4_name} Library for avahi-qt4. %package -n %develnameqt4 Group: Development/C Summary: Devel library for avahi-qt4 Provides: %{qt4_name}-devel = %{version}-%{release} Provides: lib%{qt4_name}-devel = %{version}-%{release} Requires: %{lib_qt4_name} = %{version} Obsoletes: %mklibname -d %{qt4_name}_ 1 %description -n %develnameqt4 Devel library for avahi-qt4. %endif %if %build_gtk3 %package -n %{lib_gtk3_name} Group: System/Libraries Summary: Library for avahi-gtk3 %description -n %{lib_gtk3_name} Library for avahi-gtk3. %package -n %develnamegtk3 Group: Development/C Summary: Devel library for avahi-gtk3 Provides: %{gtk3_name}-devel = %{version}-%{release} Provides: lib%{gtk3_name}-devel = %{version}-%{release} Requires: %{lib_gtk3_name} = %{version} %description -n %develnamegtk3 Devel library for avahi-gtk3. %endif %package -n %{lib_ui_name} Group: System/Libraries Summary: Library for avahi-ui %description -n %{lib_ui_name} Library for avahi-ui. %package -n %develnameui Group: Development/C Summary: Devel library for avahi-ui Provides: %{ui_name}-devel = %{version}-%{release} Provides: lib%{ui_name}-devel = %{version}-%{release} Requires: %{lib_ui_name} = %{version} Obsoletes: %mklibname -d %{ui_name} 1 %description -n %develnameui Devel library for avahi-ui. %prep %setup -q cp %{SOURCE1} avahi-hostname.sh %build #autoreconf export PKG_CONFIG_PATH=/usr/lib/qt4/%{_lib}/pkgconfig %configure2_5x \ --disable-static \ %if !%build_mono --disable-mono \ %endif %if !%build_qt4 --disable-qt4 \ %endif --localstatedir=%{_var} \ --with-avahi-priv-access-group="avahi" \ --enable-compat-libdns_sd \ --enable-compat-howl \ --enable-introspection=no \ %if !%build_gtk3 --disable-gtk3 \ %endif --disable-qt3 %make %install %makeinstall_std ln -s avahi-compat-howl.pc %buildroot%_libdir/pkgconfig/howl.pc %if "%_lib" != "lib" && %build_mono mkdir -p %buildroot%_prefix/lib mv %buildroot%_libdir/mono %buildroot%_prefix/lib perl -pi -e "s/%_lib/lib/" %buildroot%_libdir/pkgconfig/avahi-{,ui-}sharp.pc %endif # install hostname.d hook mkdir -p %{buildroot}/%{_sysconfdir}/sysconfig/network-scripts/hostname.d/ install -m755 avahi-hostname.sh %{buildroot}/%{_sysconfdir}/sysconfig/network-scripts/hostname.d/avahi %find_lang avahi #we don't want these find %{buildroot} -name "*.la" -exec rm -rf {} \; # remove example # see : https://bugs.mageia.org/show_bug.cgi?id=3419 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/avahi/services/sftp-ssh.service mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/avahi rm -f %{buildroot}%{_initrddir}/%{name}-daemon rm -f %{buildroot}%{_initrddir}/%{name}-dnsconfd %pre %_pre_useradd %{name} %{_var}/%{name} /bin/false %_pre_useradd %{name}-autoipd %{_var}/%{name} /bin/false %postun %_postun_userdel %{name} %_postun_userdel %{name}-autoipd %post %_post_service %{name}-daemon %preun %_preun_service %{name}-daemon %post dnsconfd %_post_service %{name}-dnsconfd %preun dnsconfd %_preun_service %{name}-dnsconfd %if %build_mono %post sharp-doc %_bindir/monodoc --make-index > /dev/null %postun sharp-doc if [ "$1" = "0" -a -x %_bindir/monodoc ]; then %_bindir/monodoc --make-index > /dev/null fi %endif %files -f avahi.lang %dir %{_sysconfdir}/%{name}/ %dir %{_sysconfdir}/%{name}/services/ %config(noreplace) %{_sysconfdir}/%{name}/hosts %config(noreplace) %{_sysconfdir}/%{name}/%{name}-daemon.conf %config(noreplace) %{_sysconfdir}/%{name}/avahi-autoipd.action %config(noreplace) %{_sysconfdir}/dbus-1/system.d/%{name}-dbus.conf %config(noreplace) %{_sysconfdir}/%{name}/services/ssh.service %ghost %attr(0755,avahi,avahi) %dir %{_localstatedir}/avahi %{_sysconfdir}/sysconfig/network-scripts/hostname.d/avahi %{_bindir}/%{name}-browse %{_bindir}/%{name}-browse-domains %{_bindir}/%{name}-publish %{_bindir}/%{name}-publish-address %{_bindir}/%{name}-publish-service %{_bindir}/%{name}-resolve %{_bindir}/%{name}-resolve-address %{_bindir}/%{name}-resolve-host-name %{_bindir}/%{name}-set-host-name %{_sbindir}/%{name}-daemon %{_sbindir}/avahi-autoipd %{_datadir}/%{name}/%{name}-service.dtd %{_datadir}/dbus-1/interfaces/*.xml #%{_datadir}/%{name}/introspection/AddressResolver.introspect #%{_datadir}/%{name}/introspection/DomainBrowser.introspect #%{_datadir}/%{name}/introspection/EntryGroup.introspect #%{_datadir}/%{name}/introspection/HostNameResolver.introspect #%{_datadir}/%{name}/introspection/RecordBrowser.introspect #%{_datadir}/%{name}/introspection/Server.introspect #%{_datadir}/%{name}/introspection/ServiceBrowser.introspect #%{_datadir}/%{name}/introspection/ServiceResolver.introspect #%{_datadir}/%{name}/introspection/ServiceTypeBrowser.introspect %{_datadir}/%{name}/service-types %{_mandir}/man1/%{name}-browse-domains.1* %{_mandir}/man1/%{name}-browse.1* %{_mandir}/man1/%{name}-publish.1* %{_mandir}/man1/%{name}-publish-address.1* %{_mandir}/man1/%{name}-publish-service.1* %{_mandir}/man1/%{name}-resolve.1* %{_mandir}/man1/%{name}-resolve-address.1* %{_mandir}/man1/%{name}-resolve-host-name.1* %{_mandir}/man1/%{name}-set-host-name.1* %{_mandir}/man5/%{name}-daemon.conf.5* %{_mandir}/man5/%{name}.hosts.5* %{_mandir}/man5/%{name}.service.5* %{_mandir}/man8/%{name}-daemon.8* %{_mandir}/man8/avahi-autoipd* %dir %{_datadir}/%{name} %{_unitdir}/avahi-daemon.service %{_unitdir}/avahi-daemon.socket %{_unitdir}/avahi-dnsconfd.service %{_datadir}/dbus-1/system-services/org.freedesktop.Avahi.service %{_libdir}/avahi/service-types.db %files dnsconfd %{_sysconfdir}/%{name}/%{name}-dnsconfd.action %{_sbindir}/%{name}-dnsconfd %{_mandir}/man8/%{name}-dnsconfd.8* %{_mandir}/man8/%{name}-dnsconfd.action.8* %files x11 %{_bindir}/%{name}-discover-standalone %{_bindir}/bshell %{_bindir}/bssh %{_bindir}/bvnc %{_datadir}/applications/bssh.desktop %{_datadir}/applications/bvnc.desktop %{_mandir}/man1/bssh.1* %{_mandir}/man1/bvnc.1* %{_datadir}/applications/%{name}-discover.desktop %{_datadir}/%{name}/interfaces/%{name}-discover.ui %files python %{_bindir}/%{name}-bookmarks %{_bindir}/%{name}-discover %{py_puresitedir}/%{name}/*.py* %{py_puresitedir}/avahi_discover/ %{_mandir}/man1/%{name}-discover.1* %{_mandir}/man1/%{name}-bookmarks.1* %if %build_mono %files sharp %{_prefix}/lib/mono/%{name}-sharp/%{name}-sharp.dll %{_prefix}/lib/mono/gac/%{name}-sharp/ %{_libdir}/pkgconfig/%{name}-sharp.pc %{_prefix}/lib/mono/%{name}-ui-sharp/%{name}-ui-sharp.dll %{_prefix}/lib/mono/gac/%{name}-ui-sharp/ %{_libdir}/pkgconfig/%{name}-ui-sharp.pc %files sharp-doc %{_usr}/lib/monodoc/sources/%{name}-sharp-docs.source %{_usr}/lib/monodoc/sources/%{name}-sharp-docs.tree %{_usr}/lib/monodoc/sources/%{name}-sharp-docs.zip %{_usr}/lib/monodoc/sources/%{name}-ui-sharp-docs.source %{_usr}/lib/monodoc/sources/%{name}-ui-sharp-docs.tree %{_usr}/lib/monodoc/sources/%{name}-ui-sharp-docs.zip %endif %files -n %{lib_client_name} %{_libdir}/lib%{name}-client.so.%{client_major}* %files -n %{lib_common_name} %{_libdir}/lib%{name}-common.so.%{common_major}* %files -n %{lib_core_name} %{_libdir}/lib%{name}-core.so.%{core_major}* %files -n %{lib_dns_sd_name} %{_libdir}/libdns_sd.so.%{dns_sd_major}* %files -n %{lib_glib_name} %{_libdir}/lib%{name}-glib.so.%{glib_major}* %files -n %{lib_gobject_name} %{_libdir}/lib%{name}-gobject.so.%{gobject_major}* %files -n %{lib_howl_name} %{_libdir}/libhowl.so.%{howl_major}* %if %build_qt4 %files -n %{lib_qt4_name} %{_libdir}/lib%{name}-qt4.so.%{qt4_major}* %endif %if %build_gtk3 %files -n %{lib_gtk3_name} %{_libdir}/lib%{name}-ui-gtk3.so.%{gtk3_major}* %endif %files -n %{lib_ui_name} %{_libdir}/lib%{name}-ui.so.%{ui_major}* %files -n %develnameclient %{_includedir}/%{name}-client %{_libdir}/lib%{name}-client.so %{_libdir}/pkgconfig/%{name}-client.pc %files -n %develnamecommon %{_includedir}/%{name}-common %{_libdir}/lib%{name}-common.so %files -n %develnamecore %{_includedir}/%{name}-core %{_libdir}/lib%{name}-core.so %{_libdir}/pkgconfig/%{name}-core.pc %files -n %develnamedns_sd %{_includedir}/%{name}-compat-libdns_sd %{_libdir}/libdns_sd.so %{_libdir}/pkgconfig/%{name}-compat-libdns_sd.pc %files -n %develnameglib %{_includedir}/%{name}-glib %{_libdir}/lib%{name}-glib.so %{_libdir}/pkgconfig/%{name}-glib.pc %files -n %develnamegobject %{_includedir}/%{name}-gobject %{_libdir}/lib%{name}-gobject.so %{_libdir}/pkgconfig/%{name}-gobject.pc %files -n %develnamehowl %{_includedir}/%{name}-compat-howl %{_libdir}/libhowl.so %{_libdir}/pkgconfig/%{name}-compat-howl.pc %{_libdir}/pkgconfig/howl.pc %if %build_qt4 %files -n %develnameqt4 %{_includedir}/%{name}-qt4 %{_libdir}/lib%{name}-qt4.so %{_libdir}/pkgconfig/%{name}-qt4.pc %endif %if %build_gtk3 %files -n %develnamegtk3 %{_libdir}/libavahi-ui-gtk3.so %{_libdir}/pkgconfig/avahi-ui-gtk3.pc %endif %files -n %develnameui %{_includedir}/%{name}-ui %{_libdir}/lib%{name}-ui.so %{_libdir}/pkgconfig/%{name}-ui.pc %changelog * Fri Jan 11 2013 umeabot <umeabot> 0.6.31-2.mga3 + Revision: 346700 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Wed Aug 08 2012 guillomovitch <guillomovitch> 0.6.31-1.mga3 + Revision: 279955 - new version * Wed Aug 08 2012 guillomovitch <guillomovitch> 0.6.30-9.mga3 + Revision: 279939 - drop sysinit support - make systemd support mandatory * Sat Apr 28 2012 tmb <tmb> 0.6.30-8.mga2 + Revision: 234113 - fix filelists - fix build with newer automake (yoctoproject, P0) - Require rpm-helper >= 0.24.8-1 for systemd support - rebuild for versioned rpm-helper requires * Wed Dec 07 2011 dmorgan <dmorgan> 0.6.30-6.mga2 + Revision: 178135 - Create /var/avahi folder ( mga #3574) * Mon Dec 05 2011 fwang <fwang> 0.6.30-5.mga2 + Revision: 176921 - update br + dmorgan <dmorgan> - Fix file list - Do not package example file ( mga #3419) * Mon Sep 19 2011 wally <wally> 0.6.30-4.mga2 + Revision: 145618 - disable static build * Sun Jul 17 2011 dmorgan <dmorgan> 0.6.30-3.mga2 + Revision: 125319 - Enable systemd * Fri Jun 10 2011 dmorgan <dmorgan> 0.6.30-2.mga2 + Revision: 103126 - Add back missing macro * Fri Jun 10 2011 dmorgan <dmorgan> 0.6.30-1.mga2 + Revision: 103125 - Enable gtk3 package - Remove buildroot * Thu Apr 14 2011 pterjan <pterjan> 0.6.30-1.mga1 + Revision: 85474 - Update to 0.6.30 * Mon Apr 11 2011 rtp <rtp> 0.6.28-5.mga1 + Revision: 83228 - fix build (fix howl compat .pc version field) * Thu Feb 24 2011 mikala <mikala> 0.6.28-4.mga1 + Revision: 58743 - Add patch0 to fix CVE-2011-1002 & Avahi #325 : Fix denial of service (infinite loop) vian an empty IPV4 or IPV6 UDP packet to port 5353 * Tue Jan 25 2011 dmorgan <dmorgan> 0.6.28-3.mga1 + Revision: 38863 - Bump release - Add systemd support from mdv ( disabled by now) * Sun Jan 16 2011 misc <misc> 0.6.28-2.mga1 + Revision: 20436 - remove old Obsoletes/Provides ( no longer needed since 2006.0 ) + dmorgan <dmorgan> - Bump release - Do not build with bootstrap * Wed Jan 12 2011 dmorgan <dmorgan> 0.6.28-1.mga1 + Revision: 7770 - Disable Qt3 - imported package avahi