Accepting request 583648 from GNOME:Next

- Modernize spec file by calling spec-cleaner

OBS-URL: https://build.opensuse.org/request/show/583648
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/avahi?expand=0&rev=143
This commit is contained in:
Dominique Leuenberger 2018-03-09 10:13:28 +00:00 committed by Git OBS Bridge
parent 6186a6463c
commit f18ded8a5d
5 changed files with 413 additions and 697 deletions

View File

@ -16,12 +16,6 @@
# #
#Compat macro for new _fillupdir macro introduced in Nov 2017
%if ! %{defined _fillupdir}
%define _fillupdir /var/adm/fillup-templates
%endif
Name: avahi-glib2
# Do not edit this auto generated file! Edit avahi.spec. # Do not edit this auto generated file! Edit avahi.spec.
%define _name avahi %define _name avahi
# In automatic build systems you want to enable just one of following options. # In automatic build systems you want to enable just one of following options.
@ -33,13 +27,6 @@ Name: avahi-glib2
%define build_mono 0 %define build_mono 0
%define build_qt3 0 %define build_qt3 0
%define build_qt4 0 %define build_qt4 0
Version: 0.7
Release: 0
# FIXME: on upgrade, ensure to verify if -DGTK_DISABLE_DEPRECATED=1 can remain in avahi=ui/Makefile.am (GtkStock deprecated with GTK+ 3.9.10).
%if !%build_glib2 && !%build_mono && !%build_qt3 && !%build_qt4
# Create split spec files only when building per partes:
#%(sh %{_sourcedir}/%{_name}_spec-prepare.sh %{_sourcedir} %{name})
%endif
%define avahi_client_soname 3 %define avahi_client_soname 3
%define avahi_common_soname 3 %define avahi_common_soname 3
%define avahi_core_soname 7 %define avahi_core_soname 7
@ -49,13 +36,16 @@ Release: 0
%define avahi_gtk3_soname 0 %define avahi_gtk3_soname 0
%define avahi_qt3_soname 1 %define avahi_qt3_soname 1
%define avahi_qt4_soname 1 %define avahi_qt4_soname 1
%if %build_glib2 %if %{build_glib2}
%define debug_package_requires libavahi-ui%{avahi_ui_soname} = %{version}-%{release} %define debug_package_requires libavahi-ui%{avahi_ui_soname} = %{version}-%{release}
%endif %endif
Url: http://www.avahi.org/ Name: avahi-glib2
Version: 0.7
Release: 0
Summary: D-BUS Service for Zeroconf and Bonjour Summary: D-BUS Service for Zeroconf and Bonjour
License: LGPL-2.1-or-later License: LGPL-2.1-or-later
Group: System/Daemons Group: System/Daemons
URL: http://www.avahi.org/
Source: http://avahi.org/download/%{_name}-%{version}.tar.gz Source: http://avahi.org/download/%{_name}-%{version}.tar.gz
# From http://packages.debian.org/sid/avahi-daemon http://ftp.debian.org/debian/pool/main/a/avahi/avahi_0.6.31-1.debian.tar.gz # From http://packages.debian.org/sid/avahi-daemon http://ftp.debian.org/debian/pool/main/a/avahi/avahi_0.6.31-1.debian.tar.gz
Source1: avahi-daemon-check-dns.sh Source1: avahi-daemon-check-dns.sh
@ -83,7 +73,6 @@ Patch4: avahi-daemon-check-dns-suse.patch
Patch18: avahi-0.6.31-invalid-packet.patch Patch18: avahi-0.6.31-invalid-packet.patch
# PATCH-FIX-UPSTREAM avahi-0.6.32-suppress-resolv-conf-warning.patch bsc#982317 mgorse@suse.com -- only warn on missing resolv.conf if it is being used. # PATCH-FIX-UPSTREAM avahi-0.6.32-suppress-resolv-conf-warning.patch bsc#982317 mgorse@suse.com -- only warn on missing resolv.conf if it is being used.
Patch19: avahi-0.6.32-suppress-resolv-conf-warning.patch Patch19: avahi-0.6.32-suppress-resolv-conf-warning.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: dbus-1-python BuildRequires: dbus-1-python
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: gcc-c++ BuildRequires: gcc-c++
@ -91,27 +80,22 @@ BuildRequires: gdbm-devel
BuildRequires: intltool BuildRequires: intltool
BuildRequires: libdaemon-devel BuildRequires: libdaemon-devel
BuildRequires: libexpat-devel BuildRequires: libexpat-devel
BuildRequires: pkg-config # libtool is needed to build all variants: bootstrap is unconditional in the build section
BuildRequires: translation-update-upstream BuildRequires: libtool
BuildRequires: pkgconfig
# Even if we are not building python bindings, we need python to build service types database: # Even if we are not building python bindings, we need python to build service types database:
BuildRequires: python-devel BuildRequires: python-devel
BuildRequires: python-gdbm BuildRequires: python-gdbm
# libtool is needed to build all variants: bootstrap is unconditional in the build section BuildRequires: translation-update-upstream
BuildRequires: libtool # FIXME: on upgrade, ensure to verify if -DGTK_DISABLE_DEPRECATED=1 can remain in avahi=ui/Makefile.am (GtkStock deprecated with GTK+ 3.9.10).
%if !%{build_glib2} && !%{build_mono} && !%{build_qt3} && !%{build_qt4}
# Create split spec files only when building per partes:
#%(sh %{_sourcedir}/%{_name}_spec-prepare.sh %{_sourcedir} %{name})
%endif
%if 0%{?suse_version} >= 1330 %if 0%{?suse_version} >= 1330
BuildRequires: strip-nondeterminism BuildRequires: strip-nondeterminism
%endif %endif
%if %suse_version <= 1110 %if %{build_core}
%define python_sitelib %{py_sitedir}
%endif
%if %build_core
PreReq: pwdutils
%if %suse_version >= 1140
PreReq: sysvinit(network)
%else
PreReq: sysconfig
%endif
Recommends: %{_name}-lang
BuildRequires: dbus-1-devel BuildRequires: dbus-1-devel
BuildRequires: doxygen BuildRequires: doxygen
BuildRequires: graphviz BuildRequires: graphviz
@ -122,10 +106,10 @@ BuildRequires: pkgconfig(systemd)
#BuildRequires: dbus-1-python #BuildRequires: dbus-1-python
#Requires: dbus-1 #Requires: dbus-1
Requires: nss-mdns Requires: nss-mdns
# bug437293 # FIXME: use proper Requires(pre/post/preun/...)
%ifarch ppc64 PreReq: pwdutils
Obsoletes: mDNSResponder-64bit PreReq: sysvinit(network)
%endif Recommends: %{_name}-lang
# #
# mDNSResponder was used for <= 10.2: # mDNSResponder was used for <= 10.2:
Provides: mDNSResponder = 107.5 Provides: mDNSResponder = 107.5
@ -134,7 +118,7 @@ Obsoletes: mDNSResponder < 107.5
# File conflict for service-types.db openSUSE <= 12.3 SLE <= 11SP2 # File conflict for service-types.db openSUSE <= 12.3 SLE <= 11SP2
#Conflicts: avahi-utils <= 0.6.31-9.2 #Conflicts: avahi-utils <= 0.6.31-9.2
%endif %endif
%if %build_glib2 %if %{build_glib2}
BuildRequires: gobject-introspection-devel BuildRequires: gobject-introspection-devel
BuildRequires: gtk2-devel BuildRequires: gtk2-devel
BuildRequires: gtk3-devel BuildRequires: gtk3-devel
@ -143,15 +127,15 @@ BuildRequires: python-gtk-devel
BuildRequires: update-desktop-files BuildRequires: update-desktop-files
BuildRequires: pkgconfig(pygobject-3.0) BuildRequires: pkgconfig(pygobject-3.0)
%endif %endif
%if %build_qt3 %if %{build_qt3}
BuildRequires: libavahi-devel BuildRequires: libavahi-devel
BuildRequires: qt3-devel BuildRequires: qt3-devel
%endif %endif
%if %build_qt4 %if %{build_qt4}
BuildRequires: libavahi-devel BuildRequires: libavahi-devel
BuildRequires: libqt4-devel BuildRequires: libqt4-devel
%endif %endif
%if %build_mono %if %{build_mono}
BuildRequires: gtk-sharp2 BuildRequires: gtk-sharp2
BuildRequires: libavahi-glib-devel BuildRequires: libavahi-glib-devel
BuildRequires: mono-devel BuildRequires: mono-devel
@ -177,8 +161,7 @@ It passes all tests in the Apple Bonjour conformance test suite. In
addition, it supports some nifty things, like correct mDNS reflection addition, it supports some nifty things, like correct mDNS reflection
across LAN segments. across LAN segments.
%if %build_core %if %{build_core}
%package -n libavahi-client3 %package -n libavahi-client3
Summary: D-BUS Service for Zeroconf and Bonjour Summary: D-BUS Service for Zeroconf and Bonjour
Group: System/Libraries Group: System/Libraries
@ -235,15 +218,6 @@ Summary: mDNSResponder Compatibility Package for D-BUS Service for Zeroco
# mDNSResponder-lib used unversioned soname. # mDNSResponder-lib used unversioned soname.
# Provide full compatibility with mDNSResponder (FIXME: should be fixed in the package): # Provide full compatibility with mDNSResponder (FIXME: should be fixed in the package):
Group: System/Libraries Group: System/Libraries
%ifarch ia64 x86_64 ppc64 s390x
Provides: libdns_sd.so()(64bit)
%else
Provides: libdns_sd.so
%endif
# bug437293
%ifarch ppc64
Obsoletes: mDNSResponder-lib-64bit
%endif
# #
# mDNSResponder-lib was used for <= 10.2: # mDNSResponder-lib was used for <= 10.2:
Provides: mDNSResponder-lib = 107.5 Provides: mDNSResponder-lib = 107.5
@ -251,6 +225,11 @@ Obsoletes: mDNSResponder-lib < 107.5
# Old name used for <= 10.3: # Old name used for <= 10.3:
Provides: avahi-compat-mDNSResponder = %{version} Provides: avahi-compat-mDNSResponder = %{version}
Obsoletes: avahi-compat-mDNSResponder < %{version} Obsoletes: avahi-compat-mDNSResponder < %{version}
%ifarch ia64 x86_64 ppc64 s390x
Provides: libdns_sd.so()(64bit)
%else
Provides: libdns_sd.so
%endif
%description -n libdns_sd %description -n libdns_sd
Apple mDNSResponder compatibility layer for avahi. Apple mDNSResponder compatibility layer for avahi.
@ -292,16 +271,16 @@ correct mDNS reflection across LAN segments.
%package -n python-avahi %package -n python-avahi
Summary: A set of Avahi utilities written in Python Summary: A set of Avahi utilities written in Python
Group: Development/Languages/Python Group: Development/Languages/Python
PreReq: coreutils
Requires: %{name} = %{version} Requires: %{name} = %{version}
Requires: dbus-1-python Requires: dbus-1-python
Requires: python-gdbm Requires: python-gdbm
Requires: python-twisted Requires: python-twisted
Requires: python-twisted-web Requires: python-twisted-web
# FIXME: use proper Requires(pre/post/preun/...)
PreReq: coreutils
# Old name used for <= 10.3: # Old name used for <= 10.3:
Provides: avahi-python = %{version} Provides: avahi-python = %{version}
Obsoletes: avahi-python < %{version} Obsoletes: avahi-python < %{version}
%py_requires
%description -n python-avahi %description -n python-avahi
Avahi is an implementation of the DNS Service Discovery and Multicast Avahi is an implementation of the DNS Service Discovery and Multicast
@ -320,7 +299,6 @@ elsewhere, like correct mDNS reflection across LAN segments.
Summary: IPv4LL Service for Zeroconf and Bonjour Summary: IPv4LL Service for Zeroconf and Bonjour
# Split provides for upgrade from openSUSE <= 12.3 and SLE <= 11. # Split provides for upgrade from openSUSE <= 12.3 and SLE <= 11.
Group: Productivity/Networking/Other Group: Productivity/Networking/Other
Provides: avahi:%{_sbindir}/avahi-autoipd
# Disable this conflict for now, it breaks staging, and it's pretty much obsolete, but can go back in if needed once a new version of avahi is released. # Disable this conflict for now, it breaks staging, and it's pretty much obsolete, but can go back in if needed once a new version of avahi is released.
# File conflict for avahi-autoipd openSUSE <= 12.3 SLE <= 11 # File conflict for avahi-autoipd openSUSE <= 12.3 SLE <= 11
#Conflicts: avahi <= 0.6.31-9.2 #Conflicts: avahi <= 0.6.31-9.2
@ -328,6 +306,7 @@ Provides: avahi:%{_sbindir}/avahi-autoipd
Requires(post): coreutils Requires(post): coreutils
# shadow contains useradd and groupadd # shadow contains useradd and groupadd
Requires(pre): shadow Requires(pre): shadow
Provides: avahi:%{_sbindir}/avahi-autoipd
%description autoipd %description autoipd
avahi-autoipd is an implementation of Dynamic Configuration of IPv4 avahi-autoipd is an implementation of Dynamic Configuration of IPv4
@ -426,8 +405,8 @@ supports some nifty things that have never been seen elsewhere like
correct mDNS reflection across LAN segments. correct mDNS reflection across LAN segments.
%endif %endif
%if %build_glib2
%if %{build_glib2}
%package -n libavahi-ui0 %package -n libavahi-ui0
Summary: D-BUS Service for Zeroconf and Bonjour Summary: D-BUS Service for Zeroconf and Bonjour
Group: System/Libraries Group: System/Libraries
@ -546,15 +525,15 @@ across LAN segments.
%package -n python-avahi-gtk %package -n python-avahi-gtk
Summary: A set of Avahi utilities written in Python Using python-gtk Summary: A set of Avahi utilities written in Python Using python-gtk
Group: Development/Languages/Python Group: Development/Languages/Python
PreReq: coreutils
Requires: python-avahi = %{version} Requires: python-avahi = %{version}
Requires: python-gtk Requires: python-gtk
# FIXME: use proper Requires(pre/post/preun/...)
PreReq: coreutils
# Old name used for <= 10.3: # Old name used for <= 10.3:
Provides: avahi-python = %{version} Provides: avahi-python = %{version}
Obsoletes: avahi-python < %{version} Obsoletes: avahi-python < %{version}
# Provide split-provides for update from <= 11.0: # Provide split-provides for update from <= 11.0:
Provides: python-avahi:%{_bindir}/avahi-bookmarks Provides: python-avahi:%{_bindir}/avahi-bookmarks
%py_requires
%description -n python-avahi-gtk %description -n python-avahi-gtk
Avahi is an implementation of the DNS Service Discovery and Multicast Avahi is an implementation of the DNS Service Discovery and Multicast
@ -617,8 +596,8 @@ addition, it supports some nifty things, like correct mDNS reflection
across LAN segments. across LAN segments.
%endif %endif
%if %build_qt3
%if %{build_qt3}
%package -n libavahi-qt3-1 %package -n libavahi-qt3-1
Summary: Qt3 Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour Summary: Qt3 Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour
# Old name used for <= 10.3: # Old name used for <= 10.3:
@ -666,8 +645,8 @@ supports some nifty things that have never been seen elsewhere like
correct mDNS reflection across LAN segments. correct mDNS reflection across LAN segments.
%endif %endif
%if %build_qt4
%if %{build_qt4}
%package -n libavahi-qt4-1 %package -n libavahi-qt4-1
Summary: Qt4 Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour Summary: Qt4 Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour
# Old name used for <= 10.3: # Old name used for <= 10.3:
@ -715,11 +694,12 @@ supports some nifty things that have never been seen elsewhere like
correct mDNS reflection across LAN segments. correct mDNS reflection across LAN segments.
%endif %endif
%if %build_core
%if %build_mono
%if %{build_core}
%if %{build_mono}
%package -n avahi-mono %package -n avahi-mono
Summary: Mono Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour Summary: Mono Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour
# FIXME: use correct group, see "https://en.opensuse.org/openSUSE:Package_group_guidelines"
Group: Development/Languages/Mono Group: Development/Languages/Mono
Requires: gtk-sharp2 Requires: gtk-sharp2
Requires: libavahi-client3 >= %{version} Requires: libavahi-client3 >= %{version}
@ -745,12 +725,12 @@ things, like correct mDNS reflection across LAN segments.
%prep %prep
%setup -q -n %{_name}-%{version} %setup -q -n %{_name}-%{version}
cp -a %{S:1} %{S:7} . cp -a %{SOURCE1} %{SOURCE7} .
cp -a %{S:5} sysconfig.avahi cp -a %{SOURCE5} sysconfig.avahi
sed "s:@docdir@:%{_docdir}:g" <%{S:6} >sysconfig.avahi-autoipd sed "s:@docdir@:%{_docdir}:g" <%{SOURCE6} >sysconfig.avahi-autoipd
cp -a %{S:9} avahi-autoipd/README.SUSE cp -a %{SOURCE9} avahi-autoipd/README.SUSE
sed "s:@sbindir@:%{_sbindir}:g" <%{S:10} >avahi-autoipd/avahi-autoipd.if-up sed "s:@sbindir@:%{_sbindir}:g" <%{SOURCE10} >avahi-autoipd/avahi-autoipd.if-up
sed "s:@sbindir@:%{_sbindir}:g" <%{S:11} >avahi-autoipd/avahi-autoipd.if-down sed "s:@sbindir@:%{_sbindir}:g" <%{SOURCE11} >avahi-autoipd/avahi-autoipd.if-down
translation-update-upstream translation-update-upstream
%patch0 %patch0
%patch1 -p1 %patch1 -p1
@ -758,11 +738,11 @@ translation-update-upstream
%patch18 -p1 %patch18 -p1
%patch19 -p1 %patch19 -p1
%if !%build_core %if !%{build_core}
# Replace all .la references from local .la files to installed versions # Replace all .la references from local .la files to installed versions
# with exception of libavahi-glib.la. # with exception of libavahi-glib.la.
# It allows to build only the binding subpackage. # It allows to build only the binding subpackage.
%if %build_mono %if %{build_mono}
sed -i 's:\(\.\.\|\$(top_builddir)\)/[^/]*/\(lib[^ ]*\.la\):%{_libdir}/\2:g' */Makefile.am sed -i 's:\(\.\.\|\$(top_builddir)\)/[^/]*/\(lib[^ ]*\.la\):%{_libdir}/\2:g' */Makefile.am
%else %else
sed -i 's:libavahi-glib\.la:@@SKIP LIBAVAHI GLIB@@:g sed -i 's:libavahi-glib\.la:@@SKIP LIBAVAHI GLIB@@:g
@ -772,7 +752,7 @@ s:@@SKIP LIBAVAHI GLIB@@:libavahi-glib.la:g
%endif %endif
%endif %endif
if ! test -f %{_datadir}/aclocal/glib-gettext.m4 ; then if ! test -f %{_datadir}/aclocal/glib-gettext.m4 ; then
cat %{S:4} >>acinclude.m4 cat %{SOURCE4} >>acinclude.m4
fi fi
# FIXME: We do not have xmltoman, use original doc, just fix paths. # FIXME: We do not have xmltoman, use original doc, just fix paths.
sed -i s:/home/lennart/tmp/avahi:: man/*.[0-9] sed -i s:/home/lennart/tmp/avahi:: man/*.[0-9]
@ -785,14 +765,14 @@ intltoolize -f
--libexecdir=%{_prefix}/lib\ --libexecdir=%{_prefix}/lib\
--disable-static\ --disable-static\
--with-distro=suse\ --with-distro=suse\
%if %build_core %if %{build_core}
--enable-compat-libdns_sd\ --enable-compat-libdns_sd\
--enable-compat-howl\ --enable-compat-howl\
%else %else
--disable-compat-libdns_sd\ --disable-compat-libdns_sd\
--disable-compat-howl\ --disable-compat-howl\
%endif %endif
%if %build_glib2 %if %{build_glib2}
--enable-glib\ --enable-glib\
--enable-gobject\ --enable-gobject\
--enable-gtk\ --enable-gtk\
@ -802,22 +782,22 @@ intltoolize -f
--disable-glib\ --disable-glib\
--disable-gobject\ --disable-gobject\
--disable-pygobject\ --disable-pygobject\
%if ! %build_mono %if ! %{build_mono}
--disable-gtk\ --disable-gtk\
%endif %endif
--disable-gtk3\ --disable-gtk3\
%endif %endif
%if %build_qt3 %if %{build_qt3}
--enable-qt3\ --enable-qt3\
%else %else
--disable-qt3\ --disable-qt3\
%endif %endif
%if %build_qt4 %if %{build_qt4}
--enable-qt4\ --enable-qt4\
%else %else
--disable-qt4\ --disable-qt4\
%endif %endif
%if %build_mono %if %{build_mono}
--enable-mono\ --enable-mono\
--enable-gtk\ --enable-gtk\
%else %else
@ -826,20 +806,20 @@ intltoolize -f
--with-avahi-priv-access-group=avahi\ --with-avahi-priv-access-group=avahi\
--with-autoipd-user=avahi-autoipd\ --with-autoipd-user=avahi-autoipd\
--with-autoipd-group=avahi-autoipd --with-autoipd-group=avahi-autoipd
%if %build_glib2 && !%build_core %if %{build_glib2} && !%{build_core}
for DIR in avahi-glib avahi-gobject avahi-ui avahi-discover-standalone avahi-python man ; do for DIR in avahi-glib avahi-gobject avahi-ui avahi-discover-standalone avahi-python man ; do
cd $DIR cd $DIR
make %{?_smp_mflags} make %{?_smp_mflags}
cd .. cd ..
done done
%endif %endif
%if %build_qt3 && !%build_core %if %{build_qt3} && !%{build_core}
cd avahi-qt cd avahi-qt
%endif %endif
%if %build_qt4 && !%build_core %if %{build_qt4} && !%{build_core}
cd avahi-qt cd avahi-qt
%endif %endif
%if %build_mono && !%build_core %if %{build_mono} && !%{build_core}
cd avahi-sharp cd avahi-sharp
make %{?_smp_mflags} make %{?_smp_mflags}
cd ../avahi-ui-sharp cd ../avahi-ui-sharp
@ -847,33 +827,33 @@ cd ../avahi-ui-sharp
make %{?_smp_mflags} make %{?_smp_mflags}
%install %install
%if %build_glib2 && !%build_core %if %{build_glib2} && !%{build_core}
for DIR in avahi-glib avahi-gobject avahi-ui avahi-discover-standalone avahi-python man ; do for DIR in avahi-glib avahi-gobject avahi-ui avahi-discover-standalone avahi-python man ; do
cd $DIR cd $DIR
%makeinstall %make_install
cd .. cd ..
done done
cd - cd -
%endif %endif
%if %build_qt3 && !%build_core %if %{build_qt3} && !%{build_core}
cd avahi-qt cd avahi-qt
%endif %endif
%if %build_qt4 && !%build_core %if %{build_qt4} && !%{build_core}
cd avahi-qt cd avahi-qt
%endif %endif
%if %build_mono && !%build_core %if %{build_mono} && !%{build_core}
cd avahi-sharp cd avahi-sharp
%makeinstall %make_install
cd ../avahi-ui-sharp cd ../avahi-ui-sharp
%endif %endif
%makeinstall %make_install
# do not install sysv init scripts # do not install sysv init scripts
rm -rf %{buildroot}%{_sysconfdir}/init.d/ rm -rf %{buildroot}%{_sysconfdir}/init.d/
%if !%build_core %if !%{build_core}
cd .. cd ..
make %{?_smp_mflags} install-pkgconfigDATA DESTDIR="%{buildroot}" make %{?_smp_mflags} install-pkgconfigDATA DESTDIR=%{buildroot}
%endif %endif
%if %build_core %if %{build_core}
# do not remove this unless you plan to fix _all_ the references to # do not remove this unless you plan to fix _all_ the references to
# it. all (multiple) previous attempts have failed already # it. all (multiple) previous attempts have failed already
#rm "%{buildroot}/%{_libdir}/libavahi-common.la" #rm "%{buildroot}/%{_libdir}/libavahi-common.la"
@ -882,29 +862,24 @@ ln -s avahi-compat-libdns_sd/dns_sd.h %{buildroot}/%{_includedir}/
ln -s avahi-compat-howl.pc %{buildroot}/%{_libdir}/pkgconfig/howl.pc ln -s avahi-compat-howl.pc %{buildroot}/%{_libdir}/pkgconfig/howl.pc
install -d %{buildroot}/%{_prefix}/lib/avahi install -d %{buildroot}/%{_prefix}/lib/avahi
install avahi-daemon-check-dns.sh %{buildroot}/%{_prefix}/lib/avahi/ install avahi-daemon-check-dns.sh %{buildroot}/%{_prefix}/lib/avahi/
install -d %{buildroot}/etc/sysconfig/network/if-{up,down}.d install -d %{buildroot}%{_sysconfdir}/sysconfig/network/if-{up,down}.d
# Note: We do not install the script to if-down.d. Only very obscure use # Note: We do not install the script to if-down.d. Only very obscure use
# cases may fail. (And Debian does the same.) # cases may fail. (And Debian does the same.)
# (You would have an AUTOIP-only fallback network, then connect network # (You would have an AUTOIP-only fallback network, then connect network
# to network with .local in DNS without disconnecting from the fallback, # to network with .local in DNS without disconnecting from the fallback,
# then disconnect from network with .local in DNS.) # then disconnect from network with .local in DNS.)
install avahi-daemon.if-up %{buildroot}/etc/sysconfig/network/if-up.d/avahi-daemon install avahi-daemon.if-up %{buildroot}%{_sysconfdir}/sysconfig/network/if-up.d/avahi-daemon
install avahi-autoipd/avahi-autoipd.if-up %{buildroot}/etc/sysconfig/network/if-up.d/avahi-autoipd install avahi-autoipd/avahi-autoipd.if-up %{buildroot}%{_sysconfdir}/sysconfig/network/if-up.d/avahi-autoipd
install avahi-autoipd/avahi-autoipd.if-down %{buildroot}/etc/sysconfig/network/if-down.d/avahi-autoipd install avahi-autoipd/avahi-autoipd.if-down %{buildroot}%{_sysconfdir}/sysconfig/network/if-down.d/avahi-autoipd
install -d %{buildroot}/%{_localstatedir}/lib/avahi-autoipd install -d %{buildroot}/%{_localstatedir}/lib/avahi-autoipd
# Work-around qt4 bug:
# https://bugzilla.novell.com/show_bug.cgi?id=238169
%if %suse_version <= 1020
sed -i "s,%{_builddir},/," %{buildroot}/%{_libdir}/libavahi-qt4.la
%endif
mkdir -p %{buildroot}/%{_sbindir} %{buildroot}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services mkdir -p %{buildroot}/%{_sbindir} %{buildroot}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services
ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcavahi-daemon ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcavahi-daemon
ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcavahi-dnsconfd ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcavahi-dnsconfd
install -m 644 %{S:3} %{buildroot}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/avahi install -m 644 %{SOURCE3} %{buildroot}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/avahi
install -d %{buildroot}/%{_datadir}/pixmaps install -d %{buildroot}/%{_datadir}/pixmaps
install -d %{buildroot}%{_fillupdir} install -d %{buildroot}%{_fillupdir}
install -m 644 sysconfig.avahi* %{buildroot}%{_fillupdir}/ install -m 644 sysconfig.avahi* %{buildroot}%{_fillupdir}/
%if ! %build_glib2 %if ! %{build_glib2}
# Note: This file is intentionally installed here. It is needed for avahi-utils-gtk and python-avahi-gtk: # Note: This file is intentionally installed here. It is needed for avahi-utils-gtk and python-avahi-gtk:
install -d %{buildroot}/%{_datadir}/avahi/interfaces install -d %{buildroot}/%{_datadir}/avahi/interfaces
install -m 644 avahi-discover-standalone/avahi-discover.ui %{buildroot}/%{_datadir}/avahi/interfaces install -m 644 avahi-discover-standalone/avahi-discover.ui %{buildroot}/%{_datadir}/avahi/interfaces
@ -915,7 +890,7 @@ install -m 644 avahi-discover-standalone/avahi-discover.ui %{buildroot}/%{_datad
# The rest is enabled/disabled in configure as needed. # The rest is enabled/disabled in configure as needed.
rm %{buildroot}/%{_libdir}/pkgconfig/avahi-client.pc rm %{buildroot}/%{_libdir}/pkgconfig/avahi-client.pc
rm %{buildroot}/%{_libdir}/pkgconfig/avahi-core.pc rm %{buildroot}/%{_libdir}/pkgconfig/avahi-core.pc
%if %build_glib2 %if %{build_glib2}
rm %{buildroot}/%{_bindir}/avahi-bookmarks rm %{buildroot}/%{_bindir}/avahi-bookmarks
rm -r %{buildroot}/%{python_sitelib}/avahi rm -r %{buildroot}/%{python_sitelib}/avahi
rm %{buildroot}/%{_mandir}/man1/avahi-bookmarks.1* rm %{buildroot}/%{_mandir}/man1/avahi-bookmarks.1*
@ -941,7 +916,7 @@ rm %{buildroot}/%{_datadir}/avahi/interfaces/avahi-discover.ui
rmdir %{buildroot}/%{_datadir}/avahi/interfaces rmdir %{buildroot}/%{_datadir}/avahi/interfaces
rmdir %{buildroot}/%{_datadir}/avahi rmdir %{buildroot}/%{_datadir}/avahi
%else %else
%if %build_mono %if %{build_mono}
rm %{buildroot}/%{_libdir}/pkgconfig/avahi-ui.pc rm %{buildroot}/%{_libdir}/pkgconfig/avahi-ui.pc
%if 0%{?suse_version} >= 1330 %if 0%{?suse_version} >= 1330
strip-nondeterminism %{buildroot}/%{_prefix}/lib/monodoc/sources/*.zip strip-nondeterminism %{buildroot}/%{_prefix}/lib/monodoc/sources/*.zip
@ -949,15 +924,14 @@ strip-nondeterminism %{buildroot}/%{_prefix}/lib/monodoc/sources/*.zip
%endif %endif
%endif %endif
%endif %endif
%if %build_glib2 %if %{build_glib2}
%suse_update_desktop_file avahi-discover %suse_update_desktop_file avahi-discover
%suse_update_desktop_file bvnc %suse_update_desktop_file bvnc
%suse_update_desktop_file bssh %suse_update_desktop_file bssh
%endif %endif
%fdupes %{buildroot}/%{_libdir} %fdupes %{buildroot}/%{_libdir}
%if %build_core %if %{build_core}
%pre %pre
getent group avahi >/dev/null || %{_sbindir}/groupadd -r avahi getent group avahi >/dev/null || %{_sbindir}/groupadd -r avahi
getent passwd avahi >/dev/null || %{_sbindir}/useradd -r -s /bin/false -c "User for Avahi" -d /run/avahi-daemon -g avahi avahi getent passwd avahi >/dev/null || %{_sbindir}/useradd -r -s /bin/false -c "User for Avahi" -d /run/avahi-daemon -g avahi avahi
@ -998,43 +972,26 @@ getent passwd avahi-autoipd >/dev/null || \
chown -R avahi-autoipd:avahi-autoipd %{_localstatedir}/lib/avahi-autoipd chown -R avahi-autoipd:avahi-autoipd %{_localstatedir}/lib/avahi-autoipd
%post -n libavahi-client3 -p /sbin/ldconfig %post -n libavahi-client3 -p /sbin/ldconfig
%postun -n libavahi-client3 -p /sbin/ldconfig %postun -n libavahi-client3 -p /sbin/ldconfig
%post -n libavahi-common3 -p /sbin/ldconfig %post -n libavahi-common3 -p /sbin/ldconfig
%postun -n libavahi-common3 -p /sbin/ldconfig %postun -n libavahi-common3 -p /sbin/ldconfig
%post -n libavahi-core7 -p /sbin/ldconfig %post -n libavahi-core7 -p /sbin/ldconfig
%postun -n libavahi-core7 -p /sbin/ldconfig %postun -n libavahi-core7 -p /sbin/ldconfig
%post -n libdns_sd -p /sbin/ldconfig %post -n libdns_sd -p /sbin/ldconfig
%postun -n libdns_sd -p /sbin/ldconfig %postun -n libdns_sd -p /sbin/ldconfig
%post -n libhowl0 -p /sbin/ldconfig %post -n libhowl0 -p /sbin/ldconfig
%postun -n libhowl0 -p /sbin/ldconfig %postun -n libhowl0 -p /sbin/ldconfig
%endif %endif
%if %build_glib2
%if %{build_glib2}
%post -n libavahi-ui0 -p /sbin/ldconfig %post -n libavahi-ui0 -p /sbin/ldconfig
%postun -n libavahi-ui0 -p /sbin/ldconfig %postun -n libavahi-ui0 -p /sbin/ldconfig
%post -n libavahi-ui-gtk3-%{avahi_gtk3_soname} -p /sbin/ldconfig %post -n libavahi-ui-gtk3-%{avahi_gtk3_soname} -p /sbin/ldconfig
%postun -n libavahi-ui-gtk3-%{avahi_gtk3_soname} -p /sbin/ldconfig %postun -n libavahi-ui-gtk3-%{avahi_gtk3_soname} -p /sbin/ldconfig
%post -n libavahi-gobject0 -p /sbin/ldconfig %post -n libavahi-gobject0 -p /sbin/ldconfig
%postun -n libavahi-gobject0 -p /sbin/ldconfig %postun -n libavahi-gobject0 -p /sbin/ldconfig
%post -n libavahi-glib1 -p /sbin/ldconfig %post -n libavahi-glib1 -p /sbin/ldconfig
%postun -n libavahi-glib1 -p /sbin/ldconfig %postun -n libavahi-glib1 -p /sbin/ldconfig
%post -n python-avahi-gtk %post -n python-avahi-gtk
%desktop_database_post %desktop_database_post
@ -1047,22 +1004,19 @@ chown -R avahi-autoipd:avahi-autoipd %{_localstatedir}/lib/avahi-autoipd
%postun -n avahi-utils-gtk %postun -n avahi-utils-gtk
%desktop_database_post %desktop_database_post
%endif %endif
%if %build_qt3
%if %{build_qt3}
%post -n libavahi-qt3-1 -p /sbin/ldconfig %post -n libavahi-qt3-1 -p /sbin/ldconfig
%postun -n libavahi-qt3-1 -p /sbin/ldconfig %postun -n libavahi-qt3-1 -p /sbin/ldconfig
%endif %endif
%if %build_qt4
%if %{build_qt4}
%post -n libavahi-qt4-1 -p /sbin/ldconfig %post -n libavahi-qt4-1 -p /sbin/ldconfig
%postun -n libavahi-qt4-1 -p /sbin/ldconfig %postun -n libavahi-qt4-1 -p /sbin/ldconfig
%endif %endif
%if %build_core
%if %{build_core}
%files %files
%defattr(-,root,root)
%license LICENSE %license LICENSE
%doc docs/* %doc docs/*
%dir %{_libdir}/avahi/ %dir %{_libdir}/avahi/
@ -1071,9 +1025,9 @@ chown -R avahi-autoipd:avahi-autoipd %{_localstatedir}/lib/avahi-autoipd
# avahi creates the directory itself, we do not package it # avahi creates the directory itself, we do not package it
# since it might be on tmpfs # since it might be on tmpfs
%attr(-,avahi,avahi) %ghost /run/avahi-daemon %attr(-,avahi,avahi) %ghost /run/avahi-daemon
%doc %{_mandir}/man5/*.5* %{_mandir}/man5/*.5%{ext_man}
%doc %{_mandir}/man8/*.8* %{_mandir}/man8/*.8%{ext_man}
%exclude %doc %{_mandir}/man8/avahi-autoipd* %exclude %{_mandir}/man8/avahi-autoipd.8.*
%{_sbindir}/avahi-* %{_sbindir}/avahi-*
%exclude %{_sbindir}/avahi-autoipd %exclude %{_sbindir}/avahi-autoipd
%{_sbindir}/rcavahi-daemon %{_sbindir}/rcavahi-daemon
@ -1096,67 +1050,57 @@ chown -R avahi-autoipd:avahi-autoipd %{_localstatedir}/lib/avahi-autoipd
# Common file for avahi-utils-gtk and python-avahi-gtk: # Common file for avahi-utils-gtk and python-avahi-gtk:
%dir %{_datadir}/avahi/ %dir %{_datadir}/avahi/
%{_datadir}/avahi/interfaces %{_datadir}/avahi/interfaces
/etc/sysconfig/network/*/avahi-daemon %{_sysconfdir}/sysconfig/network/*/avahi-daemon
%{_fillupdir}/sysconfig.avahi %{_fillupdir}/sysconfig.avahi
%files lang -f %{name}.lang %files lang -f %{name}.lang
%defattr(-,root,root)
%files -n libavahi-client3 %files -n libavahi-client3
%defattr(-,root,root)
%{_libdir}/libavahi-client*.so.* %{_libdir}/libavahi-client*.so.*
%files -n libavahi-common3 %files -n libavahi-common3
%defattr(-,root,root)
%{_libdir}/libavahi-common*.so.* %{_libdir}/libavahi-common*.so.*
%files -n libavahi-core7 %files -n libavahi-core7
%defattr(-,root,root)
%{_libdir}/libavahi-core*.so.* %{_libdir}/libavahi-core*.so.*
%files -n libdns_sd %files -n libdns_sd
%defattr(-,root,root)
# libdns_sd.so must be in non-devel package to provide mDNSResponder-lib compatibility: # libdns_sd.so must be in non-devel package to provide mDNSResponder-lib compatibility:
%{_libdir}/libdns_sd.so %{_libdir}/libdns_sd.so
%{_libdir}/libdns_sd.so.* %{_libdir}/libdns_sd.so.*
%files -n libhowl0 %files -n libhowl0
%defattr(-,root,root)
%{_libdir}/libhowl.so.* %{_libdir}/libhowl.so.*
%files -n python-avahi %files -n python-avahi
%defattr(-,root,root)
%{_bindir}/avahi-bookmarks %{_bindir}/avahi-bookmarks
%doc %{_mandir}/man1/avahi-bookmarks.1* %{_mandir}/man1/avahi-bookmarks.1%{ext_man}
%dir %{python_sitelib}/avahi %dir %{python_sitelib}/avahi
%{python_sitelib}/avahi/__init__.py* %{python_sitelib}/avahi/__init__.py*
%{python_sitelib}/avahi/ServiceTypeDatabase.py %{python_sitelib}/avahi/ServiceTypeDatabase.py
%files autoipd %files autoipd
%defattr(-,root,root)
%doc avahi-autoipd/README.SUSE %doc avahi-autoipd/README.SUSE
%doc %{_mandir}/man8/avahi-autoipd* %{_mandir}/man8/avahi-autoipd.8%{ext_man}
%attr(-,avahi-autoipd,avahi-autoipd)%{_localstatedir}/lib/avahi-autoipd %attr(-,avahi-autoipd,avahi-autoipd)%{_localstatedir}/lib/avahi-autoipd
%{_sbindir}/avahi-autoipd %{_sbindir}/avahi-autoipd
%{_sysconfdir}/avahi/avahi-autoipd.action %{_sysconfdir}/avahi/avahi-autoipd.action
/etc/sysconfig/network/*/avahi-autoipd %{_sysconfdir}/sysconfig/network/*/avahi-autoipd
%{_fillupdir}/sysconfig.avahi-autoipd %{_fillupdir}/sysconfig.avahi-autoipd
%files utils %files utils
%defattr(-,root,root)
%{_bindir}/avahi-browse* %{_bindir}/avahi-browse*
%{_bindir}/avahi-publish* %{_bindir}/avahi-publish*
%{_bindir}/avahi-resolve* %{_bindir}/avahi-resolve*
%{_bindir}/avahi-set-host-name %{_bindir}/avahi-set-host-name
%dir %{_datadir}/avahi/ %dir %{_datadir}/avahi/
%{_datadir}/avahi/avahi-service.dtd %{_datadir}/avahi/avahi-service.dtd
%doc %{_mandir}/man1/avahi-browse*.1* %{_mandir}/man1/avahi-browse*.1*
%doc %{_mandir}/man1/avahi-publish*.1* %{_mandir}/man1/avahi-publish*.1*
%doc %{_mandir}/man1/avahi-resolve*.1* %{_mandir}/man1/avahi-resolve*.1*
%doc %{_mandir}/man1/avahi-set-host-name.1* %{_mandir}/man1/avahi-set-host-name.1*
%files -n libavahi-devel %files -n libavahi-devel
%defattr(-,root,root)
# FIXME: Maybe split to particular subpackages. # FIXME: Maybe split to particular subpackages.
#%doc doc/api/html #%doc doc/api/html
#%doc doc/*.html doc/*.txt doc/file-boilerplate.c doc/TODO #%doc doc/*.html doc/*.txt doc/file-boilerplate.c doc/TODO
@ -1176,63 +1120,53 @@ chown -R avahi-autoipd:avahi-autoipd %{_localstatedir}/lib/avahi-autoipd
%{_libdir}/pkgconfig/avahi-core.pc %{_libdir}/pkgconfig/avahi-core.pc
%files compat-mDNSResponder-devel %files compat-mDNSResponder-devel
%defattr(-,root,root)
%{_includedir}/avahi-compat-libdns_sd %{_includedir}/avahi-compat-libdns_sd
%{_includedir}/dns_sd.h %{_includedir}/dns_sd.h
%{_libdir}/libdns_sd.*a %{_libdir}/libdns_sd.*a
%{_libdir}/pkgconfig/avahi-compat-libdns_sd.pc %{_libdir}/pkgconfig/avahi-compat-libdns_sd.pc
%files compat-howl-devel %files compat-howl-devel
%defattr(-,root,root)
%{_includedir}/avahi-compat-howl %{_includedir}/avahi-compat-howl
%{_libdir}/libhowl.so %{_libdir}/libhowl.so
%{_libdir}/libhowl.*a %{_libdir}/libhowl.*a
%{_libdir}/pkgconfig/avahi-compat-howl.pc %{_libdir}/pkgconfig/avahi-compat-howl.pc
%{_libdir}/pkgconfig/howl.pc %{_libdir}/pkgconfig/howl.pc
%endif %endif
%if %build_glib2
%if %{build_glib2}
%files -n libavahi-ui0 %files -n libavahi-ui0
%defattr(-,root,root)
%{_libdir}/libavahi-ui.so.* %{_libdir}/libavahi-ui.so.*
%files -n libavahi-ui-gtk3-%{avahi_gtk3_soname} %files -n libavahi-ui-gtk3-%{avahi_gtk3_soname}
%defattr(-,root,root)
%{_libdir}/libavahi-ui-gtk3.so.%{avahi_gtk3_soname}* %{_libdir}/libavahi-ui-gtk3.so.%{avahi_gtk3_soname}*
%files -n libavahi-glib1 %files -n libavahi-glib1
%defattr(-,root,root)
%{_libdir}/libavahi-glib*.so.* %{_libdir}/libavahi-glib*.so.*
%files -n libavahi-gobject0 %files -n libavahi-gobject0
%defattr(-,root,root)
%{_libdir}/libavahi-gobject*.so.* %{_libdir}/libavahi-gobject*.so.*
%files -n typelib-1_0-Avahi-0_6 %files -n typelib-1_0-Avahi-0_6
%defattr(-,root,root)
%{_libdir}/girepository-1.0/Avahi-0.6.typelib %{_libdir}/girepository-1.0/Avahi-0.6.typelib
%{_libdir}/girepository-1.0/AvahiCore-0.6.typelib %{_libdir}/girepository-1.0/AvahiCore-0.6.typelib
%files -n python-avahi-gtk %files -n python-avahi-gtk
%defattr(-,root,root)
%{_bindir}/avahi-discover %{_bindir}/avahi-discover
%{_datadir}/applications/avahi-discover.desktop %{_datadir}/applications/avahi-discover.desktop
%doc %{_mandir}/man1/avahi-discover.1* %{_mandir}/man1/avahi-discover.1*
%{python_sitelib}/avahi_discover %{python_sitelib}/avahi_discover
%files -n avahi-utils-gtk %files -n avahi-utils-gtk
%defattr(-,root,root)
%{_bindir}/bshell %{_bindir}/bshell
%{_bindir}/bssh %{_bindir}/bssh
%{_bindir}/bvnc %{_bindir}/bvnc
%{_bindir}/avahi-discover-standalone %{_bindir}/avahi-discover-standalone
%{_datadir}/applications/bssh.desktop %{_datadir}/applications/bssh.desktop
%{_datadir}/applications/bvnc.desktop %{_datadir}/applications/bvnc.desktop
%doc %{_mandir}/man1/bssh.1.* %{_mandir}/man1/bssh.1%{ext_man}
%doc %{_mandir}/man1/bvnc.1.* %{_mandir}/man1/bvnc.1%{ext_man}
%files -n libavahi-glib-devel %files -n libavahi-glib-devel
%defattr(-,root,root)
%{_includedir}/avahi-glib %{_includedir}/avahi-glib
%{_includedir}/avahi-ui %{_includedir}/avahi-ui
%{_libdir}/libavahi-glib*.*a %{_libdir}/libavahi-glib*.*a
@ -1244,45 +1178,39 @@ chown -R avahi-autoipd:avahi-autoipd %{_localstatedir}/lib/avahi-autoipd
%{_libdir}/pkgconfig/avahi-ui-gtk3.pc %{_libdir}/pkgconfig/avahi-ui-gtk3.pc
%files -n libavahi-gobject-devel %files -n libavahi-gobject-devel
%defattr(-,root,root)
%{_includedir}/avahi-gobject %{_includedir}/avahi-gobject
%{_libdir}/libavahi-gobject*.*a %{_libdir}/libavahi-gobject*.*a
%{_libdir}/libavahi-gobject*.so %{_libdir}/libavahi-gobject*.so
%{_libdir}/pkgconfig/avahi-gobject.pc %{_libdir}/pkgconfig/avahi-gobject.pc
%{_datadir}/gir-1.0/*.gir %{_datadir}/gir-1.0/*.gir
%endif %endif
%if %build_qt3
%if %{build_qt3}
%files -n libavahi-qt3-devel %files -n libavahi-qt3-devel
%defattr(-,root,root)
%{_includedir}/avahi-qt3 %{_includedir}/avahi-qt3
%{_libdir}/libavahi-qt3*.*a %{_libdir}/libavahi-qt3*.*a
%{_libdir}/libavahi-qt3*.so %{_libdir}/libavahi-qt3*.so
%{_libdir}/pkgconfig/avahi-qt3.pc %{_libdir}/pkgconfig/avahi-qt3.pc
%files -n libavahi-qt3-1 %files -n libavahi-qt3-1
%defattr(-,root,root)
%{_libdir}/libavahi-qt3*.so.* %{_libdir}/libavahi-qt3*.so.*
%endif %endif
%if %build_qt4
%if %{build_qt4}
%files -n libavahi-qt4-devel %files -n libavahi-qt4-devel
%defattr(-,root,root)
%{_includedir}/avahi-qt4 %{_includedir}/avahi-qt4
%{_libdir}/libavahi-qt4*.*a %{_libdir}/libavahi-qt4*.*a
%{_libdir}/libavahi-qt4*.so %{_libdir}/libavahi-qt4*.so
%{_libdir}/pkgconfig/avahi-qt4.pc %{_libdir}/pkgconfig/avahi-qt4.pc
%files -n libavahi-qt4-1 %files -n libavahi-qt4-1
%defattr(-,root,root)
%{_libdir}/libavahi-qt4*.so.* %{_libdir}/libavahi-qt4*.so.*
%endif %endif
%if %build_mono
%if %build_core
%if %{build_mono}
%if %{build_core}
%files -n avahi-mono %files -n avahi-mono
%else %else
%files %files
%endif %endif
%defattr(-,root,root) %defattr(-,root,root)

View File

@ -16,12 +16,6 @@
# #
#Compat macro for new _fillupdir macro introduced in Nov 2017
%if ! %{defined _fillupdir}
%define _fillupdir /var/adm/fillup-templates
%endif
Name: avahi-mono
# Do not edit this auto generated file! Edit avahi.spec. # Do not edit this auto generated file! Edit avahi.spec.
%define _name avahi %define _name avahi
# In automatic build systems you want to enable just one of following options. # In automatic build systems you want to enable just one of following options.
@ -33,13 +27,6 @@ Name: avahi-mono
%define build_mono 1 %define build_mono 1
%define build_qt3 0 %define build_qt3 0
%define build_qt4 0 %define build_qt4 0
Version: 0.7
Release: 0
# FIXME: on upgrade, ensure to verify if -DGTK_DISABLE_DEPRECATED=1 can remain in avahi=ui/Makefile.am (GtkStock deprecated with GTK+ 3.9.10).
%if !%build_glib2 && !%build_mono && !%build_qt3 && !%build_qt4
# Create split spec files only when building per partes:
#%(sh %{_sourcedir}/%{_name}_spec-prepare.sh %{_sourcedir} %{name})
%endif
%define avahi_client_soname 3 %define avahi_client_soname 3
%define avahi_common_soname 3 %define avahi_common_soname 3
%define avahi_core_soname 7 %define avahi_core_soname 7
@ -49,13 +36,16 @@ Release: 0
%define avahi_gtk3_soname 0 %define avahi_gtk3_soname 0
%define avahi_qt3_soname 1 %define avahi_qt3_soname 1
%define avahi_qt4_soname 1 %define avahi_qt4_soname 1
%if %build_glib2 %if %{build_glib2}
%define debug_package_requires libavahi-ui%{avahi_ui_soname} = %{version}-%{release} %define debug_package_requires libavahi-ui%{avahi_ui_soname} = %{version}-%{release}
%endif %endif
Url: http://www.avahi.org/ Name: avahi-mono
Version: 0.7
Release: 0
Summary: Mono Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour Summary: Mono Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour
License: LGPL-2.1-or-later License: LGPL-2.1-or-later
Group: Development/Languages/Mono Group: Development/Languages/Mono
URL: http://www.avahi.org/
Source: http://avahi.org/download/%{_name}-%{version}.tar.gz Source: http://avahi.org/download/%{_name}-%{version}.tar.gz
# From http://packages.debian.org/sid/avahi-daemon http://ftp.debian.org/debian/pool/main/a/avahi/avahi_0.6.31-1.debian.tar.gz # From http://packages.debian.org/sid/avahi-daemon http://ftp.debian.org/debian/pool/main/a/avahi/avahi_0.6.31-1.debian.tar.gz
Source1: avahi-daemon-check-dns.sh Source1: avahi-daemon-check-dns.sh
@ -83,7 +73,6 @@ Patch4: avahi-daemon-check-dns-suse.patch
Patch18: avahi-0.6.31-invalid-packet.patch Patch18: avahi-0.6.31-invalid-packet.patch
# PATCH-FIX-UPSTREAM avahi-0.6.32-suppress-resolv-conf-warning.patch bsc#982317 mgorse@suse.com -- only warn on missing resolv.conf if it is being used. # PATCH-FIX-UPSTREAM avahi-0.6.32-suppress-resolv-conf-warning.patch bsc#982317 mgorse@suse.com -- only warn on missing resolv.conf if it is being used.
Patch19: avahi-0.6.32-suppress-resolv-conf-warning.patch Patch19: avahi-0.6.32-suppress-resolv-conf-warning.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: dbus-1-python BuildRequires: dbus-1-python
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: gcc-c++ BuildRequires: gcc-c++
@ -91,27 +80,22 @@ BuildRequires: gdbm-devel
BuildRequires: intltool BuildRequires: intltool
BuildRequires: libdaemon-devel BuildRequires: libdaemon-devel
BuildRequires: libexpat-devel BuildRequires: libexpat-devel
BuildRequires: pkg-config # libtool is needed to build all variants: bootstrap is unconditional in the build section
BuildRequires: translation-update-upstream BuildRequires: libtool
BuildRequires: pkgconfig
# Even if we are not building python bindings, we need python to build service types database: # Even if we are not building python bindings, we need python to build service types database:
BuildRequires: python-devel BuildRequires: python-devel
BuildRequires: python-gdbm BuildRequires: python-gdbm
# libtool is needed to build all variants: bootstrap is unconditional in the build section BuildRequires: translation-update-upstream
BuildRequires: libtool # FIXME: on upgrade, ensure to verify if -DGTK_DISABLE_DEPRECATED=1 can remain in avahi=ui/Makefile.am (GtkStock deprecated with GTK+ 3.9.10).
%if !%{build_glib2} && !%{build_mono} && !%{build_qt3} && !%{build_qt4}
# Create split spec files only when building per partes:
#%(sh %{_sourcedir}/%{_name}_spec-prepare.sh %{_sourcedir} %{name})
%endif
%if 0%{?suse_version} >= 1330 %if 0%{?suse_version} >= 1330
BuildRequires: strip-nondeterminism BuildRequires: strip-nondeterminism
%endif %endif
%if %suse_version <= 1110 %if %{build_core}
%define python_sitelib %{py_sitedir}
%endif
%if %build_core
PreReq: pwdutils
%if %suse_version >= 1140
PreReq: sysvinit(network)
%else
PreReq: sysconfig
%endif
Recommends: %{_name}-lang
BuildRequires: dbus-1-devel BuildRequires: dbus-1-devel
BuildRequires: doxygen BuildRequires: doxygen
BuildRequires: graphviz BuildRequires: graphviz
@ -122,10 +106,10 @@ BuildRequires: pkgconfig(systemd)
#BuildRequires: dbus-1-python #BuildRequires: dbus-1-python
#Requires: dbus-1 #Requires: dbus-1
Requires: nss-mdns Requires: nss-mdns
# bug437293 # FIXME: use proper Requires(pre/post/preun/...)
%ifarch ppc64 PreReq: pwdutils
Obsoletes: mDNSResponder-64bit PreReq: sysvinit(network)
%endif Recommends: %{_name}-lang
# #
# mDNSResponder was used for <= 10.2: # mDNSResponder was used for <= 10.2:
Provides: mDNSResponder = 107.5 Provides: mDNSResponder = 107.5
@ -134,7 +118,7 @@ Obsoletes: mDNSResponder < 107.5
# File conflict for service-types.db openSUSE <= 12.3 SLE <= 11SP2 # File conflict for service-types.db openSUSE <= 12.3 SLE <= 11SP2
#Conflicts: avahi-utils <= 0.6.31-9.2 #Conflicts: avahi-utils <= 0.6.31-9.2
%endif %endif
%if %build_glib2 %if %{build_glib2}
BuildRequires: gobject-introspection-devel BuildRequires: gobject-introspection-devel
BuildRequires: gtk2-devel BuildRequires: gtk2-devel
BuildRequires: gtk3-devel BuildRequires: gtk3-devel
@ -143,15 +127,15 @@ BuildRequires: python-gtk-devel
BuildRequires: update-desktop-files BuildRequires: update-desktop-files
BuildRequires: pkgconfig(pygobject-3.0) BuildRequires: pkgconfig(pygobject-3.0)
%endif %endif
%if %build_qt3 %if %{build_qt3}
BuildRequires: libavahi-devel BuildRequires: libavahi-devel
BuildRequires: qt3-devel BuildRequires: qt3-devel
%endif %endif
%if %build_qt4 %if %{build_qt4}
BuildRequires: libavahi-devel BuildRequires: libavahi-devel
BuildRequires: libqt4-devel BuildRequires: libqt4-devel
%endif %endif
%if %build_mono %if %{build_mono}
BuildRequires: gtk-sharp2 BuildRequires: gtk-sharp2
BuildRequires: libavahi-glib-devel BuildRequires: libavahi-glib-devel
BuildRequires: mono-devel BuildRequires: mono-devel
@ -176,8 +160,7 @@ SHOULDs of the mDNS and DNS-SD RFCs. It passes all tests in the Apple
Bonjour conformance test suite. In addition, it supports some nifty Bonjour conformance test suite. In addition, it supports some nifty
things, like correct mDNS reflection across LAN segments. things, like correct mDNS reflection across LAN segments.
%if %build_core %if %{build_core}
%package -n libavahi-client3 %package -n libavahi-client3
Summary: D-BUS Service for Zeroconf and Bonjour Summary: D-BUS Service for Zeroconf and Bonjour
Group: System/Libraries Group: System/Libraries
@ -234,15 +217,6 @@ Summary: mDNSResponder Compatibility Package for D-BUS Service for Zeroco
# mDNSResponder-lib used unversioned soname. # mDNSResponder-lib used unversioned soname.
# Provide full compatibility with mDNSResponder (FIXME: should be fixed in the package): # Provide full compatibility with mDNSResponder (FIXME: should be fixed in the package):
Group: System/Libraries Group: System/Libraries
%ifarch ia64 x86_64 ppc64 s390x
Provides: libdns_sd.so()(64bit)
%else
Provides: libdns_sd.so
%endif
# bug437293
%ifarch ppc64
Obsoletes: mDNSResponder-lib-64bit
%endif
# #
# mDNSResponder-lib was used for <= 10.2: # mDNSResponder-lib was used for <= 10.2:
Provides: mDNSResponder-lib = 107.5 Provides: mDNSResponder-lib = 107.5
@ -250,6 +224,11 @@ Obsoletes: mDNSResponder-lib < 107.5
# Old name used for <= 10.3: # Old name used for <= 10.3:
Provides: avahi-compat-mDNSResponder = %{version} Provides: avahi-compat-mDNSResponder = %{version}
Obsoletes: avahi-compat-mDNSResponder < %{version} Obsoletes: avahi-compat-mDNSResponder < %{version}
%ifarch ia64 x86_64 ppc64 s390x
Provides: libdns_sd.so()(64bit)
%else
Provides: libdns_sd.so
%endif
%description -n libdns_sd %description -n libdns_sd
Apple mDNSResponder compatibility layer for avahi. Apple mDNSResponder compatibility layer for avahi.
@ -291,16 +270,16 @@ correct mDNS reflection across LAN segments.
%package -n python-avahi %package -n python-avahi
Summary: A set of Avahi utilities written in Python Summary: A set of Avahi utilities written in Python
Group: Development/Languages/Python Group: Development/Languages/Python
PreReq: coreutils
Requires: %{name} = %{version} Requires: %{name} = %{version}
Requires: dbus-1-python Requires: dbus-1-python
Requires: python-gdbm Requires: python-gdbm
Requires: python-twisted Requires: python-twisted
Requires: python-twisted-web Requires: python-twisted-web
# FIXME: use proper Requires(pre/post/preun/...)
PreReq: coreutils
# Old name used for <= 10.3: # Old name used for <= 10.3:
Provides: avahi-python = %{version} Provides: avahi-python = %{version}
Obsoletes: avahi-python < %{version} Obsoletes: avahi-python < %{version}
%py_requires
%description -n python-avahi %description -n python-avahi
Avahi is an implementation of the DNS Service Discovery and Multicast Avahi is an implementation of the DNS Service Discovery and Multicast
@ -319,7 +298,6 @@ elsewhere, like correct mDNS reflection across LAN segments.
Summary: IPv4LL Service for Zeroconf and Bonjour Summary: IPv4LL Service for Zeroconf and Bonjour
# Split provides for upgrade from openSUSE <= 12.3 and SLE <= 11. # Split provides for upgrade from openSUSE <= 12.3 and SLE <= 11.
Group: Productivity/Networking/Other Group: Productivity/Networking/Other
Provides: avahi:%{_sbindir}/avahi-autoipd
# Disable this conflict for now, it breaks staging, and it's pretty much obsolete, but can go back in if needed once a new version of avahi is released. # Disable this conflict for now, it breaks staging, and it's pretty much obsolete, but can go back in if needed once a new version of avahi is released.
# File conflict for avahi-autoipd openSUSE <= 12.3 SLE <= 11 # File conflict for avahi-autoipd openSUSE <= 12.3 SLE <= 11
#Conflicts: avahi <= 0.6.31-9.2 #Conflicts: avahi <= 0.6.31-9.2
@ -327,6 +305,7 @@ Provides: avahi:%{_sbindir}/avahi-autoipd
Requires(post): coreutils Requires(post): coreutils
# shadow contains useradd and groupadd # shadow contains useradd and groupadd
Requires(pre): shadow Requires(pre): shadow
Provides: avahi:%{_sbindir}/avahi-autoipd
%description autoipd %description autoipd
avahi-autoipd is an implementation of Dynamic Configuration of IPv4 avahi-autoipd is an implementation of Dynamic Configuration of IPv4
@ -425,8 +404,8 @@ supports some nifty things that have never been seen elsewhere like
correct mDNS reflection across LAN segments. correct mDNS reflection across LAN segments.
%endif %endif
%if %build_glib2
%if %{build_glib2}
%package -n libavahi-ui0 %package -n libavahi-ui0
Summary: D-BUS Service for Zeroconf and Bonjour Summary: D-BUS Service for Zeroconf and Bonjour
Group: System/Libraries Group: System/Libraries
@ -545,15 +524,15 @@ across LAN segments.
%package -n python-avahi-gtk %package -n python-avahi-gtk
Summary: A set of Avahi utilities written in Python Using python-gtk Summary: A set of Avahi utilities written in Python Using python-gtk
Group: Development/Languages/Python Group: Development/Languages/Python
PreReq: coreutils
Requires: python-avahi = %{version} Requires: python-avahi = %{version}
Requires: python-gtk Requires: python-gtk
# FIXME: use proper Requires(pre/post/preun/...)
PreReq: coreutils
# Old name used for <= 10.3: # Old name used for <= 10.3:
Provides: avahi-python = %{version} Provides: avahi-python = %{version}
Obsoletes: avahi-python < %{version} Obsoletes: avahi-python < %{version}
# Provide split-provides for update from <= 11.0: # Provide split-provides for update from <= 11.0:
Provides: python-avahi:%{_bindir}/avahi-bookmarks Provides: python-avahi:%{_bindir}/avahi-bookmarks
%py_requires
%description -n python-avahi-gtk %description -n python-avahi-gtk
Avahi is an implementation of the DNS Service Discovery and Multicast Avahi is an implementation of the DNS Service Discovery and Multicast
@ -616,8 +595,8 @@ addition, it supports some nifty things, like correct mDNS reflection
across LAN segments. across LAN segments.
%endif %endif
%if %build_qt3
%if %{build_qt3}
%package -n libavahi-qt3-1 %package -n libavahi-qt3-1
Summary: Qt3 Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour Summary: Qt3 Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour
# Old name used for <= 10.3: # Old name used for <= 10.3:
@ -665,8 +644,8 @@ supports some nifty things that have never been seen elsewhere like
correct mDNS reflection across LAN segments. correct mDNS reflection across LAN segments.
%endif %endif
%if %build_qt4
%if %{build_qt4}
%package -n libavahi-qt4-1 %package -n libavahi-qt4-1
Summary: Qt4 Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour Summary: Qt4 Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour
# Old name used for <= 10.3: # Old name used for <= 10.3:
@ -714,12 +693,12 @@ supports some nifty things that have never been seen elsewhere like
correct mDNS reflection across LAN segments. correct mDNS reflection across LAN segments.
%endif %endif
%if %build_core
%if %build_mono
%if %{build_core}
%if %{build_mono}
%package -n avahi-mono %package -n avahi-mono
Summary: Mono Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour Summary: Mono Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour
License: LGPL-2.1-or-later # FIXME: use correct group, see "https://en.opensuse.org/openSUSE:Package_group_guidelines"
Group: Development/Languages/Mono Group: Development/Languages/Mono
Requires: gtk-sharp2 Requires: gtk-sharp2
Requires: libavahi-client3 >= %{version} Requires: libavahi-client3 >= %{version}
@ -745,12 +724,12 @@ things, like correct mDNS reflection across LAN segments.
%prep %prep
%setup -q -n %{_name}-%{version} %setup -q -n %{_name}-%{version}
cp -a %{S:1} %{S:7} . cp -a %{SOURCE1} %{SOURCE7} .
cp -a %{S:5} sysconfig.avahi cp -a %{SOURCE5} sysconfig.avahi
sed "s:@docdir@:%{_docdir}:g" <%{S:6} >sysconfig.avahi-autoipd sed "s:@docdir@:%{_docdir}:g" <%{SOURCE6} >sysconfig.avahi-autoipd
cp -a %{S:9} avahi-autoipd/README.SUSE cp -a %{SOURCE9} avahi-autoipd/README.SUSE
sed "s:@sbindir@:%{_sbindir}:g" <%{S:10} >avahi-autoipd/avahi-autoipd.if-up sed "s:@sbindir@:%{_sbindir}:g" <%{SOURCE10} >avahi-autoipd/avahi-autoipd.if-up
sed "s:@sbindir@:%{_sbindir}:g" <%{S:11} >avahi-autoipd/avahi-autoipd.if-down sed "s:@sbindir@:%{_sbindir}:g" <%{SOURCE11} >avahi-autoipd/avahi-autoipd.if-down
translation-update-upstream translation-update-upstream
%patch0 %patch0
%patch1 -p1 %patch1 -p1
@ -758,11 +737,11 @@ translation-update-upstream
%patch18 -p1 %patch18 -p1
%patch19 -p1 %patch19 -p1
%if !%build_core %if !%{build_core}
# Replace all .la references from local .la files to installed versions # Replace all .la references from local .la files to installed versions
# with exception of libavahi-glib.la. # with exception of libavahi-glib.la.
# It allows to build only the binding subpackage. # It allows to build only the binding subpackage.
%if %build_mono %if %{build_mono}
sed -i 's:\(\.\.\|\$(top_builddir)\)/[^/]*/\(lib[^ ]*\.la\):%{_libdir}/\2:g' */Makefile.am sed -i 's:\(\.\.\|\$(top_builddir)\)/[^/]*/\(lib[^ ]*\.la\):%{_libdir}/\2:g' */Makefile.am
%else %else
sed -i 's:libavahi-glib\.la:@@SKIP LIBAVAHI GLIB@@:g sed -i 's:libavahi-glib\.la:@@SKIP LIBAVAHI GLIB@@:g
@ -772,7 +751,7 @@ s:@@SKIP LIBAVAHI GLIB@@:libavahi-glib.la:g
%endif %endif
%endif %endif
if ! test -f %{_datadir}/aclocal/glib-gettext.m4 ; then if ! test -f %{_datadir}/aclocal/glib-gettext.m4 ; then
cat %{S:4} >>acinclude.m4 cat %{SOURCE4} >>acinclude.m4
fi fi
# FIXME: We do not have xmltoman, use original doc, just fix paths. # FIXME: We do not have xmltoman, use original doc, just fix paths.
sed -i s:/home/lennart/tmp/avahi:: man/*.[0-9] sed -i s:/home/lennart/tmp/avahi:: man/*.[0-9]
@ -785,14 +764,14 @@ intltoolize -f
--libexecdir=%{_prefix}/lib\ --libexecdir=%{_prefix}/lib\
--disable-static\ --disable-static\
--with-distro=suse\ --with-distro=suse\
%if %build_core %if %{build_core}
--enable-compat-libdns_sd\ --enable-compat-libdns_sd\
--enable-compat-howl\ --enable-compat-howl\
%else %else
--disable-compat-libdns_sd\ --disable-compat-libdns_sd\
--disable-compat-howl\ --disable-compat-howl\
%endif %endif
%if %build_glib2 %if %{build_glib2}
--enable-glib\ --enable-glib\
--enable-gobject\ --enable-gobject\
--enable-gtk\ --enable-gtk\
@ -802,22 +781,22 @@ intltoolize -f
--disable-glib\ --disable-glib\
--disable-gobject\ --disable-gobject\
--disable-pygobject\ --disable-pygobject\
%if ! %build_mono %if ! %{build_mono}
--disable-gtk\ --disable-gtk\
%endif %endif
--disable-gtk3\ --disable-gtk3\
%endif %endif
%if %build_qt3 %if %{build_qt3}
--enable-qt3\ --enable-qt3\
%else %else
--disable-qt3\ --disable-qt3\
%endif %endif
%if %build_qt4 %if %{build_qt4}
--enable-qt4\ --enable-qt4\
%else %else
--disable-qt4\ --disable-qt4\
%endif %endif
%if %build_mono %if %{build_mono}
--enable-mono\ --enable-mono\
--enable-gtk\ --enable-gtk\
%else %else
@ -826,20 +805,20 @@ intltoolize -f
--with-avahi-priv-access-group=avahi\ --with-avahi-priv-access-group=avahi\
--with-autoipd-user=avahi-autoipd\ --with-autoipd-user=avahi-autoipd\
--with-autoipd-group=avahi-autoipd --with-autoipd-group=avahi-autoipd
%if %build_glib2 && !%build_core %if %{build_glib2} && !%{build_core}
for DIR in avahi-glib avahi-gobject avahi-ui avahi-discover-standalone avahi-python man ; do for DIR in avahi-glib avahi-gobject avahi-ui avahi-discover-standalone avahi-python man ; do
cd $DIR cd $DIR
make %{?_smp_mflags} make %{?_smp_mflags}
cd .. cd ..
done done
%endif %endif
%if %build_qt3 && !%build_core %if %{build_qt3} && !%{build_core}
cd avahi-qt cd avahi-qt
%endif %endif
%if %build_qt4 && !%build_core %if %{build_qt4} && !%{build_core}
cd avahi-qt cd avahi-qt
%endif %endif
%if %build_mono && !%build_core %if %{build_mono} && !%{build_core}
cd avahi-sharp cd avahi-sharp
make %{?_smp_mflags} make %{?_smp_mflags}
cd ../avahi-ui-sharp cd ../avahi-ui-sharp
@ -847,33 +826,33 @@ cd ../avahi-ui-sharp
make %{?_smp_mflags} make %{?_smp_mflags}
%install %install
%if %build_glib2 && !%build_core %if %{build_glib2} && !%{build_core}
for DIR in avahi-glib avahi-gobject avahi-ui avahi-discover-standalone avahi-python man ; do for DIR in avahi-glib avahi-gobject avahi-ui avahi-discover-standalone avahi-python man ; do
cd $DIR cd $DIR
%makeinstall %make_install
cd .. cd ..
done done
cd - cd -
%endif %endif
%if %build_qt3 && !%build_core %if %{build_qt3} && !%{build_core}
cd avahi-qt cd avahi-qt
%endif %endif
%if %build_qt4 && !%build_core %if %{build_qt4} && !%{build_core}
cd avahi-qt cd avahi-qt
%endif %endif
%if %build_mono && !%build_core %if %{build_mono} && !%{build_core}
cd avahi-sharp cd avahi-sharp
%makeinstall %make_install
cd ../avahi-ui-sharp cd ../avahi-ui-sharp
%endif %endif
%makeinstall %make_install
# do not install sysv init scripts # do not install sysv init scripts
rm -rf %{buildroot}%{_sysconfdir}/init.d/ rm -rf %{buildroot}%{_sysconfdir}/init.d/
%if !%build_core %if !%{build_core}
cd .. cd ..
make %{?_smp_mflags} install-pkgconfigDATA DESTDIR="%{buildroot}" make %{?_smp_mflags} install-pkgconfigDATA DESTDIR=%{buildroot}
%endif %endif
%if %build_core %if %{build_core}
# do not remove this unless you plan to fix _all_ the references to # do not remove this unless you plan to fix _all_ the references to
# it. all (multiple) previous attempts have failed already # it. all (multiple) previous attempts have failed already
#rm "%{buildroot}/%{_libdir}/libavahi-common.la" #rm "%{buildroot}/%{_libdir}/libavahi-common.la"
@ -882,29 +861,24 @@ ln -s avahi-compat-libdns_sd/dns_sd.h %{buildroot}/%{_includedir}/
ln -s avahi-compat-howl.pc %{buildroot}/%{_libdir}/pkgconfig/howl.pc ln -s avahi-compat-howl.pc %{buildroot}/%{_libdir}/pkgconfig/howl.pc
install -d %{buildroot}/%{_prefix}/lib/avahi install -d %{buildroot}/%{_prefix}/lib/avahi
install avahi-daemon-check-dns.sh %{buildroot}/%{_prefix}/lib/avahi/ install avahi-daemon-check-dns.sh %{buildroot}/%{_prefix}/lib/avahi/
install -d %{buildroot}/etc/sysconfig/network/if-{up,down}.d install -d %{buildroot}%{_sysconfdir}/sysconfig/network/if-{up,down}.d
# Note: We do not install the script to if-down.d. Only very obscure use # Note: We do not install the script to if-down.d. Only very obscure use
# cases may fail. (And Debian does the same.) # cases may fail. (And Debian does the same.)
# (You would have an AUTOIP-only fallback network, then connect network # (You would have an AUTOIP-only fallback network, then connect network
# to network with .local in DNS without disconnecting from the fallback, # to network with .local in DNS without disconnecting from the fallback,
# then disconnect from network with .local in DNS.) # then disconnect from network with .local in DNS.)
install avahi-daemon.if-up %{buildroot}/etc/sysconfig/network/if-up.d/avahi-daemon install avahi-daemon.if-up %{buildroot}%{_sysconfdir}/sysconfig/network/if-up.d/avahi-daemon
install avahi-autoipd/avahi-autoipd.if-up %{buildroot}/etc/sysconfig/network/if-up.d/avahi-autoipd install avahi-autoipd/avahi-autoipd.if-up %{buildroot}%{_sysconfdir}/sysconfig/network/if-up.d/avahi-autoipd
install avahi-autoipd/avahi-autoipd.if-down %{buildroot}/etc/sysconfig/network/if-down.d/avahi-autoipd install avahi-autoipd/avahi-autoipd.if-down %{buildroot}%{_sysconfdir}/sysconfig/network/if-down.d/avahi-autoipd
install -d %{buildroot}/%{_localstatedir}/lib/avahi-autoipd install -d %{buildroot}/%{_localstatedir}/lib/avahi-autoipd
# Work-around qt4 bug:
# https://bugzilla.novell.com/show_bug.cgi?id=238169
%if %suse_version <= 1020
sed -i "s,%{_builddir},/," %{buildroot}/%{_libdir}/libavahi-qt4.la
%endif
mkdir -p %{buildroot}/%{_sbindir} %{buildroot}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services mkdir -p %{buildroot}/%{_sbindir} %{buildroot}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services
ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcavahi-daemon ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcavahi-daemon
ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcavahi-dnsconfd ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcavahi-dnsconfd
install -m 644 %{S:3} %{buildroot}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/avahi install -m 644 %{SOURCE3} %{buildroot}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/avahi
install -d %{buildroot}/%{_datadir}/pixmaps install -d %{buildroot}/%{_datadir}/pixmaps
install -d %{buildroot}%{_fillupdir} install -d %{buildroot}%{_fillupdir}
install -m 644 sysconfig.avahi* %{buildroot}%{_fillupdir}/ install -m 644 sysconfig.avahi* %{buildroot}%{_fillupdir}/
%if ! %build_glib2 %if ! %{build_glib2}
# Note: This file is intentionally installed here. It is needed for avahi-utils-gtk and python-avahi-gtk: # Note: This file is intentionally installed here. It is needed for avahi-utils-gtk and python-avahi-gtk:
install -d %{buildroot}/%{_datadir}/avahi/interfaces install -d %{buildroot}/%{_datadir}/avahi/interfaces
install -m 644 avahi-discover-standalone/avahi-discover.ui %{buildroot}/%{_datadir}/avahi/interfaces install -m 644 avahi-discover-standalone/avahi-discover.ui %{buildroot}/%{_datadir}/avahi/interfaces
@ -915,7 +889,7 @@ install -m 644 avahi-discover-standalone/avahi-discover.ui %{buildroot}/%{_datad
# The rest is enabled/disabled in configure as needed. # The rest is enabled/disabled in configure as needed.
rm %{buildroot}/%{_libdir}/pkgconfig/avahi-client.pc rm %{buildroot}/%{_libdir}/pkgconfig/avahi-client.pc
rm %{buildroot}/%{_libdir}/pkgconfig/avahi-core.pc rm %{buildroot}/%{_libdir}/pkgconfig/avahi-core.pc
%if %build_glib2 %if %{build_glib2}
rm %{buildroot}/%{_bindir}/avahi-bookmarks rm %{buildroot}/%{_bindir}/avahi-bookmarks
rm -r %{buildroot}/%{python_sitelib}/avahi rm -r %{buildroot}/%{python_sitelib}/avahi
rm %{buildroot}/%{_mandir}/man1/avahi-bookmarks.1* rm %{buildroot}/%{_mandir}/man1/avahi-bookmarks.1*
@ -941,7 +915,7 @@ rm %{buildroot}/%{_datadir}/avahi/interfaces/avahi-discover.ui
rmdir %{buildroot}/%{_datadir}/avahi/interfaces rmdir %{buildroot}/%{_datadir}/avahi/interfaces
rmdir %{buildroot}/%{_datadir}/avahi rmdir %{buildroot}/%{_datadir}/avahi
%else %else
%if %build_mono %if %{build_mono}
rm %{buildroot}/%{_libdir}/pkgconfig/avahi-ui.pc rm %{buildroot}/%{_libdir}/pkgconfig/avahi-ui.pc
%if 0%{?suse_version} >= 1330 %if 0%{?suse_version} >= 1330
strip-nondeterminism %{buildroot}/%{_prefix}/lib/monodoc/sources/*.zip strip-nondeterminism %{buildroot}/%{_prefix}/lib/monodoc/sources/*.zip
@ -949,15 +923,14 @@ strip-nondeterminism %{buildroot}/%{_prefix}/lib/monodoc/sources/*.zip
%endif %endif
%endif %endif
%endif %endif
%if %build_glib2 %if %{build_glib2}
%suse_update_desktop_file avahi-discover %suse_update_desktop_file avahi-discover
%suse_update_desktop_file bvnc %suse_update_desktop_file bvnc
%suse_update_desktop_file bssh %suse_update_desktop_file bssh
%endif %endif
%fdupes %{buildroot}/%{_libdir} %fdupes %{buildroot}/%{_libdir}
%if %build_core %if %{build_core}
%pre %pre
getent group avahi >/dev/null || %{_sbindir}/groupadd -r avahi getent group avahi >/dev/null || %{_sbindir}/groupadd -r avahi
getent passwd avahi >/dev/null || %{_sbindir}/useradd -r -s /bin/false -c "User for Avahi" -d /run/avahi-daemon -g avahi avahi getent passwd avahi >/dev/null || %{_sbindir}/useradd -r -s /bin/false -c "User for Avahi" -d /run/avahi-daemon -g avahi avahi
@ -998,43 +971,26 @@ getent passwd avahi-autoipd >/dev/null || \
chown -R avahi-autoipd:avahi-autoipd %{_localstatedir}/lib/avahi-autoipd chown -R avahi-autoipd:avahi-autoipd %{_localstatedir}/lib/avahi-autoipd
%post -n libavahi-client3 -p /sbin/ldconfig %post -n libavahi-client3 -p /sbin/ldconfig
%postun -n libavahi-client3 -p /sbin/ldconfig %postun -n libavahi-client3 -p /sbin/ldconfig
%post -n libavahi-common3 -p /sbin/ldconfig %post -n libavahi-common3 -p /sbin/ldconfig
%postun -n libavahi-common3 -p /sbin/ldconfig %postun -n libavahi-common3 -p /sbin/ldconfig
%post -n libavahi-core7 -p /sbin/ldconfig %post -n libavahi-core7 -p /sbin/ldconfig
%postun -n libavahi-core7 -p /sbin/ldconfig %postun -n libavahi-core7 -p /sbin/ldconfig
%post -n libdns_sd -p /sbin/ldconfig %post -n libdns_sd -p /sbin/ldconfig
%postun -n libdns_sd -p /sbin/ldconfig %postun -n libdns_sd -p /sbin/ldconfig
%post -n libhowl0 -p /sbin/ldconfig %post -n libhowl0 -p /sbin/ldconfig
%postun -n libhowl0 -p /sbin/ldconfig %postun -n libhowl0 -p /sbin/ldconfig
%endif %endif
%if %build_glib2
%if %{build_glib2}
%post -n libavahi-ui0 -p /sbin/ldconfig %post -n libavahi-ui0 -p /sbin/ldconfig
%postun -n libavahi-ui0 -p /sbin/ldconfig %postun -n libavahi-ui0 -p /sbin/ldconfig
%post -n libavahi-ui-gtk3-%{avahi_gtk3_soname} -p /sbin/ldconfig %post -n libavahi-ui-gtk3-%{avahi_gtk3_soname} -p /sbin/ldconfig
%postun -n libavahi-ui-gtk3-%{avahi_gtk3_soname} -p /sbin/ldconfig %postun -n libavahi-ui-gtk3-%{avahi_gtk3_soname} -p /sbin/ldconfig
%post -n libavahi-gobject0 -p /sbin/ldconfig %post -n libavahi-gobject0 -p /sbin/ldconfig
%postun -n libavahi-gobject0 -p /sbin/ldconfig %postun -n libavahi-gobject0 -p /sbin/ldconfig
%post -n libavahi-glib1 -p /sbin/ldconfig %post -n libavahi-glib1 -p /sbin/ldconfig
%postun -n libavahi-glib1 -p /sbin/ldconfig %postun -n libavahi-glib1 -p /sbin/ldconfig
%post -n python-avahi-gtk %post -n python-avahi-gtk
%desktop_database_post %desktop_database_post
@ -1047,22 +1003,19 @@ chown -R avahi-autoipd:avahi-autoipd %{_localstatedir}/lib/avahi-autoipd
%postun -n avahi-utils-gtk %postun -n avahi-utils-gtk
%desktop_database_post %desktop_database_post
%endif %endif
%if %build_qt3
%if %{build_qt3}
%post -n libavahi-qt3-1 -p /sbin/ldconfig %post -n libavahi-qt3-1 -p /sbin/ldconfig
%postun -n libavahi-qt3-1 -p /sbin/ldconfig %postun -n libavahi-qt3-1 -p /sbin/ldconfig
%endif %endif
%if %build_qt4
%if %{build_qt4}
%post -n libavahi-qt4-1 -p /sbin/ldconfig %post -n libavahi-qt4-1 -p /sbin/ldconfig
%postun -n libavahi-qt4-1 -p /sbin/ldconfig %postun -n libavahi-qt4-1 -p /sbin/ldconfig
%endif %endif
%if %build_core
%if %{build_core}
%files %files
%defattr(-,root,root)
%license LICENSE %license LICENSE
%doc docs/* %doc docs/*
%dir %{_libdir}/avahi/ %dir %{_libdir}/avahi/
@ -1071,9 +1024,9 @@ chown -R avahi-autoipd:avahi-autoipd %{_localstatedir}/lib/avahi-autoipd
# avahi creates the directory itself, we do not package it # avahi creates the directory itself, we do not package it
# since it might be on tmpfs # since it might be on tmpfs
%attr(-,avahi,avahi) %ghost /run/avahi-daemon %attr(-,avahi,avahi) %ghost /run/avahi-daemon
%doc %{_mandir}/man5/*.5* %{_mandir}/man5/*.5%{ext_man}
%doc %{_mandir}/man8/*.8* %{_mandir}/man8/*.8%{ext_man}
%exclude %doc %{_mandir}/man8/avahi-autoipd* %exclude %{_mandir}/man8/avahi-autoipd.8.*
%{_sbindir}/avahi-* %{_sbindir}/avahi-*
%exclude %{_sbindir}/avahi-autoipd %exclude %{_sbindir}/avahi-autoipd
%{_sbindir}/rcavahi-daemon %{_sbindir}/rcavahi-daemon
@ -1096,67 +1049,57 @@ chown -R avahi-autoipd:avahi-autoipd %{_localstatedir}/lib/avahi-autoipd
# Common file for avahi-utils-gtk and python-avahi-gtk: # Common file for avahi-utils-gtk and python-avahi-gtk:
%dir %{_datadir}/avahi/ %dir %{_datadir}/avahi/
%{_datadir}/avahi/interfaces %{_datadir}/avahi/interfaces
/etc/sysconfig/network/*/avahi-daemon %{_sysconfdir}/sysconfig/network/*/avahi-daemon
%{_fillupdir}/sysconfig.avahi %{_fillupdir}/sysconfig.avahi
%files lang -f %{name}.lang %files lang -f %{name}.lang
%defattr(-,root,root)
%files -n libavahi-client3 %files -n libavahi-client3
%defattr(-,root,root)
%{_libdir}/libavahi-client*.so.* %{_libdir}/libavahi-client*.so.*
%files -n libavahi-common3 %files -n libavahi-common3
%defattr(-,root,root)
%{_libdir}/libavahi-common*.so.* %{_libdir}/libavahi-common*.so.*
%files -n libavahi-core7 %files -n libavahi-core7
%defattr(-,root,root)
%{_libdir}/libavahi-core*.so.* %{_libdir}/libavahi-core*.so.*
%files -n libdns_sd %files -n libdns_sd
%defattr(-,root,root)
# libdns_sd.so must be in non-devel package to provide mDNSResponder-lib compatibility: # libdns_sd.so must be in non-devel package to provide mDNSResponder-lib compatibility:
%{_libdir}/libdns_sd.so %{_libdir}/libdns_sd.so
%{_libdir}/libdns_sd.so.* %{_libdir}/libdns_sd.so.*
%files -n libhowl0 %files -n libhowl0
%defattr(-,root,root)
%{_libdir}/libhowl.so.* %{_libdir}/libhowl.so.*
%files -n python-avahi %files -n python-avahi
%defattr(-,root,root)
%{_bindir}/avahi-bookmarks %{_bindir}/avahi-bookmarks
%doc %{_mandir}/man1/avahi-bookmarks.1* %{_mandir}/man1/avahi-bookmarks.1%{ext_man}
%dir %{python_sitelib}/avahi %dir %{python_sitelib}/avahi
%{python_sitelib}/avahi/__init__.py* %{python_sitelib}/avahi/__init__.py*
%{python_sitelib}/avahi/ServiceTypeDatabase.py %{python_sitelib}/avahi/ServiceTypeDatabase.py
%files autoipd %files autoipd
%defattr(-,root,root)
%doc avahi-autoipd/README.SUSE %doc avahi-autoipd/README.SUSE
%doc %{_mandir}/man8/avahi-autoipd* %{_mandir}/man8/avahi-autoipd.8%{ext_man}
%attr(-,avahi-autoipd,avahi-autoipd)%{_localstatedir}/lib/avahi-autoipd %attr(-,avahi-autoipd,avahi-autoipd)%{_localstatedir}/lib/avahi-autoipd
%{_sbindir}/avahi-autoipd %{_sbindir}/avahi-autoipd
%{_sysconfdir}/avahi/avahi-autoipd.action %{_sysconfdir}/avahi/avahi-autoipd.action
/etc/sysconfig/network/*/avahi-autoipd %{_sysconfdir}/sysconfig/network/*/avahi-autoipd
%{_fillupdir}/sysconfig.avahi-autoipd %{_fillupdir}/sysconfig.avahi-autoipd
%files utils %files utils
%defattr(-,root,root)
%{_bindir}/avahi-browse* %{_bindir}/avahi-browse*
%{_bindir}/avahi-publish* %{_bindir}/avahi-publish*
%{_bindir}/avahi-resolve* %{_bindir}/avahi-resolve*
%{_bindir}/avahi-set-host-name %{_bindir}/avahi-set-host-name
%dir %{_datadir}/avahi/ %dir %{_datadir}/avahi/
%{_datadir}/avahi/avahi-service.dtd %{_datadir}/avahi/avahi-service.dtd
%doc %{_mandir}/man1/avahi-browse*.1* %{_mandir}/man1/avahi-browse*.1*
%doc %{_mandir}/man1/avahi-publish*.1* %{_mandir}/man1/avahi-publish*.1*
%doc %{_mandir}/man1/avahi-resolve*.1* %{_mandir}/man1/avahi-resolve*.1*
%doc %{_mandir}/man1/avahi-set-host-name.1* %{_mandir}/man1/avahi-set-host-name.1*
%files -n libavahi-devel %files -n libavahi-devel
%defattr(-,root,root)
# FIXME: Maybe split to particular subpackages. # FIXME: Maybe split to particular subpackages.
#%doc doc/api/html #%doc doc/api/html
#%doc doc/*.html doc/*.txt doc/file-boilerplate.c doc/TODO #%doc doc/*.html doc/*.txt doc/file-boilerplate.c doc/TODO
@ -1176,63 +1119,53 @@ chown -R avahi-autoipd:avahi-autoipd %{_localstatedir}/lib/avahi-autoipd
%{_libdir}/pkgconfig/avahi-core.pc %{_libdir}/pkgconfig/avahi-core.pc
%files compat-mDNSResponder-devel %files compat-mDNSResponder-devel
%defattr(-,root,root)
%{_includedir}/avahi-compat-libdns_sd %{_includedir}/avahi-compat-libdns_sd
%{_includedir}/dns_sd.h %{_includedir}/dns_sd.h
%{_libdir}/libdns_sd.*a %{_libdir}/libdns_sd.*a
%{_libdir}/pkgconfig/avahi-compat-libdns_sd.pc %{_libdir}/pkgconfig/avahi-compat-libdns_sd.pc
%files compat-howl-devel %files compat-howl-devel
%defattr(-,root,root)
%{_includedir}/avahi-compat-howl %{_includedir}/avahi-compat-howl
%{_libdir}/libhowl.so %{_libdir}/libhowl.so
%{_libdir}/libhowl.*a %{_libdir}/libhowl.*a
%{_libdir}/pkgconfig/avahi-compat-howl.pc %{_libdir}/pkgconfig/avahi-compat-howl.pc
%{_libdir}/pkgconfig/howl.pc %{_libdir}/pkgconfig/howl.pc
%endif %endif
%if %build_glib2
%if %{build_glib2}
%files -n libavahi-ui0 %files -n libavahi-ui0
%defattr(-,root,root)
%{_libdir}/libavahi-ui.so.* %{_libdir}/libavahi-ui.so.*
%files -n libavahi-ui-gtk3-%{avahi_gtk3_soname} %files -n libavahi-ui-gtk3-%{avahi_gtk3_soname}
%defattr(-,root,root)
%{_libdir}/libavahi-ui-gtk3.so.%{avahi_gtk3_soname}* %{_libdir}/libavahi-ui-gtk3.so.%{avahi_gtk3_soname}*
%files -n libavahi-glib1 %files -n libavahi-glib1
%defattr(-,root,root)
%{_libdir}/libavahi-glib*.so.* %{_libdir}/libavahi-glib*.so.*
%files -n libavahi-gobject0 %files -n libavahi-gobject0
%defattr(-,root,root)
%{_libdir}/libavahi-gobject*.so.* %{_libdir}/libavahi-gobject*.so.*
%files -n typelib-1_0-Avahi-0_6 %files -n typelib-1_0-Avahi-0_6
%defattr(-,root,root)
%{_libdir}/girepository-1.0/Avahi-0.6.typelib %{_libdir}/girepository-1.0/Avahi-0.6.typelib
%{_libdir}/girepository-1.0/AvahiCore-0.6.typelib %{_libdir}/girepository-1.0/AvahiCore-0.6.typelib
%files -n python-avahi-gtk %files -n python-avahi-gtk
%defattr(-,root,root)
%{_bindir}/avahi-discover %{_bindir}/avahi-discover
%{_datadir}/applications/avahi-discover.desktop %{_datadir}/applications/avahi-discover.desktop
%doc %{_mandir}/man1/avahi-discover.1* %{_mandir}/man1/avahi-discover.1*
%{python_sitelib}/avahi_discover %{python_sitelib}/avahi_discover
%files -n avahi-utils-gtk %files -n avahi-utils-gtk
%defattr(-,root,root)
%{_bindir}/bshell %{_bindir}/bshell
%{_bindir}/bssh %{_bindir}/bssh
%{_bindir}/bvnc %{_bindir}/bvnc
%{_bindir}/avahi-discover-standalone %{_bindir}/avahi-discover-standalone
%{_datadir}/applications/bssh.desktop %{_datadir}/applications/bssh.desktop
%{_datadir}/applications/bvnc.desktop %{_datadir}/applications/bvnc.desktop
%doc %{_mandir}/man1/bssh.1.* %{_mandir}/man1/bssh.1%{ext_man}
%doc %{_mandir}/man1/bvnc.1.* %{_mandir}/man1/bvnc.1%{ext_man}
%files -n libavahi-glib-devel %files -n libavahi-glib-devel
%defattr(-,root,root)
%{_includedir}/avahi-glib %{_includedir}/avahi-glib
%{_includedir}/avahi-ui %{_includedir}/avahi-ui
%{_libdir}/libavahi-glib*.*a %{_libdir}/libavahi-glib*.*a
@ -1244,45 +1177,39 @@ chown -R avahi-autoipd:avahi-autoipd %{_localstatedir}/lib/avahi-autoipd
%{_libdir}/pkgconfig/avahi-ui-gtk3.pc %{_libdir}/pkgconfig/avahi-ui-gtk3.pc
%files -n libavahi-gobject-devel %files -n libavahi-gobject-devel
%defattr(-,root,root)
%{_includedir}/avahi-gobject %{_includedir}/avahi-gobject
%{_libdir}/libavahi-gobject*.*a %{_libdir}/libavahi-gobject*.*a
%{_libdir}/libavahi-gobject*.so %{_libdir}/libavahi-gobject*.so
%{_libdir}/pkgconfig/avahi-gobject.pc %{_libdir}/pkgconfig/avahi-gobject.pc
%{_datadir}/gir-1.0/*.gir %{_datadir}/gir-1.0/*.gir
%endif %endif
%if %build_qt3
%if %{build_qt3}
%files -n libavahi-qt3-devel %files -n libavahi-qt3-devel
%defattr(-,root,root)
%{_includedir}/avahi-qt3 %{_includedir}/avahi-qt3
%{_libdir}/libavahi-qt3*.*a %{_libdir}/libavahi-qt3*.*a
%{_libdir}/libavahi-qt3*.so %{_libdir}/libavahi-qt3*.so
%{_libdir}/pkgconfig/avahi-qt3.pc %{_libdir}/pkgconfig/avahi-qt3.pc
%files -n libavahi-qt3-1 %files -n libavahi-qt3-1
%defattr(-,root,root)
%{_libdir}/libavahi-qt3*.so.* %{_libdir}/libavahi-qt3*.so.*
%endif %endif
%if %build_qt4
%if %{build_qt4}
%files -n libavahi-qt4-devel %files -n libavahi-qt4-devel
%defattr(-,root,root)
%{_includedir}/avahi-qt4 %{_includedir}/avahi-qt4
%{_libdir}/libavahi-qt4*.*a %{_libdir}/libavahi-qt4*.*a
%{_libdir}/libavahi-qt4*.so %{_libdir}/libavahi-qt4*.so
%{_libdir}/pkgconfig/avahi-qt4.pc %{_libdir}/pkgconfig/avahi-qt4.pc
%files -n libavahi-qt4-1 %files -n libavahi-qt4-1
%defattr(-,root,root)
%{_libdir}/libavahi-qt4*.so.* %{_libdir}/libavahi-qt4*.so.*
%endif %endif
%if %build_mono
%if %build_core
%if %{build_mono}
%if %{build_core}
%files -n avahi-mono %files -n avahi-mono
%else %else
%files %files
%endif %endif
%defattr(-,root,root) %defattr(-,root,root)

View File

@ -16,12 +16,6 @@
# #
#Compat macro for new _fillupdir macro introduced in Nov 2017
%if ! %{defined _fillupdir}
%define _fillupdir /var/adm/fillup-templates
%endif
Name: avahi-qt4
# Do not edit this auto generated file! Edit avahi.spec. # Do not edit this auto generated file! Edit avahi.spec.
%define _name avahi %define _name avahi
# In automatic build systems you want to enable just one of following options. # In automatic build systems you want to enable just one of following options.
@ -33,13 +27,6 @@ Name: avahi-qt4
%define build_mono 0 %define build_mono 0
%define build_qt3 0 %define build_qt3 0
%define build_qt4 1 %define build_qt4 1
Version: 0.7
Release: 0
# FIXME: on upgrade, ensure to verify if -DGTK_DISABLE_DEPRECATED=1 can remain in avahi=ui/Makefile.am (GtkStock deprecated with GTK+ 3.9.10).
%if !%build_glib2 && !%build_mono && !%build_qt3 && !%build_qt4
# Create split spec files only when building per partes:
#%(sh %{_sourcedir}/%{_name}_spec-prepare.sh %{_sourcedir} %{name})
%endif
%define avahi_client_soname 3 %define avahi_client_soname 3
%define avahi_common_soname 3 %define avahi_common_soname 3
%define avahi_core_soname 7 %define avahi_core_soname 7
@ -49,13 +36,16 @@ Release: 0
%define avahi_gtk3_soname 0 %define avahi_gtk3_soname 0
%define avahi_qt3_soname 1 %define avahi_qt3_soname 1
%define avahi_qt4_soname 1 %define avahi_qt4_soname 1
%if %build_glib2 %if %{build_glib2}
%define debug_package_requires libavahi-ui%{avahi_ui_soname} = %{version}-%{release} %define debug_package_requires libavahi-ui%{avahi_ui_soname} = %{version}-%{release}
%endif %endif
Url: http://www.avahi.org/ Name: avahi-qt4
Version: 0.7
Release: 0
Summary: Qt4 Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour Summary: Qt4 Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour
License: LGPL-2.1-or-later License: LGPL-2.1-or-later
Group: System/GUI/KDE Group: System/GUI/KDE
URL: http://www.avahi.org/
Source: http://avahi.org/download/%{_name}-%{version}.tar.gz Source: http://avahi.org/download/%{_name}-%{version}.tar.gz
# From http://packages.debian.org/sid/avahi-daemon http://ftp.debian.org/debian/pool/main/a/avahi/avahi_0.6.31-1.debian.tar.gz # From http://packages.debian.org/sid/avahi-daemon http://ftp.debian.org/debian/pool/main/a/avahi/avahi_0.6.31-1.debian.tar.gz
Source1: avahi-daemon-check-dns.sh Source1: avahi-daemon-check-dns.sh
@ -83,7 +73,6 @@ Patch4: avahi-daemon-check-dns-suse.patch
Patch18: avahi-0.6.31-invalid-packet.patch Patch18: avahi-0.6.31-invalid-packet.patch
# PATCH-FIX-UPSTREAM avahi-0.6.32-suppress-resolv-conf-warning.patch bsc#982317 mgorse@suse.com -- only warn on missing resolv.conf if it is being used. # PATCH-FIX-UPSTREAM avahi-0.6.32-suppress-resolv-conf-warning.patch bsc#982317 mgorse@suse.com -- only warn on missing resolv.conf if it is being used.
Patch19: avahi-0.6.32-suppress-resolv-conf-warning.patch Patch19: avahi-0.6.32-suppress-resolv-conf-warning.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: dbus-1-python BuildRequires: dbus-1-python
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: gcc-c++ BuildRequires: gcc-c++
@ -91,27 +80,22 @@ BuildRequires: gdbm-devel
BuildRequires: intltool BuildRequires: intltool
BuildRequires: libdaemon-devel BuildRequires: libdaemon-devel
BuildRequires: libexpat-devel BuildRequires: libexpat-devel
BuildRequires: pkg-config # libtool is needed to build all variants: bootstrap is unconditional in the build section
BuildRequires: translation-update-upstream BuildRequires: libtool
BuildRequires: pkgconfig
# Even if we are not building python bindings, we need python to build service types database: # Even if we are not building python bindings, we need python to build service types database:
BuildRequires: python-devel BuildRequires: python-devel
BuildRequires: python-gdbm BuildRequires: python-gdbm
# libtool is needed to build all variants: bootstrap is unconditional in the build section BuildRequires: translation-update-upstream
BuildRequires: libtool # FIXME: on upgrade, ensure to verify if -DGTK_DISABLE_DEPRECATED=1 can remain in avahi=ui/Makefile.am (GtkStock deprecated with GTK+ 3.9.10).
%if !%{build_glib2} && !%{build_mono} && !%{build_qt3} && !%{build_qt4}
# Create split spec files only when building per partes:
#%(sh %{_sourcedir}/%{_name}_spec-prepare.sh %{_sourcedir} %{name})
%endif
%if 0%{?suse_version} >= 1330 %if 0%{?suse_version} >= 1330
BuildRequires: strip-nondeterminism BuildRequires: strip-nondeterminism
%endif %endif
%if %suse_version <= 1110 %if %{build_core}
%define python_sitelib %{py_sitedir}
%endif
%if %build_core
PreReq: pwdutils
%if %suse_version >= 1140
PreReq: sysvinit(network)
%else
PreReq: sysconfig
%endif
Recommends: %{_name}-lang
BuildRequires: dbus-1-devel BuildRequires: dbus-1-devel
BuildRequires: doxygen BuildRequires: doxygen
BuildRequires: graphviz BuildRequires: graphviz
@ -122,10 +106,10 @@ BuildRequires: pkgconfig(systemd)
#BuildRequires: dbus-1-python #BuildRequires: dbus-1-python
#Requires: dbus-1 #Requires: dbus-1
Requires: nss-mdns Requires: nss-mdns
# bug437293 # FIXME: use proper Requires(pre/post/preun/...)
%ifarch ppc64 PreReq: pwdutils
Obsoletes: mDNSResponder-64bit PreReq: sysvinit(network)
%endif Recommends: %{_name}-lang
# #
# mDNSResponder was used for <= 10.2: # mDNSResponder was used for <= 10.2:
Provides: mDNSResponder = 107.5 Provides: mDNSResponder = 107.5
@ -134,7 +118,7 @@ Obsoletes: mDNSResponder < 107.5
# File conflict for service-types.db openSUSE <= 12.3 SLE <= 11SP2 # File conflict for service-types.db openSUSE <= 12.3 SLE <= 11SP2
#Conflicts: avahi-utils <= 0.6.31-9.2 #Conflicts: avahi-utils <= 0.6.31-9.2
%endif %endif
%if %build_glib2 %if %{build_glib2}
BuildRequires: gobject-introspection-devel BuildRequires: gobject-introspection-devel
BuildRequires: gtk2-devel BuildRequires: gtk2-devel
BuildRequires: gtk3-devel BuildRequires: gtk3-devel
@ -143,15 +127,15 @@ BuildRequires: python-gtk-devel
BuildRequires: update-desktop-files BuildRequires: update-desktop-files
BuildRequires: pkgconfig(pygobject-3.0) BuildRequires: pkgconfig(pygobject-3.0)
%endif %endif
%if %build_qt3 %if %{build_qt3}
BuildRequires: libavahi-devel BuildRequires: libavahi-devel
BuildRequires: qt3-devel BuildRequires: qt3-devel
%endif %endif
%if %build_qt4 %if %{build_qt4}
BuildRequires: libavahi-devel BuildRequires: libavahi-devel
BuildRequires: libqt4-devel BuildRequires: libqt4-devel
%endif %endif
%if %build_mono %if %{build_mono}
BuildRequires: gtk-sharp2 BuildRequires: gtk-sharp2
BuildRequires: libavahi-glib-devel BuildRequires: libavahi-glib-devel
BuildRequires: mono-devel BuildRequires: mono-devel
@ -179,8 +163,7 @@ tests in the Apple Bonjour conformance test suite. In addition it
supports some nifty things that have never been seen elsewhere like supports some nifty things that have never been seen elsewhere like
correct mDNS reflection accross LAN segments. correct mDNS reflection accross LAN segments.
%if %build_core %if %{build_core}
%package -n libavahi-client3 %package -n libavahi-client3
Summary: D-BUS Service for Zeroconf and Bonjour Summary: D-BUS Service for Zeroconf and Bonjour
Group: System/Libraries Group: System/Libraries
@ -237,15 +220,6 @@ Summary: mDNSResponder Compatibility Package for D-BUS Service for Zeroco
# mDNSResponder-lib used unversioned soname. # mDNSResponder-lib used unversioned soname.
# Provide full compatibility with mDNSResponder (FIXME: should be fixed in the package): # Provide full compatibility with mDNSResponder (FIXME: should be fixed in the package):
Group: System/Libraries Group: System/Libraries
%ifarch ia64 x86_64 ppc64 s390x
Provides: libdns_sd.so()(64bit)
%else
Provides: libdns_sd.so
%endif
# bug437293
%ifarch ppc64
Obsoletes: mDNSResponder-lib-64bit
%endif
# #
# mDNSResponder-lib was used for <= 10.2: # mDNSResponder-lib was used for <= 10.2:
Provides: mDNSResponder-lib = 107.5 Provides: mDNSResponder-lib = 107.5
@ -253,6 +227,11 @@ Obsoletes: mDNSResponder-lib < 107.5
# Old name used for <= 10.3: # Old name used for <= 10.3:
Provides: avahi-compat-mDNSResponder = %{version} Provides: avahi-compat-mDNSResponder = %{version}
Obsoletes: avahi-compat-mDNSResponder < %{version} Obsoletes: avahi-compat-mDNSResponder < %{version}
%ifarch ia64 x86_64 ppc64 s390x
Provides: libdns_sd.so()(64bit)
%else
Provides: libdns_sd.so
%endif
%description -n libdns_sd %description -n libdns_sd
Apple mDNSResponder compatibility layer for avahi. Apple mDNSResponder compatibility layer for avahi.
@ -294,16 +273,16 @@ correct mDNS reflection across LAN segments.
%package -n python-avahi %package -n python-avahi
Summary: A set of Avahi utilities written in Python Summary: A set of Avahi utilities written in Python
Group: Development/Languages/Python Group: Development/Languages/Python
PreReq: coreutils
Requires: %{name} = %{version} Requires: %{name} = %{version}
Requires: dbus-1-python Requires: dbus-1-python
Requires: python-gdbm Requires: python-gdbm
Requires: python-twisted Requires: python-twisted
Requires: python-twisted-web Requires: python-twisted-web
# FIXME: use proper Requires(pre/post/preun/...)
PreReq: coreutils
# Old name used for <= 10.3: # Old name used for <= 10.3:
Provides: avahi-python = %{version} Provides: avahi-python = %{version}
Obsoletes: avahi-python < %{version} Obsoletes: avahi-python < %{version}
%py_requires
%description -n python-avahi %description -n python-avahi
Avahi is an implementation of the DNS Service Discovery and Multicast Avahi is an implementation of the DNS Service Discovery and Multicast
@ -322,7 +301,6 @@ elsewhere, like correct mDNS reflection across LAN segments.
Summary: IPv4LL Service for Zeroconf and Bonjour Summary: IPv4LL Service for Zeroconf and Bonjour
# Split provides for upgrade from openSUSE <= 12.3 and SLE <= 11. # Split provides for upgrade from openSUSE <= 12.3 and SLE <= 11.
Group: Productivity/Networking/Other Group: Productivity/Networking/Other
Provides: avahi:%{_sbindir}/avahi-autoipd
# Disable this conflict for now, it breaks staging, and it's pretty much obsolete, but can go back in if needed once a new version of avahi is released. # Disable this conflict for now, it breaks staging, and it's pretty much obsolete, but can go back in if needed once a new version of avahi is released.
# File conflict for avahi-autoipd openSUSE <= 12.3 SLE <= 11 # File conflict for avahi-autoipd openSUSE <= 12.3 SLE <= 11
#Conflicts: avahi <= 0.6.31-9.2 #Conflicts: avahi <= 0.6.31-9.2
@ -330,6 +308,7 @@ Provides: avahi:%{_sbindir}/avahi-autoipd
Requires(post): coreutils Requires(post): coreutils
# shadow contains useradd and groupadd # shadow contains useradd and groupadd
Requires(pre): shadow Requires(pre): shadow
Provides: avahi:%{_sbindir}/avahi-autoipd
%description autoipd %description autoipd
avahi-autoipd is an implementation of Dynamic Configuration of IPv4 avahi-autoipd is an implementation of Dynamic Configuration of IPv4
@ -428,8 +407,8 @@ supports some nifty things that have never been seen elsewhere like
correct mDNS reflection across LAN segments. correct mDNS reflection across LAN segments.
%endif %endif
%if %build_glib2
%if %{build_glib2}
%package -n libavahi-ui0 %package -n libavahi-ui0
Summary: D-BUS Service for Zeroconf and Bonjour Summary: D-BUS Service for Zeroconf and Bonjour
Group: System/Libraries Group: System/Libraries
@ -548,15 +527,15 @@ across LAN segments.
%package -n python-avahi-gtk %package -n python-avahi-gtk
Summary: A set of Avahi utilities written in Python Using python-gtk Summary: A set of Avahi utilities written in Python Using python-gtk
Group: Development/Languages/Python Group: Development/Languages/Python
PreReq: coreutils
Requires: python-avahi = %{version} Requires: python-avahi = %{version}
Requires: python-gtk Requires: python-gtk
# FIXME: use proper Requires(pre/post/preun/...)
PreReq: coreutils
# Old name used for <= 10.3: # Old name used for <= 10.3:
Provides: avahi-python = %{version} Provides: avahi-python = %{version}
Obsoletes: avahi-python < %{version} Obsoletes: avahi-python < %{version}
# Provide split-provides for update from <= 11.0: # Provide split-provides for update from <= 11.0:
Provides: python-avahi:%{_bindir}/avahi-bookmarks Provides: python-avahi:%{_bindir}/avahi-bookmarks
%py_requires
%description -n python-avahi-gtk %description -n python-avahi-gtk
Avahi is an implementation of the DNS Service Discovery and Multicast Avahi is an implementation of the DNS Service Discovery and Multicast
@ -619,8 +598,8 @@ addition, it supports some nifty things, like correct mDNS reflection
across LAN segments. across LAN segments.
%endif %endif
%if %build_qt3
%if %{build_qt3}
%package -n libavahi-qt3-1 %package -n libavahi-qt3-1
Summary: Qt3 Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour Summary: Qt3 Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour
# Old name used for <= 10.3: # Old name used for <= 10.3:
@ -668,8 +647,8 @@ supports some nifty things that have never been seen elsewhere like
correct mDNS reflection across LAN segments. correct mDNS reflection across LAN segments.
%endif %endif
%if %build_qt4
%if %{build_qt4}
%package -n libavahi-qt4-1 %package -n libavahi-qt4-1
Summary: Qt4 Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour Summary: Qt4 Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour
# Old name used for <= 10.3: # Old name used for <= 10.3:
@ -717,11 +696,12 @@ supports some nifty things that have never been seen elsewhere like
correct mDNS reflection across LAN segments. correct mDNS reflection across LAN segments.
%endif %endif
%if %build_core
%if %build_mono
%if %{build_core}
%if %{build_mono}
%package -n avahi-mono %package -n avahi-mono
Summary: Mono Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour Summary: Mono Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour
# FIXME: use correct group, see "https://en.opensuse.org/openSUSE:Package_group_guidelines"
Group: Development/Languages/Mono Group: Development/Languages/Mono
Requires: gtk-sharp2 Requires: gtk-sharp2
Requires: libavahi-client3 >= %{version} Requires: libavahi-client3 >= %{version}
@ -747,12 +727,12 @@ things, like correct mDNS reflection across LAN segments.
%prep %prep
%setup -q -n %{_name}-%{version} %setup -q -n %{_name}-%{version}
cp -a %{S:1} %{S:7} . cp -a %{SOURCE1} %{SOURCE7} .
cp -a %{S:5} sysconfig.avahi cp -a %{SOURCE5} sysconfig.avahi
sed "s:@docdir@:%{_docdir}:g" <%{S:6} >sysconfig.avahi-autoipd sed "s:@docdir@:%{_docdir}:g" <%{SOURCE6} >sysconfig.avahi-autoipd
cp -a %{S:9} avahi-autoipd/README.SUSE cp -a %{SOURCE9} avahi-autoipd/README.SUSE
sed "s:@sbindir@:%{_sbindir}:g" <%{S:10} >avahi-autoipd/avahi-autoipd.if-up sed "s:@sbindir@:%{_sbindir}:g" <%{SOURCE10} >avahi-autoipd/avahi-autoipd.if-up
sed "s:@sbindir@:%{_sbindir}:g" <%{S:11} >avahi-autoipd/avahi-autoipd.if-down sed "s:@sbindir@:%{_sbindir}:g" <%{SOURCE11} >avahi-autoipd/avahi-autoipd.if-down
translation-update-upstream translation-update-upstream
%patch0 %patch0
%patch1 -p1 %patch1 -p1
@ -760,11 +740,11 @@ translation-update-upstream
%patch18 -p1 %patch18 -p1
%patch19 -p1 %patch19 -p1
%if !%build_core %if !%{build_core}
# Replace all .la references from local .la files to installed versions # Replace all .la references from local .la files to installed versions
# with exception of libavahi-glib.la. # with exception of libavahi-glib.la.
# It allows to build only the binding subpackage. # It allows to build only the binding subpackage.
%if %build_mono %if %{build_mono}
sed -i 's:\(\.\.\|\$(top_builddir)\)/[^/]*/\(lib[^ ]*\.la\):%{_libdir}/\2:g' */Makefile.am sed -i 's:\(\.\.\|\$(top_builddir)\)/[^/]*/\(lib[^ ]*\.la\):%{_libdir}/\2:g' */Makefile.am
%else %else
sed -i 's:libavahi-glib\.la:@@SKIP LIBAVAHI GLIB@@:g sed -i 's:libavahi-glib\.la:@@SKIP LIBAVAHI GLIB@@:g
@ -774,7 +754,7 @@ s:@@SKIP LIBAVAHI GLIB@@:libavahi-glib.la:g
%endif %endif
%endif %endif
if ! test -f %{_datadir}/aclocal/glib-gettext.m4 ; then if ! test -f %{_datadir}/aclocal/glib-gettext.m4 ; then
cat %{S:4} >>acinclude.m4 cat %{SOURCE4} >>acinclude.m4
fi fi
# FIXME: We do not have xmltoman, use original doc, just fix paths. # FIXME: We do not have xmltoman, use original doc, just fix paths.
sed -i s:/home/lennart/tmp/avahi:: man/*.[0-9] sed -i s:/home/lennart/tmp/avahi:: man/*.[0-9]
@ -787,14 +767,14 @@ intltoolize -f
--libexecdir=%{_prefix}/lib\ --libexecdir=%{_prefix}/lib\
--disable-static\ --disable-static\
--with-distro=suse\ --with-distro=suse\
%if %build_core %if %{build_core}
--enable-compat-libdns_sd\ --enable-compat-libdns_sd\
--enable-compat-howl\ --enable-compat-howl\
%else %else
--disable-compat-libdns_sd\ --disable-compat-libdns_sd\
--disable-compat-howl\ --disable-compat-howl\
%endif %endif
%if %build_glib2 %if %{build_glib2}
--enable-glib\ --enable-glib\
--enable-gobject\ --enable-gobject\
--enable-gtk\ --enable-gtk\
@ -804,22 +784,22 @@ intltoolize -f
--disable-glib\ --disable-glib\
--disable-gobject\ --disable-gobject\
--disable-pygobject\ --disable-pygobject\
%if ! %build_mono %if ! %{build_mono}
--disable-gtk\ --disable-gtk\
%endif %endif
--disable-gtk3\ --disable-gtk3\
%endif %endif
%if %build_qt3 %if %{build_qt3}
--enable-qt3\ --enable-qt3\
%else %else
--disable-qt3\ --disable-qt3\
%endif %endif
%if %build_qt4 %if %{build_qt4}
--enable-qt4\ --enable-qt4\
%else %else
--disable-qt4\ --disable-qt4\
%endif %endif
%if %build_mono %if %{build_mono}
--enable-mono\ --enable-mono\
--enable-gtk\ --enable-gtk\
%else %else
@ -828,20 +808,20 @@ intltoolize -f
--with-avahi-priv-access-group=avahi\ --with-avahi-priv-access-group=avahi\
--with-autoipd-user=avahi-autoipd\ --with-autoipd-user=avahi-autoipd\
--with-autoipd-group=avahi-autoipd --with-autoipd-group=avahi-autoipd
%if %build_glib2 && !%build_core %if %{build_glib2} && !%{build_core}
for DIR in avahi-glib avahi-gobject avahi-ui avahi-discover-standalone avahi-python man ; do for DIR in avahi-glib avahi-gobject avahi-ui avahi-discover-standalone avahi-python man ; do
cd $DIR cd $DIR
make %{?_smp_mflags} make %{?_smp_mflags}
cd .. cd ..
done done
%endif %endif
%if %build_qt3 && !%build_core %if %{build_qt3} && !%{build_core}
cd avahi-qt cd avahi-qt
%endif %endif
%if %build_qt4 && !%build_core %if %{build_qt4} && !%{build_core}
cd avahi-qt cd avahi-qt
%endif %endif
%if %build_mono && !%build_core %if %{build_mono} && !%{build_core}
cd avahi-sharp cd avahi-sharp
make %{?_smp_mflags} make %{?_smp_mflags}
cd ../avahi-ui-sharp cd ../avahi-ui-sharp
@ -849,33 +829,33 @@ cd ../avahi-ui-sharp
make %{?_smp_mflags} make %{?_smp_mflags}
%install %install
%if %build_glib2 && !%build_core %if %{build_glib2} && !%{build_core}
for DIR in avahi-glib avahi-gobject avahi-ui avahi-discover-standalone avahi-python man ; do for DIR in avahi-glib avahi-gobject avahi-ui avahi-discover-standalone avahi-python man ; do
cd $DIR cd $DIR
%makeinstall %make_install
cd .. cd ..
done done
cd - cd -
%endif %endif
%if %build_qt3 && !%build_core %if %{build_qt3} && !%{build_core}
cd avahi-qt cd avahi-qt
%endif %endif
%if %build_qt4 && !%build_core %if %{build_qt4} && !%{build_core}
cd avahi-qt cd avahi-qt
%endif %endif
%if %build_mono && !%build_core %if %{build_mono} && !%{build_core}
cd avahi-sharp cd avahi-sharp
%makeinstall %make_install
cd ../avahi-ui-sharp cd ../avahi-ui-sharp
%endif %endif
%makeinstall %make_install
# do not install sysv init scripts # do not install sysv init scripts
rm -rf %{buildroot}%{_sysconfdir}/init.d/ rm -rf %{buildroot}%{_sysconfdir}/init.d/
%if !%build_core %if !%{build_core}
cd .. cd ..
make %{?_smp_mflags} install-pkgconfigDATA DESTDIR="%{buildroot}" make %{?_smp_mflags} install-pkgconfigDATA DESTDIR=%{buildroot}
%endif %endif
%if %build_core %if %{build_core}
# do not remove this unless you plan to fix _all_ the references to # do not remove this unless you plan to fix _all_ the references to
# it. all (multiple) previous attempts have failed already # it. all (multiple) previous attempts have failed already
#rm "%{buildroot}/%{_libdir}/libavahi-common.la" #rm "%{buildroot}/%{_libdir}/libavahi-common.la"
@ -884,29 +864,24 @@ ln -s avahi-compat-libdns_sd/dns_sd.h %{buildroot}/%{_includedir}/
ln -s avahi-compat-howl.pc %{buildroot}/%{_libdir}/pkgconfig/howl.pc ln -s avahi-compat-howl.pc %{buildroot}/%{_libdir}/pkgconfig/howl.pc
install -d %{buildroot}/%{_prefix}/lib/avahi install -d %{buildroot}/%{_prefix}/lib/avahi
install avahi-daemon-check-dns.sh %{buildroot}/%{_prefix}/lib/avahi/ install avahi-daemon-check-dns.sh %{buildroot}/%{_prefix}/lib/avahi/
install -d %{buildroot}/etc/sysconfig/network/if-{up,down}.d install -d %{buildroot}%{_sysconfdir}/sysconfig/network/if-{up,down}.d
# Note: We do not install the script to if-down.d. Only very obscure use # Note: We do not install the script to if-down.d. Only very obscure use
# cases may fail. (And Debian does the same.) # cases may fail. (And Debian does the same.)
# (You would have an AUTOIP-only fallback network, then connect network # (You would have an AUTOIP-only fallback network, then connect network
# to network with .local in DNS without disconnecting from the fallback, # to network with .local in DNS without disconnecting from the fallback,
# then disconnect from network with .local in DNS.) # then disconnect from network with .local in DNS.)
install avahi-daemon.if-up %{buildroot}/etc/sysconfig/network/if-up.d/avahi-daemon install avahi-daemon.if-up %{buildroot}%{_sysconfdir}/sysconfig/network/if-up.d/avahi-daemon
install avahi-autoipd/avahi-autoipd.if-up %{buildroot}/etc/sysconfig/network/if-up.d/avahi-autoipd install avahi-autoipd/avahi-autoipd.if-up %{buildroot}%{_sysconfdir}/sysconfig/network/if-up.d/avahi-autoipd
install avahi-autoipd/avahi-autoipd.if-down %{buildroot}/etc/sysconfig/network/if-down.d/avahi-autoipd install avahi-autoipd/avahi-autoipd.if-down %{buildroot}%{_sysconfdir}/sysconfig/network/if-down.d/avahi-autoipd
install -d %{buildroot}/%{_localstatedir}/lib/avahi-autoipd install -d %{buildroot}/%{_localstatedir}/lib/avahi-autoipd
# Work-around qt4 bug:
# https://bugzilla.novell.com/show_bug.cgi?id=238169
%if %suse_version <= 1020
sed -i "s,%{_builddir},/," %{buildroot}/%{_libdir}/libavahi-qt4.la
%endif
mkdir -p %{buildroot}/%{_sbindir} %{buildroot}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services mkdir -p %{buildroot}/%{_sbindir} %{buildroot}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services
ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcavahi-daemon ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcavahi-daemon
ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcavahi-dnsconfd ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcavahi-dnsconfd
install -m 644 %{S:3} %{buildroot}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/avahi install -m 644 %{SOURCE3} %{buildroot}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/avahi
install -d %{buildroot}/%{_datadir}/pixmaps install -d %{buildroot}/%{_datadir}/pixmaps
install -d %{buildroot}%{_fillupdir} install -d %{buildroot}%{_fillupdir}
install -m 644 sysconfig.avahi* %{buildroot}%{_fillupdir}/ install -m 644 sysconfig.avahi* %{buildroot}%{_fillupdir}/
%if ! %build_glib2 %if ! %{build_glib2}
# Note: This file is intentionally installed here. It is needed for avahi-utils-gtk and python-avahi-gtk: # Note: This file is intentionally installed here. It is needed for avahi-utils-gtk and python-avahi-gtk:
install -d %{buildroot}/%{_datadir}/avahi/interfaces install -d %{buildroot}/%{_datadir}/avahi/interfaces
install -m 644 avahi-discover-standalone/avahi-discover.ui %{buildroot}/%{_datadir}/avahi/interfaces install -m 644 avahi-discover-standalone/avahi-discover.ui %{buildroot}/%{_datadir}/avahi/interfaces
@ -917,7 +892,7 @@ install -m 644 avahi-discover-standalone/avahi-discover.ui %{buildroot}/%{_datad
# The rest is enabled/disabled in configure as needed. # The rest is enabled/disabled in configure as needed.
rm %{buildroot}/%{_libdir}/pkgconfig/avahi-client.pc rm %{buildroot}/%{_libdir}/pkgconfig/avahi-client.pc
rm %{buildroot}/%{_libdir}/pkgconfig/avahi-core.pc rm %{buildroot}/%{_libdir}/pkgconfig/avahi-core.pc
%if %build_glib2 %if %{build_glib2}
rm %{buildroot}/%{_bindir}/avahi-bookmarks rm %{buildroot}/%{_bindir}/avahi-bookmarks
rm -r %{buildroot}/%{python_sitelib}/avahi rm -r %{buildroot}/%{python_sitelib}/avahi
rm %{buildroot}/%{_mandir}/man1/avahi-bookmarks.1* rm %{buildroot}/%{_mandir}/man1/avahi-bookmarks.1*
@ -943,7 +918,7 @@ rm %{buildroot}/%{_datadir}/avahi/interfaces/avahi-discover.ui
rmdir %{buildroot}/%{_datadir}/avahi/interfaces rmdir %{buildroot}/%{_datadir}/avahi/interfaces
rmdir %{buildroot}/%{_datadir}/avahi rmdir %{buildroot}/%{_datadir}/avahi
%else %else
%if %build_mono %if %{build_mono}
rm %{buildroot}/%{_libdir}/pkgconfig/avahi-ui.pc rm %{buildroot}/%{_libdir}/pkgconfig/avahi-ui.pc
%if 0%{?suse_version} >= 1330 %if 0%{?suse_version} >= 1330
strip-nondeterminism %{buildroot}/%{_prefix}/lib/monodoc/sources/*.zip strip-nondeterminism %{buildroot}/%{_prefix}/lib/monodoc/sources/*.zip
@ -951,15 +926,14 @@ strip-nondeterminism %{buildroot}/%{_prefix}/lib/monodoc/sources/*.zip
%endif %endif
%endif %endif
%endif %endif
%if %build_glib2 %if %{build_glib2}
%suse_update_desktop_file avahi-discover %suse_update_desktop_file avahi-discover
%suse_update_desktop_file bvnc %suse_update_desktop_file bvnc
%suse_update_desktop_file bssh %suse_update_desktop_file bssh
%endif %endif
%fdupes %{buildroot}/%{_libdir} %fdupes %{buildroot}/%{_libdir}
%if %build_core %if %{build_core}
%pre %pre
getent group avahi >/dev/null || %{_sbindir}/groupadd -r avahi getent group avahi >/dev/null || %{_sbindir}/groupadd -r avahi
getent passwd avahi >/dev/null || %{_sbindir}/useradd -r -s /bin/false -c "User for Avahi" -d /run/avahi-daemon -g avahi avahi getent passwd avahi >/dev/null || %{_sbindir}/useradd -r -s /bin/false -c "User for Avahi" -d /run/avahi-daemon -g avahi avahi
@ -1000,43 +974,26 @@ getent passwd avahi-autoipd >/dev/null || \
chown -R avahi-autoipd:avahi-autoipd %{_localstatedir}/lib/avahi-autoipd chown -R avahi-autoipd:avahi-autoipd %{_localstatedir}/lib/avahi-autoipd
%post -n libavahi-client3 -p /sbin/ldconfig %post -n libavahi-client3 -p /sbin/ldconfig
%postun -n libavahi-client3 -p /sbin/ldconfig %postun -n libavahi-client3 -p /sbin/ldconfig
%post -n libavahi-common3 -p /sbin/ldconfig %post -n libavahi-common3 -p /sbin/ldconfig
%postun -n libavahi-common3 -p /sbin/ldconfig %postun -n libavahi-common3 -p /sbin/ldconfig
%post -n libavahi-core7 -p /sbin/ldconfig %post -n libavahi-core7 -p /sbin/ldconfig
%postun -n libavahi-core7 -p /sbin/ldconfig %postun -n libavahi-core7 -p /sbin/ldconfig
%post -n libdns_sd -p /sbin/ldconfig %post -n libdns_sd -p /sbin/ldconfig
%postun -n libdns_sd -p /sbin/ldconfig %postun -n libdns_sd -p /sbin/ldconfig
%post -n libhowl0 -p /sbin/ldconfig %post -n libhowl0 -p /sbin/ldconfig
%postun -n libhowl0 -p /sbin/ldconfig %postun -n libhowl0 -p /sbin/ldconfig
%endif %endif
%if %build_glib2
%if %{build_glib2}
%post -n libavahi-ui0 -p /sbin/ldconfig %post -n libavahi-ui0 -p /sbin/ldconfig
%postun -n libavahi-ui0 -p /sbin/ldconfig %postun -n libavahi-ui0 -p /sbin/ldconfig
%post -n libavahi-ui-gtk3-%{avahi_gtk3_soname} -p /sbin/ldconfig %post -n libavahi-ui-gtk3-%{avahi_gtk3_soname} -p /sbin/ldconfig
%postun -n libavahi-ui-gtk3-%{avahi_gtk3_soname} -p /sbin/ldconfig %postun -n libavahi-ui-gtk3-%{avahi_gtk3_soname} -p /sbin/ldconfig
%post -n libavahi-gobject0 -p /sbin/ldconfig %post -n libavahi-gobject0 -p /sbin/ldconfig
%postun -n libavahi-gobject0 -p /sbin/ldconfig %postun -n libavahi-gobject0 -p /sbin/ldconfig
%post -n libavahi-glib1 -p /sbin/ldconfig %post -n libavahi-glib1 -p /sbin/ldconfig
%postun -n libavahi-glib1 -p /sbin/ldconfig %postun -n libavahi-glib1 -p /sbin/ldconfig
%post -n python-avahi-gtk %post -n python-avahi-gtk
%desktop_database_post %desktop_database_post
@ -1049,22 +1006,19 @@ chown -R avahi-autoipd:avahi-autoipd %{_localstatedir}/lib/avahi-autoipd
%postun -n avahi-utils-gtk %postun -n avahi-utils-gtk
%desktop_database_post %desktop_database_post
%endif %endif
%if %build_qt3
%if %{build_qt3}
%post -n libavahi-qt3-1 -p /sbin/ldconfig %post -n libavahi-qt3-1 -p /sbin/ldconfig
%postun -n libavahi-qt3-1 -p /sbin/ldconfig %postun -n libavahi-qt3-1 -p /sbin/ldconfig
%endif %endif
%if %build_qt4
%if %{build_qt4}
%post -n libavahi-qt4-1 -p /sbin/ldconfig %post -n libavahi-qt4-1 -p /sbin/ldconfig
%postun -n libavahi-qt4-1 -p /sbin/ldconfig %postun -n libavahi-qt4-1 -p /sbin/ldconfig
%endif %endif
%if %build_core
%if %{build_core}
%files %files
%defattr(-,root,root)
%license LICENSE %license LICENSE
%doc docs/* %doc docs/*
%dir %{_libdir}/avahi/ %dir %{_libdir}/avahi/
@ -1073,9 +1027,9 @@ chown -R avahi-autoipd:avahi-autoipd %{_localstatedir}/lib/avahi-autoipd
# avahi creates the directory itself, we do not package it # avahi creates the directory itself, we do not package it
# since it might be on tmpfs # since it might be on tmpfs
%attr(-,avahi,avahi) %ghost /run/avahi-daemon %attr(-,avahi,avahi) %ghost /run/avahi-daemon
%doc %{_mandir}/man5/*.5* %{_mandir}/man5/*.5%{ext_man}
%doc %{_mandir}/man8/*.8* %{_mandir}/man8/*.8%{ext_man}
%exclude %doc %{_mandir}/man8/avahi-autoipd* %exclude %{_mandir}/man8/avahi-autoipd.8.*
%{_sbindir}/avahi-* %{_sbindir}/avahi-*
%exclude %{_sbindir}/avahi-autoipd %exclude %{_sbindir}/avahi-autoipd
%{_sbindir}/rcavahi-daemon %{_sbindir}/rcavahi-daemon
@ -1098,67 +1052,57 @@ chown -R avahi-autoipd:avahi-autoipd %{_localstatedir}/lib/avahi-autoipd
# Common file for avahi-utils-gtk and python-avahi-gtk: # Common file for avahi-utils-gtk and python-avahi-gtk:
%dir %{_datadir}/avahi/ %dir %{_datadir}/avahi/
%{_datadir}/avahi/interfaces %{_datadir}/avahi/interfaces
/etc/sysconfig/network/*/avahi-daemon %{_sysconfdir}/sysconfig/network/*/avahi-daemon
%{_fillupdir}/sysconfig.avahi %{_fillupdir}/sysconfig.avahi
%files lang -f %{name}.lang %files lang -f %{name}.lang
%defattr(-,root,root)
%files -n libavahi-client3 %files -n libavahi-client3
%defattr(-,root,root)
%{_libdir}/libavahi-client*.so.* %{_libdir}/libavahi-client*.so.*
%files -n libavahi-common3 %files -n libavahi-common3
%defattr(-,root,root)
%{_libdir}/libavahi-common*.so.* %{_libdir}/libavahi-common*.so.*
%files -n libavahi-core7 %files -n libavahi-core7
%defattr(-,root,root)
%{_libdir}/libavahi-core*.so.* %{_libdir}/libavahi-core*.so.*
%files -n libdns_sd %files -n libdns_sd
%defattr(-,root,root)
# libdns_sd.so must be in non-devel package to provide mDNSResponder-lib compatibility: # libdns_sd.so must be in non-devel package to provide mDNSResponder-lib compatibility:
%{_libdir}/libdns_sd.so %{_libdir}/libdns_sd.so
%{_libdir}/libdns_sd.so.* %{_libdir}/libdns_sd.so.*
%files -n libhowl0 %files -n libhowl0
%defattr(-,root,root)
%{_libdir}/libhowl.so.* %{_libdir}/libhowl.so.*
%files -n python-avahi %files -n python-avahi
%defattr(-,root,root)
%{_bindir}/avahi-bookmarks %{_bindir}/avahi-bookmarks
%doc %{_mandir}/man1/avahi-bookmarks.1* %{_mandir}/man1/avahi-bookmarks.1%{ext_man}
%dir %{python_sitelib}/avahi %dir %{python_sitelib}/avahi
%{python_sitelib}/avahi/__init__.py* %{python_sitelib}/avahi/__init__.py*
%{python_sitelib}/avahi/ServiceTypeDatabase.py %{python_sitelib}/avahi/ServiceTypeDatabase.py
%files autoipd %files autoipd
%defattr(-,root,root)
%doc avahi-autoipd/README.SUSE %doc avahi-autoipd/README.SUSE
%doc %{_mandir}/man8/avahi-autoipd* %{_mandir}/man8/avahi-autoipd.8%{ext_man}
%attr(-,avahi-autoipd,avahi-autoipd)%{_localstatedir}/lib/avahi-autoipd %attr(-,avahi-autoipd,avahi-autoipd)%{_localstatedir}/lib/avahi-autoipd
%{_sbindir}/avahi-autoipd %{_sbindir}/avahi-autoipd
%{_sysconfdir}/avahi/avahi-autoipd.action %{_sysconfdir}/avahi/avahi-autoipd.action
/etc/sysconfig/network/*/avahi-autoipd %{_sysconfdir}/sysconfig/network/*/avahi-autoipd
%{_fillupdir}/sysconfig.avahi-autoipd %{_fillupdir}/sysconfig.avahi-autoipd
%files utils %files utils
%defattr(-,root,root)
%{_bindir}/avahi-browse* %{_bindir}/avahi-browse*
%{_bindir}/avahi-publish* %{_bindir}/avahi-publish*
%{_bindir}/avahi-resolve* %{_bindir}/avahi-resolve*
%{_bindir}/avahi-set-host-name %{_bindir}/avahi-set-host-name
%dir %{_datadir}/avahi/ %dir %{_datadir}/avahi/
%{_datadir}/avahi/avahi-service.dtd %{_datadir}/avahi/avahi-service.dtd
%doc %{_mandir}/man1/avahi-browse*.1* %{_mandir}/man1/avahi-browse*.1*
%doc %{_mandir}/man1/avahi-publish*.1* %{_mandir}/man1/avahi-publish*.1*
%doc %{_mandir}/man1/avahi-resolve*.1* %{_mandir}/man1/avahi-resolve*.1*
%doc %{_mandir}/man1/avahi-set-host-name.1* %{_mandir}/man1/avahi-set-host-name.1*
%files -n libavahi-devel %files -n libavahi-devel
%defattr(-,root,root)
# FIXME: Maybe split to particular subpackages. # FIXME: Maybe split to particular subpackages.
#%doc doc/api/html #%doc doc/api/html
#%doc doc/*.html doc/*.txt doc/file-boilerplate.c doc/TODO #%doc doc/*.html doc/*.txt doc/file-boilerplate.c doc/TODO
@ -1178,63 +1122,53 @@ chown -R avahi-autoipd:avahi-autoipd %{_localstatedir}/lib/avahi-autoipd
%{_libdir}/pkgconfig/avahi-core.pc %{_libdir}/pkgconfig/avahi-core.pc
%files compat-mDNSResponder-devel %files compat-mDNSResponder-devel
%defattr(-,root,root)
%{_includedir}/avahi-compat-libdns_sd %{_includedir}/avahi-compat-libdns_sd
%{_includedir}/dns_sd.h %{_includedir}/dns_sd.h
%{_libdir}/libdns_sd.*a %{_libdir}/libdns_sd.*a
%{_libdir}/pkgconfig/avahi-compat-libdns_sd.pc %{_libdir}/pkgconfig/avahi-compat-libdns_sd.pc
%files compat-howl-devel %files compat-howl-devel
%defattr(-,root,root)
%{_includedir}/avahi-compat-howl %{_includedir}/avahi-compat-howl
%{_libdir}/libhowl.so %{_libdir}/libhowl.so
%{_libdir}/libhowl.*a %{_libdir}/libhowl.*a
%{_libdir}/pkgconfig/avahi-compat-howl.pc %{_libdir}/pkgconfig/avahi-compat-howl.pc
%{_libdir}/pkgconfig/howl.pc %{_libdir}/pkgconfig/howl.pc
%endif %endif
%if %build_glib2
%if %{build_glib2}
%files -n libavahi-ui0 %files -n libavahi-ui0
%defattr(-,root,root)
%{_libdir}/libavahi-ui.so.* %{_libdir}/libavahi-ui.so.*
%files -n libavahi-ui-gtk3-%{avahi_gtk3_soname} %files -n libavahi-ui-gtk3-%{avahi_gtk3_soname}
%defattr(-,root,root)
%{_libdir}/libavahi-ui-gtk3.so.%{avahi_gtk3_soname}* %{_libdir}/libavahi-ui-gtk3.so.%{avahi_gtk3_soname}*
%files -n libavahi-glib1 %files -n libavahi-glib1
%defattr(-,root,root)
%{_libdir}/libavahi-glib*.so.* %{_libdir}/libavahi-glib*.so.*
%files -n libavahi-gobject0 %files -n libavahi-gobject0
%defattr(-,root,root)
%{_libdir}/libavahi-gobject*.so.* %{_libdir}/libavahi-gobject*.so.*
%files -n typelib-1_0-Avahi-0_6 %files -n typelib-1_0-Avahi-0_6
%defattr(-,root,root)
%{_libdir}/girepository-1.0/Avahi-0.6.typelib %{_libdir}/girepository-1.0/Avahi-0.6.typelib
%{_libdir}/girepository-1.0/AvahiCore-0.6.typelib %{_libdir}/girepository-1.0/AvahiCore-0.6.typelib
%files -n python-avahi-gtk %files -n python-avahi-gtk
%defattr(-,root,root)
%{_bindir}/avahi-discover %{_bindir}/avahi-discover
%{_datadir}/applications/avahi-discover.desktop %{_datadir}/applications/avahi-discover.desktop
%doc %{_mandir}/man1/avahi-discover.1* %{_mandir}/man1/avahi-discover.1*
%{python_sitelib}/avahi_discover %{python_sitelib}/avahi_discover
%files -n avahi-utils-gtk %files -n avahi-utils-gtk
%defattr(-,root,root)
%{_bindir}/bshell %{_bindir}/bshell
%{_bindir}/bssh %{_bindir}/bssh
%{_bindir}/bvnc %{_bindir}/bvnc
%{_bindir}/avahi-discover-standalone %{_bindir}/avahi-discover-standalone
%{_datadir}/applications/bssh.desktop %{_datadir}/applications/bssh.desktop
%{_datadir}/applications/bvnc.desktop %{_datadir}/applications/bvnc.desktop
%doc %{_mandir}/man1/bssh.1.* %{_mandir}/man1/bssh.1%{ext_man}
%doc %{_mandir}/man1/bvnc.1.* %{_mandir}/man1/bvnc.1%{ext_man}
%files -n libavahi-glib-devel %files -n libavahi-glib-devel
%defattr(-,root,root)
%{_includedir}/avahi-glib %{_includedir}/avahi-glib
%{_includedir}/avahi-ui %{_includedir}/avahi-ui
%{_libdir}/libavahi-glib*.*a %{_libdir}/libavahi-glib*.*a
@ -1246,45 +1180,39 @@ chown -R avahi-autoipd:avahi-autoipd %{_localstatedir}/lib/avahi-autoipd
%{_libdir}/pkgconfig/avahi-ui-gtk3.pc %{_libdir}/pkgconfig/avahi-ui-gtk3.pc
%files -n libavahi-gobject-devel %files -n libavahi-gobject-devel
%defattr(-,root,root)
%{_includedir}/avahi-gobject %{_includedir}/avahi-gobject
%{_libdir}/libavahi-gobject*.*a %{_libdir}/libavahi-gobject*.*a
%{_libdir}/libavahi-gobject*.so %{_libdir}/libavahi-gobject*.so
%{_libdir}/pkgconfig/avahi-gobject.pc %{_libdir}/pkgconfig/avahi-gobject.pc
%{_datadir}/gir-1.0/*.gir %{_datadir}/gir-1.0/*.gir
%endif %endif
%if %build_qt3
%if %{build_qt3}
%files -n libavahi-qt3-devel %files -n libavahi-qt3-devel
%defattr(-,root,root)
%{_includedir}/avahi-qt3 %{_includedir}/avahi-qt3
%{_libdir}/libavahi-qt3*.*a %{_libdir}/libavahi-qt3*.*a
%{_libdir}/libavahi-qt3*.so %{_libdir}/libavahi-qt3*.so
%{_libdir}/pkgconfig/avahi-qt3.pc %{_libdir}/pkgconfig/avahi-qt3.pc
%files -n libavahi-qt3-1 %files -n libavahi-qt3-1
%defattr(-,root,root)
%{_libdir}/libavahi-qt3*.so.* %{_libdir}/libavahi-qt3*.so.*
%endif %endif
%if %build_qt4
%if %{build_qt4}
%files -n libavahi-qt4-devel %files -n libavahi-qt4-devel
%defattr(-,root,root)
%{_includedir}/avahi-qt4 %{_includedir}/avahi-qt4
%{_libdir}/libavahi-qt4*.*a %{_libdir}/libavahi-qt4*.*a
%{_libdir}/libavahi-qt4*.so %{_libdir}/libavahi-qt4*.so
%{_libdir}/pkgconfig/avahi-qt4.pc %{_libdir}/pkgconfig/avahi-qt4.pc
%files -n libavahi-qt4-1 %files -n libavahi-qt4-1
%defattr(-,root,root)
%{_libdir}/libavahi-qt4*.so.* %{_libdir}/libavahi-qt4*.so.*
%endif %endif
%if %build_mono
%if %build_core
%if %{build_mono}
%if %{build_core}
%files -n avahi-mono %files -n avahi-mono
%else %else
%files %files
%endif %endif
%defattr(-,root,root) %defattr(-,root,root)

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Mar 6 16:57:37 UTC 2018 - dimstar@opensuse.org
- Modernize spec file by calling spec-cleaner
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Feb 19 15:19:41 UTC 2018 - dimstar@opensuse.org Mon Feb 19 15:19:41 UTC 2018 - dimstar@opensuse.org

View File

@ -16,12 +16,6 @@
# #
#Compat macro for new _fillupdir macro introduced in Nov 2017
%if ! %{defined _fillupdir}
%define _fillupdir /var/adm/fillup-templates
%endif
Name: avahi
# WARNING: After editing this file please call Re, rpmbuild or # WARNING: After editing this file please call Re, rpmbuild or
# bash avahi_spec-prepare.sh "$PWD" avahi # bash avahi_spec-prepare.sh "$PWD" avahi
# to update spec files: # to update spec files:
@ -35,13 +29,6 @@ Name: avahi
%define build_mono 0 %define build_mono 0
%define build_qt3 0 %define build_qt3 0
%define build_qt4 0 %define build_qt4 0
Version: 0.7
Release: 0
# FIXME: on upgrade, ensure to verify if -DGTK_DISABLE_DEPRECATED=1 can remain in avahi=ui/Makefile.am (GtkStock deprecated with GTK+ 3.9.10).
%if !%build_glib2 && !%build_mono && !%build_qt3 && !%build_qt4
# Create split spec files only when building per partes:
#%(sh %{_sourcedir}/%{_name}_spec-prepare.sh %{_sourcedir} %{name})
%endif
%define avahi_client_soname 3 %define avahi_client_soname 3
%define avahi_common_soname 3 %define avahi_common_soname 3
%define avahi_core_soname 7 %define avahi_core_soname 7
@ -51,13 +38,16 @@ Release: 0
%define avahi_gtk3_soname 0 %define avahi_gtk3_soname 0
%define avahi_qt3_soname 1 %define avahi_qt3_soname 1
%define avahi_qt4_soname 1 %define avahi_qt4_soname 1
%if %build_glib2 %if %{build_glib2}
%define debug_package_requires libavahi-ui%{avahi_ui_soname} = %{version}-%{release} %define debug_package_requires libavahi-ui%{avahi_ui_soname} = %{version}-%{release}
%endif %endif
Url: http://www.avahi.org/ Name: avahi
Version: 0.7
Release: 0
Summary: D-BUS Service for Zeroconf and Bonjour Summary: D-BUS Service for Zeroconf and Bonjour
License: LGPL-2.1-or-later License: LGPL-2.1-or-later
Group: System/Daemons Group: System/Daemons
URL: http://www.avahi.org/
Source: http://avahi.org/download/%{_name}-%{version}.tar.gz Source: http://avahi.org/download/%{_name}-%{version}.tar.gz
# From http://packages.debian.org/sid/avahi-daemon http://ftp.debian.org/debian/pool/main/a/avahi/avahi_0.6.31-1.debian.tar.gz # From http://packages.debian.org/sid/avahi-daemon http://ftp.debian.org/debian/pool/main/a/avahi/avahi_0.6.31-1.debian.tar.gz
Source1: avahi-daemon-check-dns.sh Source1: avahi-daemon-check-dns.sh
@ -85,7 +75,6 @@ Patch4: avahi-daemon-check-dns-suse.patch
Patch18: avahi-0.6.31-invalid-packet.patch Patch18: avahi-0.6.31-invalid-packet.patch
# PATCH-FIX-UPSTREAM avahi-0.6.32-suppress-resolv-conf-warning.patch bsc#982317 mgorse@suse.com -- only warn on missing resolv.conf if it is being used. # PATCH-FIX-UPSTREAM avahi-0.6.32-suppress-resolv-conf-warning.patch bsc#982317 mgorse@suse.com -- only warn on missing resolv.conf if it is being used.
Patch19: avahi-0.6.32-suppress-resolv-conf-warning.patch Patch19: avahi-0.6.32-suppress-resolv-conf-warning.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: dbus-1-python BuildRequires: dbus-1-python
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: gcc-c++ BuildRequires: gcc-c++
@ -93,27 +82,22 @@ BuildRequires: gdbm-devel
BuildRequires: intltool BuildRequires: intltool
BuildRequires: libdaemon-devel BuildRequires: libdaemon-devel
BuildRequires: libexpat-devel BuildRequires: libexpat-devel
BuildRequires: pkg-config # libtool is needed to build all variants: bootstrap is unconditional in the build section
BuildRequires: translation-update-upstream BuildRequires: libtool
BuildRequires: pkgconfig
# Even if we are not building python bindings, we need python to build service types database: # Even if we are not building python bindings, we need python to build service types database:
BuildRequires: python-devel BuildRequires: python-devel
BuildRequires: python-gdbm BuildRequires: python-gdbm
# libtool is needed to build all variants: bootstrap is unconditional in the build section BuildRequires: translation-update-upstream
BuildRequires: libtool # FIXME: on upgrade, ensure to verify if -DGTK_DISABLE_DEPRECATED=1 can remain in avahi=ui/Makefile.am (GtkStock deprecated with GTK+ 3.9.10).
%if !%{build_glib2} && !%{build_mono} && !%{build_qt3} && !%{build_qt4}
# Create split spec files only when building per partes:
#%(sh %{_sourcedir}/%{_name}_spec-prepare.sh %{_sourcedir} %{name})
%endif
%if 0%{?suse_version} >= 1330 %if 0%{?suse_version} >= 1330
BuildRequires: strip-nondeterminism BuildRequires: strip-nondeterminism
%endif %endif
%if %suse_version <= 1110 %if %{build_core}
%define python_sitelib %{py_sitedir}
%endif
%if %build_core
PreReq: pwdutils
%if %suse_version >= 1140
PreReq: sysvinit(network)
%else
PreReq: sysconfig
%endif
Recommends: %{_name}-lang
BuildRequires: dbus-1-devel BuildRequires: dbus-1-devel
BuildRequires: doxygen BuildRequires: doxygen
BuildRequires: graphviz BuildRequires: graphviz
@ -124,10 +108,10 @@ BuildRequires: pkgconfig(systemd)
#BuildRequires: dbus-1-python #BuildRequires: dbus-1-python
#Requires: dbus-1 #Requires: dbus-1
Requires: nss-mdns Requires: nss-mdns
# bug437293 # FIXME: use proper Requires(pre/post/preun/...)
%ifarch ppc64 PreReq: pwdutils
Obsoletes: mDNSResponder-64bit PreReq: sysvinit(network)
%endif Recommends: %{_name}-lang
# #
# mDNSResponder was used for <= 10.2: # mDNSResponder was used for <= 10.2:
Provides: mDNSResponder = 107.5 Provides: mDNSResponder = 107.5
@ -136,7 +120,7 @@ Obsoletes: mDNSResponder < 107.5
# File conflict for service-types.db openSUSE <= 12.3 SLE <= 11SP2 # File conflict for service-types.db openSUSE <= 12.3 SLE <= 11SP2
#Conflicts: avahi-utils <= 0.6.31-9.2 #Conflicts: avahi-utils <= 0.6.31-9.2
%endif %endif
%if %build_glib2 %if %{build_glib2}
BuildRequires: gobject-introspection-devel BuildRequires: gobject-introspection-devel
BuildRequires: gtk2-devel BuildRequires: gtk2-devel
BuildRequires: gtk3-devel BuildRequires: gtk3-devel
@ -145,15 +129,15 @@ BuildRequires: python-gtk-devel
BuildRequires: update-desktop-files BuildRequires: update-desktop-files
BuildRequires: pkgconfig(pygobject-3.0) BuildRequires: pkgconfig(pygobject-3.0)
%endif %endif
%if %build_qt3 %if %{build_qt3}
BuildRequires: libavahi-devel BuildRequires: libavahi-devel
BuildRequires: qt3-devel BuildRequires: qt3-devel
%endif %endif
%if %build_qt4 %if %{build_qt4}
BuildRequires: libavahi-devel BuildRequires: libavahi-devel
BuildRequires: libqt4-devel BuildRequires: libqt4-devel
%endif %endif
%if %build_mono %if %{build_mono}
BuildRequires: gtk-sharp2 BuildRequires: gtk-sharp2
BuildRequires: libavahi-glib-devel BuildRequires: libavahi-glib-devel
BuildRequires: mono-devel BuildRequires: mono-devel
@ -179,8 +163,7 @@ It passes all tests in the Apple Bonjour conformance test suite. In
addition, it supports some nifty things, like correct mDNS reflection addition, it supports some nifty things, like correct mDNS reflection
across LAN segments. across LAN segments.
%if %build_core %if %{build_core}
%package -n libavahi-client3 %package -n libavahi-client3
Summary: D-BUS Service for Zeroconf and Bonjour Summary: D-BUS Service for Zeroconf and Bonjour
Group: System/Libraries Group: System/Libraries
@ -237,15 +220,6 @@ Summary: mDNSResponder Compatibility Package for D-BUS Service for Zeroco
# mDNSResponder-lib used unversioned soname. # mDNSResponder-lib used unversioned soname.
# Provide full compatibility with mDNSResponder (FIXME: should be fixed in the package): # Provide full compatibility with mDNSResponder (FIXME: should be fixed in the package):
Group: System/Libraries Group: System/Libraries
%ifarch ia64 x86_64 ppc64 s390x
Provides: libdns_sd.so()(64bit)
%else
Provides: libdns_sd.so
%endif
# bug437293
%ifarch ppc64
Obsoletes: mDNSResponder-lib-64bit
%endif
# #
# mDNSResponder-lib was used for <= 10.2: # mDNSResponder-lib was used for <= 10.2:
Provides: mDNSResponder-lib = 107.5 Provides: mDNSResponder-lib = 107.5
@ -253,6 +227,11 @@ Obsoletes: mDNSResponder-lib < 107.5
# Old name used for <= 10.3: # Old name used for <= 10.3:
Provides: avahi-compat-mDNSResponder = %{version} Provides: avahi-compat-mDNSResponder = %{version}
Obsoletes: avahi-compat-mDNSResponder < %{version} Obsoletes: avahi-compat-mDNSResponder < %{version}
%ifarch ia64 x86_64 ppc64 s390x
Provides: libdns_sd.so()(64bit)
%else
Provides: libdns_sd.so
%endif
%description -n libdns_sd %description -n libdns_sd
Apple mDNSResponder compatibility layer for avahi. Apple mDNSResponder compatibility layer for avahi.
@ -294,16 +273,16 @@ correct mDNS reflection across LAN segments.
%package -n python-avahi %package -n python-avahi
Summary: A set of Avahi utilities written in Python Summary: A set of Avahi utilities written in Python
Group: Development/Languages/Python Group: Development/Languages/Python
PreReq: coreutils
Requires: %{name} = %{version} Requires: %{name} = %{version}
Requires: dbus-1-python Requires: dbus-1-python
Requires: python-gdbm Requires: python-gdbm
Requires: python-twisted Requires: python-twisted
Requires: python-twisted-web Requires: python-twisted-web
# FIXME: use proper Requires(pre/post/preun/...)
PreReq: coreutils
# Old name used for <= 10.3: # Old name used for <= 10.3:
Provides: avahi-python = %{version} Provides: avahi-python = %{version}
Obsoletes: avahi-python < %{version} Obsoletes: avahi-python < %{version}
%py_requires
%description -n python-avahi %description -n python-avahi
Avahi is an implementation of the DNS Service Discovery and Multicast Avahi is an implementation of the DNS Service Discovery and Multicast
@ -322,7 +301,6 @@ elsewhere, like correct mDNS reflection across LAN segments.
Summary: IPv4LL Service for Zeroconf and Bonjour Summary: IPv4LL Service for Zeroconf and Bonjour
# Split provides for upgrade from openSUSE <= 12.3 and SLE <= 11. # Split provides for upgrade from openSUSE <= 12.3 and SLE <= 11.
Group: Productivity/Networking/Other Group: Productivity/Networking/Other
Provides: avahi:%{_sbindir}/avahi-autoipd
# Disable this conflict for now, it breaks staging, and it's pretty much obsolete, but can go back in if needed once a new version of avahi is released. # Disable this conflict for now, it breaks staging, and it's pretty much obsolete, but can go back in if needed once a new version of avahi is released.
# File conflict for avahi-autoipd openSUSE <= 12.3 SLE <= 11 # File conflict for avahi-autoipd openSUSE <= 12.3 SLE <= 11
#Conflicts: avahi <= 0.6.31-9.2 #Conflicts: avahi <= 0.6.31-9.2
@ -330,6 +308,7 @@ Provides: avahi:%{_sbindir}/avahi-autoipd
Requires(post): coreutils Requires(post): coreutils
# shadow contains useradd and groupadd # shadow contains useradd and groupadd
Requires(pre): shadow Requires(pre): shadow
Provides: avahi:%{_sbindir}/avahi-autoipd
%description autoipd %description autoipd
avahi-autoipd is an implementation of Dynamic Configuration of IPv4 avahi-autoipd is an implementation of Dynamic Configuration of IPv4
@ -428,8 +407,8 @@ supports some nifty things that have never been seen elsewhere like
correct mDNS reflection across LAN segments. correct mDNS reflection across LAN segments.
%endif %endif
%if %build_glib2
%if %{build_glib2}
%package -n libavahi-ui0 %package -n libavahi-ui0
Summary: D-BUS Service for Zeroconf and Bonjour Summary: D-BUS Service for Zeroconf and Bonjour
Group: System/Libraries Group: System/Libraries
@ -548,15 +527,15 @@ across LAN segments.
%package -n python-avahi-gtk %package -n python-avahi-gtk
Summary: A set of Avahi utilities written in Python Using python-gtk Summary: A set of Avahi utilities written in Python Using python-gtk
Group: Development/Languages/Python Group: Development/Languages/Python
PreReq: coreutils
Requires: python-avahi = %{version} Requires: python-avahi = %{version}
Requires: python-gtk Requires: python-gtk
# FIXME: use proper Requires(pre/post/preun/...)
PreReq: coreutils
# Old name used for <= 10.3: # Old name used for <= 10.3:
Provides: avahi-python = %{version} Provides: avahi-python = %{version}
Obsoletes: avahi-python < %{version} Obsoletes: avahi-python < %{version}
# Provide split-provides for update from <= 11.0: # Provide split-provides for update from <= 11.0:
Provides: python-avahi:%{_bindir}/avahi-bookmarks Provides: python-avahi:%{_bindir}/avahi-bookmarks
%py_requires
%description -n python-avahi-gtk %description -n python-avahi-gtk
Avahi is an implementation of the DNS Service Discovery and Multicast Avahi is an implementation of the DNS Service Discovery and Multicast
@ -619,8 +598,8 @@ addition, it supports some nifty things, like correct mDNS reflection
across LAN segments. across LAN segments.
%endif %endif
%if %build_qt3
%if %{build_qt3}
%package -n libavahi-qt3-1 %package -n libavahi-qt3-1
Summary: Qt3 Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour Summary: Qt3 Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour
# Old name used for <= 10.3: # Old name used for <= 10.3:
@ -668,8 +647,8 @@ supports some nifty things that have never been seen elsewhere like
correct mDNS reflection across LAN segments. correct mDNS reflection across LAN segments.
%endif %endif
%if %build_qt4
%if %{build_qt4}
%package -n libavahi-qt4-1 %package -n libavahi-qt4-1
Summary: Qt4 Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour Summary: Qt4 Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour
# Old name used for <= 10.3: # Old name used for <= 10.3:
@ -717,11 +696,12 @@ supports some nifty things that have never been seen elsewhere like
correct mDNS reflection across LAN segments. correct mDNS reflection across LAN segments.
%endif %endif
%if %build_core
%if %build_mono
%if %{build_core}
%if %{build_mono}
%package -n avahi-mono %package -n avahi-mono
Summary: Mono Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour Summary: Mono Bindings for avahi, the D-BUS Service for Zeroconf and Bonjour
# FIXME: use correct group, see "https://en.opensuse.org/openSUSE:Package_group_guidelines"
Group: Development/Languages/Mono Group: Development/Languages/Mono
Requires: gtk-sharp2 Requires: gtk-sharp2
Requires: libavahi-client3 >= %{version} Requires: libavahi-client3 >= %{version}
@ -747,12 +727,12 @@ things, like correct mDNS reflection across LAN segments.
%prep %prep
%setup -q -n %{_name}-%{version} %setup -q -n %{_name}-%{version}
cp -a %{S:1} %{S:7} . cp -a %{SOURCE1} %{SOURCE7} .
cp -a %{S:5} sysconfig.avahi cp -a %{SOURCE5} sysconfig.avahi
sed "s:@docdir@:%{_docdir}:g" <%{S:6} >sysconfig.avahi-autoipd sed "s:@docdir@:%{_docdir}:g" <%{SOURCE6} >sysconfig.avahi-autoipd
cp -a %{S:9} avahi-autoipd/README.SUSE cp -a %{SOURCE9} avahi-autoipd/README.SUSE
sed "s:@sbindir@:%{_sbindir}:g" <%{S:10} >avahi-autoipd/avahi-autoipd.if-up sed "s:@sbindir@:%{_sbindir}:g" <%{SOURCE10} >avahi-autoipd/avahi-autoipd.if-up
sed "s:@sbindir@:%{_sbindir}:g" <%{S:11} >avahi-autoipd/avahi-autoipd.if-down sed "s:@sbindir@:%{_sbindir}:g" <%{SOURCE11} >avahi-autoipd/avahi-autoipd.if-down
translation-update-upstream translation-update-upstream
%patch0 %patch0
%patch1 -p1 %patch1 -p1
@ -760,11 +740,11 @@ translation-update-upstream
%patch18 -p1 %patch18 -p1
%patch19 -p1 %patch19 -p1
%if !%build_core %if !%{build_core}
# Replace all .la references from local .la files to installed versions # Replace all .la references from local .la files to installed versions
# with exception of libavahi-glib.la. # with exception of libavahi-glib.la.
# It allows to build only the binding subpackage. # It allows to build only the binding subpackage.
%if %build_mono %if %{build_mono}
sed -i 's:\(\.\.\|\$(top_builddir)\)/[^/]*/\(lib[^ ]*\.la\):%{_libdir}/\2:g' */Makefile.am sed -i 's:\(\.\.\|\$(top_builddir)\)/[^/]*/\(lib[^ ]*\.la\):%{_libdir}/\2:g' */Makefile.am
%else %else
sed -i 's:libavahi-glib\.la:@@SKIP LIBAVAHI GLIB@@:g sed -i 's:libavahi-glib\.la:@@SKIP LIBAVAHI GLIB@@:g
@ -774,7 +754,7 @@ s:@@SKIP LIBAVAHI GLIB@@:libavahi-glib.la:g
%endif %endif
%endif %endif
if ! test -f %{_datadir}/aclocal/glib-gettext.m4 ; then if ! test -f %{_datadir}/aclocal/glib-gettext.m4 ; then
cat %{S:4} >>acinclude.m4 cat %{SOURCE4} >>acinclude.m4
fi fi
# FIXME: We do not have xmltoman, use original doc, just fix paths. # FIXME: We do not have xmltoman, use original doc, just fix paths.
sed -i s:/home/lennart/tmp/avahi:: man/*.[0-9] sed -i s:/home/lennart/tmp/avahi:: man/*.[0-9]
@ -787,14 +767,14 @@ intltoolize -f
--libexecdir=%{_prefix}/lib\ --libexecdir=%{_prefix}/lib\
--disable-static\ --disable-static\
--with-distro=suse\ --with-distro=suse\
%if %build_core %if %{build_core}
--enable-compat-libdns_sd\ --enable-compat-libdns_sd\
--enable-compat-howl\ --enable-compat-howl\
%else %else
--disable-compat-libdns_sd\ --disable-compat-libdns_sd\
--disable-compat-howl\ --disable-compat-howl\
%endif %endif
%if %build_glib2 %if %{build_glib2}
--enable-glib\ --enable-glib\
--enable-gobject\ --enable-gobject\
--enable-gtk\ --enable-gtk\
@ -804,22 +784,22 @@ intltoolize -f
--disable-glib\ --disable-glib\
--disable-gobject\ --disable-gobject\
--disable-pygobject\ --disable-pygobject\
%if ! %build_mono %if ! %{build_mono}
--disable-gtk\ --disable-gtk\
%endif %endif
--disable-gtk3\ --disable-gtk3\
%endif %endif
%if %build_qt3 %if %{build_qt3}
--enable-qt3\ --enable-qt3\
%else %else
--disable-qt3\ --disable-qt3\
%endif %endif
%if %build_qt4 %if %{build_qt4}
--enable-qt4\ --enable-qt4\
%else %else
--disable-qt4\ --disable-qt4\
%endif %endif
%if %build_mono %if %{build_mono}
--enable-mono\ --enable-mono\
--enable-gtk\ --enable-gtk\
%else %else
@ -828,20 +808,20 @@ intltoolize -f
--with-avahi-priv-access-group=avahi\ --with-avahi-priv-access-group=avahi\
--with-autoipd-user=avahi-autoipd\ --with-autoipd-user=avahi-autoipd\
--with-autoipd-group=avahi-autoipd --with-autoipd-group=avahi-autoipd
%if %build_glib2 && !%build_core %if %{build_glib2} && !%{build_core}
for DIR in avahi-glib avahi-gobject avahi-ui avahi-discover-standalone avahi-python man ; do for DIR in avahi-glib avahi-gobject avahi-ui avahi-discover-standalone avahi-python man ; do
cd $DIR cd $DIR
make %{?_smp_mflags} make %{?_smp_mflags}
cd .. cd ..
done done
%endif %endif
%if %build_qt3 && !%build_core %if %{build_qt3} && !%{build_core}
cd avahi-qt cd avahi-qt
%endif %endif
%if %build_qt4 && !%build_core %if %{build_qt4} && !%{build_core}
cd avahi-qt cd avahi-qt
%endif %endif
%if %build_mono && !%build_core %if %{build_mono} && !%{build_core}
cd avahi-sharp cd avahi-sharp
make %{?_smp_mflags} make %{?_smp_mflags}
cd ../avahi-ui-sharp cd ../avahi-ui-sharp
@ -849,33 +829,33 @@ cd ../avahi-ui-sharp
make %{?_smp_mflags} make %{?_smp_mflags}
%install %install
%if %build_glib2 && !%build_core %if %{build_glib2} && !%{build_core}
for DIR in avahi-glib avahi-gobject avahi-ui avahi-discover-standalone avahi-python man ; do for DIR in avahi-glib avahi-gobject avahi-ui avahi-discover-standalone avahi-python man ; do
cd $DIR cd $DIR
%makeinstall %make_install
cd .. cd ..
done done
cd - cd -
%endif %endif
%if %build_qt3 && !%build_core %if %{build_qt3} && !%{build_core}
cd avahi-qt cd avahi-qt
%endif %endif
%if %build_qt4 && !%build_core %if %{build_qt4} && !%{build_core}
cd avahi-qt cd avahi-qt
%endif %endif
%if %build_mono && !%build_core %if %{build_mono} && !%{build_core}
cd avahi-sharp cd avahi-sharp
%makeinstall %make_install
cd ../avahi-ui-sharp cd ../avahi-ui-sharp
%endif %endif
%makeinstall %make_install
# do not install sysv init scripts # do not install sysv init scripts
rm -rf %{buildroot}%{_sysconfdir}/init.d/ rm -rf %{buildroot}%{_sysconfdir}/init.d/
%if !%build_core %if !%{build_core}
cd .. cd ..
make %{?_smp_mflags} install-pkgconfigDATA DESTDIR="%{buildroot}" make %{?_smp_mflags} install-pkgconfigDATA DESTDIR=%{buildroot}
%endif %endif
%if %build_core %if %{build_core}
# do not remove this unless you plan to fix _all_ the references to # do not remove this unless you plan to fix _all_ the references to
# it. all (multiple) previous attempts have failed already # it. all (multiple) previous attempts have failed already
#rm "%{buildroot}/%{_libdir}/libavahi-common.la" #rm "%{buildroot}/%{_libdir}/libavahi-common.la"
@ -884,29 +864,24 @@ ln -s avahi-compat-libdns_sd/dns_sd.h %{buildroot}/%{_includedir}/
ln -s avahi-compat-howl.pc %{buildroot}/%{_libdir}/pkgconfig/howl.pc ln -s avahi-compat-howl.pc %{buildroot}/%{_libdir}/pkgconfig/howl.pc
install -d %{buildroot}/%{_prefix}/lib/avahi install -d %{buildroot}/%{_prefix}/lib/avahi
install avahi-daemon-check-dns.sh %{buildroot}/%{_prefix}/lib/avahi/ install avahi-daemon-check-dns.sh %{buildroot}/%{_prefix}/lib/avahi/
install -d %{buildroot}/etc/sysconfig/network/if-{up,down}.d install -d %{buildroot}%{_sysconfdir}/sysconfig/network/if-{up,down}.d
# Note: We do not install the script to if-down.d. Only very obscure use # Note: We do not install the script to if-down.d. Only very obscure use
# cases may fail. (And Debian does the same.) # cases may fail. (And Debian does the same.)
# (You would have an AUTOIP-only fallback network, then connect network # (You would have an AUTOIP-only fallback network, then connect network
# to network with .local in DNS without disconnecting from the fallback, # to network with .local in DNS without disconnecting from the fallback,
# then disconnect from network with .local in DNS.) # then disconnect from network with .local in DNS.)
install avahi-daemon.if-up %{buildroot}/etc/sysconfig/network/if-up.d/avahi-daemon install avahi-daemon.if-up %{buildroot}%{_sysconfdir}/sysconfig/network/if-up.d/avahi-daemon
install avahi-autoipd/avahi-autoipd.if-up %{buildroot}/etc/sysconfig/network/if-up.d/avahi-autoipd install avahi-autoipd/avahi-autoipd.if-up %{buildroot}%{_sysconfdir}/sysconfig/network/if-up.d/avahi-autoipd
install avahi-autoipd/avahi-autoipd.if-down %{buildroot}/etc/sysconfig/network/if-down.d/avahi-autoipd install avahi-autoipd/avahi-autoipd.if-down %{buildroot}%{_sysconfdir}/sysconfig/network/if-down.d/avahi-autoipd
install -d %{buildroot}/%{_localstatedir}/lib/avahi-autoipd install -d %{buildroot}/%{_localstatedir}/lib/avahi-autoipd
# Work-around qt4 bug:
# https://bugzilla.novell.com/show_bug.cgi?id=238169
%if %suse_version <= 1020
sed -i "s,%{_builddir},/," %{buildroot}/%{_libdir}/libavahi-qt4.la
%endif
mkdir -p %{buildroot}/%{_sbindir} %{buildroot}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services mkdir -p %{buildroot}/%{_sbindir} %{buildroot}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services
ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcavahi-daemon ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcavahi-daemon
ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcavahi-dnsconfd ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcavahi-dnsconfd
install -m 644 %{S:3} %{buildroot}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/avahi install -m 644 %{SOURCE3} %{buildroot}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/avahi
install -d %{buildroot}/%{_datadir}/pixmaps install -d %{buildroot}/%{_datadir}/pixmaps
install -d %{buildroot}%{_fillupdir} install -d %{buildroot}%{_fillupdir}
install -m 644 sysconfig.avahi* %{buildroot}%{_fillupdir}/ install -m 644 sysconfig.avahi* %{buildroot}%{_fillupdir}/
%if ! %build_glib2 %if ! %{build_glib2}
# Note: This file is intentionally installed here. It is needed for avahi-utils-gtk and python-avahi-gtk: # Note: This file is intentionally installed here. It is needed for avahi-utils-gtk and python-avahi-gtk:
install -d %{buildroot}/%{_datadir}/avahi/interfaces install -d %{buildroot}/%{_datadir}/avahi/interfaces
install -m 644 avahi-discover-standalone/avahi-discover.ui %{buildroot}/%{_datadir}/avahi/interfaces install -m 644 avahi-discover-standalone/avahi-discover.ui %{buildroot}/%{_datadir}/avahi/interfaces
@ -917,7 +892,7 @@ install -m 644 avahi-discover-standalone/avahi-discover.ui %{buildroot}/%{_datad
# The rest is enabled/disabled in configure as needed. # The rest is enabled/disabled in configure as needed.
rm %{buildroot}/%{_libdir}/pkgconfig/avahi-client.pc rm %{buildroot}/%{_libdir}/pkgconfig/avahi-client.pc
rm %{buildroot}/%{_libdir}/pkgconfig/avahi-core.pc rm %{buildroot}/%{_libdir}/pkgconfig/avahi-core.pc
%if %build_glib2 %if %{build_glib2}
rm %{buildroot}/%{_bindir}/avahi-bookmarks rm %{buildroot}/%{_bindir}/avahi-bookmarks
rm -r %{buildroot}/%{python_sitelib}/avahi rm -r %{buildroot}/%{python_sitelib}/avahi
rm %{buildroot}/%{_mandir}/man1/avahi-bookmarks.1* rm %{buildroot}/%{_mandir}/man1/avahi-bookmarks.1*
@ -943,7 +918,7 @@ rm %{buildroot}/%{_datadir}/avahi/interfaces/avahi-discover.ui
rmdir %{buildroot}/%{_datadir}/avahi/interfaces rmdir %{buildroot}/%{_datadir}/avahi/interfaces
rmdir %{buildroot}/%{_datadir}/avahi rmdir %{buildroot}/%{_datadir}/avahi
%else %else
%if %build_mono %if %{build_mono}
rm %{buildroot}/%{_libdir}/pkgconfig/avahi-ui.pc rm %{buildroot}/%{_libdir}/pkgconfig/avahi-ui.pc
%if 0%{?suse_version} >= 1330 %if 0%{?suse_version} >= 1330
strip-nondeterminism %{buildroot}/%{_prefix}/lib/monodoc/sources/*.zip strip-nondeterminism %{buildroot}/%{_prefix}/lib/monodoc/sources/*.zip
@ -951,15 +926,14 @@ strip-nondeterminism %{buildroot}/%{_prefix}/lib/monodoc/sources/*.zip
%endif %endif
%endif %endif
%endif %endif
%if %build_glib2 %if %{build_glib2}
%suse_update_desktop_file avahi-discover %suse_update_desktop_file avahi-discover
%suse_update_desktop_file bvnc %suse_update_desktop_file bvnc
%suse_update_desktop_file bssh %suse_update_desktop_file bssh
%endif %endif
%fdupes %{buildroot}/%{_libdir} %fdupes %{buildroot}/%{_libdir}
%if %build_core %if %{build_core}
%pre %pre
getent group avahi >/dev/null || %{_sbindir}/groupadd -r avahi getent group avahi >/dev/null || %{_sbindir}/groupadd -r avahi
getent passwd avahi >/dev/null || %{_sbindir}/useradd -r -s /bin/false -c "User for Avahi" -d /run/avahi-daemon -g avahi avahi getent passwd avahi >/dev/null || %{_sbindir}/useradd -r -s /bin/false -c "User for Avahi" -d /run/avahi-daemon -g avahi avahi
@ -1000,43 +974,26 @@ getent passwd avahi-autoipd >/dev/null || \
chown -R avahi-autoipd:avahi-autoipd %{_localstatedir}/lib/avahi-autoipd chown -R avahi-autoipd:avahi-autoipd %{_localstatedir}/lib/avahi-autoipd
%post -n libavahi-client3 -p /sbin/ldconfig %post -n libavahi-client3 -p /sbin/ldconfig
%postun -n libavahi-client3 -p /sbin/ldconfig %postun -n libavahi-client3 -p /sbin/ldconfig
%post -n libavahi-common3 -p /sbin/ldconfig %post -n libavahi-common3 -p /sbin/ldconfig
%postun -n libavahi-common3 -p /sbin/ldconfig %postun -n libavahi-common3 -p /sbin/ldconfig
%post -n libavahi-core7 -p /sbin/ldconfig %post -n libavahi-core7 -p /sbin/ldconfig
%postun -n libavahi-core7 -p /sbin/ldconfig %postun -n libavahi-core7 -p /sbin/ldconfig
%post -n libdns_sd -p /sbin/ldconfig %post -n libdns_sd -p /sbin/ldconfig
%postun -n libdns_sd -p /sbin/ldconfig %postun -n libdns_sd -p /sbin/ldconfig
%post -n libhowl0 -p /sbin/ldconfig %post -n libhowl0 -p /sbin/ldconfig
%postun -n libhowl0 -p /sbin/ldconfig %postun -n libhowl0 -p /sbin/ldconfig
%endif %endif
%if %build_glib2
%if %{build_glib2}
%post -n libavahi-ui0 -p /sbin/ldconfig %post -n libavahi-ui0 -p /sbin/ldconfig
%postun -n libavahi-ui0 -p /sbin/ldconfig %postun -n libavahi-ui0 -p /sbin/ldconfig
%post -n libavahi-ui-gtk3-%{avahi_gtk3_soname} -p /sbin/ldconfig %post -n libavahi-ui-gtk3-%{avahi_gtk3_soname} -p /sbin/ldconfig
%postun -n libavahi-ui-gtk3-%{avahi_gtk3_soname} -p /sbin/ldconfig %postun -n libavahi-ui-gtk3-%{avahi_gtk3_soname} -p /sbin/ldconfig
%post -n libavahi-gobject0 -p /sbin/ldconfig %post -n libavahi-gobject0 -p /sbin/ldconfig
%postun -n libavahi-gobject0 -p /sbin/ldconfig %postun -n libavahi-gobject0 -p /sbin/ldconfig
%post -n libavahi-glib1 -p /sbin/ldconfig %post -n libavahi-glib1 -p /sbin/ldconfig
%postun -n libavahi-glib1 -p /sbin/ldconfig %postun -n libavahi-glib1 -p /sbin/ldconfig
%post -n python-avahi-gtk %post -n python-avahi-gtk
%desktop_database_post %desktop_database_post
@ -1049,22 +1006,19 @@ chown -R avahi-autoipd:avahi-autoipd %{_localstatedir}/lib/avahi-autoipd
%postun -n avahi-utils-gtk %postun -n avahi-utils-gtk
%desktop_database_post %desktop_database_post
%endif %endif
%if %build_qt3
%if %{build_qt3}
%post -n libavahi-qt3-1 -p /sbin/ldconfig %post -n libavahi-qt3-1 -p /sbin/ldconfig
%postun -n libavahi-qt3-1 -p /sbin/ldconfig %postun -n libavahi-qt3-1 -p /sbin/ldconfig
%endif %endif
%if %build_qt4
%if %{build_qt4}
%post -n libavahi-qt4-1 -p /sbin/ldconfig %post -n libavahi-qt4-1 -p /sbin/ldconfig
%postun -n libavahi-qt4-1 -p /sbin/ldconfig %postun -n libavahi-qt4-1 -p /sbin/ldconfig
%endif %endif
%if %build_core
%if %{build_core}
%files %files
%defattr(-,root,root)
%license LICENSE %license LICENSE
%doc docs/* %doc docs/*
%dir %{_libdir}/avahi/ %dir %{_libdir}/avahi/
@ -1073,9 +1027,9 @@ chown -R avahi-autoipd:avahi-autoipd %{_localstatedir}/lib/avahi-autoipd
# avahi creates the directory itself, we do not package it # avahi creates the directory itself, we do not package it
# since it might be on tmpfs # since it might be on tmpfs
%attr(-,avahi,avahi) %ghost /run/avahi-daemon %attr(-,avahi,avahi) %ghost /run/avahi-daemon
%doc %{_mandir}/man5/*.5* %{_mandir}/man5/*.5%{ext_man}
%doc %{_mandir}/man8/*.8* %{_mandir}/man8/*.8%{ext_man}
%exclude %doc %{_mandir}/man8/avahi-autoipd* %exclude %{_mandir}/man8/avahi-autoipd.8.*
%{_sbindir}/avahi-* %{_sbindir}/avahi-*
%exclude %{_sbindir}/avahi-autoipd %exclude %{_sbindir}/avahi-autoipd
%{_sbindir}/rcavahi-daemon %{_sbindir}/rcavahi-daemon
@ -1098,67 +1052,57 @@ chown -R avahi-autoipd:avahi-autoipd %{_localstatedir}/lib/avahi-autoipd
# Common file for avahi-utils-gtk and python-avahi-gtk: # Common file for avahi-utils-gtk and python-avahi-gtk:
%dir %{_datadir}/avahi/ %dir %{_datadir}/avahi/
%{_datadir}/avahi/interfaces %{_datadir}/avahi/interfaces
/etc/sysconfig/network/*/avahi-daemon %{_sysconfdir}/sysconfig/network/*/avahi-daemon
%{_fillupdir}/sysconfig.avahi %{_fillupdir}/sysconfig.avahi
%files lang -f %{name}.lang %files lang -f %{name}.lang
%defattr(-,root,root)
%files -n libavahi-client3 %files -n libavahi-client3
%defattr(-,root,root)
%{_libdir}/libavahi-client*.so.* %{_libdir}/libavahi-client*.so.*
%files -n libavahi-common3 %files -n libavahi-common3
%defattr(-,root,root)
%{_libdir}/libavahi-common*.so.* %{_libdir}/libavahi-common*.so.*
%files -n libavahi-core7 %files -n libavahi-core7
%defattr(-,root,root)
%{_libdir}/libavahi-core*.so.* %{_libdir}/libavahi-core*.so.*
%files -n libdns_sd %files -n libdns_sd
%defattr(-,root,root)
# libdns_sd.so must be in non-devel package to provide mDNSResponder-lib compatibility: # libdns_sd.so must be in non-devel package to provide mDNSResponder-lib compatibility:
%{_libdir}/libdns_sd.so %{_libdir}/libdns_sd.so
%{_libdir}/libdns_sd.so.* %{_libdir}/libdns_sd.so.*
%files -n libhowl0 %files -n libhowl0
%defattr(-,root,root)
%{_libdir}/libhowl.so.* %{_libdir}/libhowl.so.*
%files -n python-avahi %files -n python-avahi
%defattr(-,root,root)
%{_bindir}/avahi-bookmarks %{_bindir}/avahi-bookmarks
%doc %{_mandir}/man1/avahi-bookmarks.1* %{_mandir}/man1/avahi-bookmarks.1%{ext_man}
%dir %{python_sitelib}/avahi %dir %{python_sitelib}/avahi
%{python_sitelib}/avahi/__init__.py* %{python_sitelib}/avahi/__init__.py*
%{python_sitelib}/avahi/ServiceTypeDatabase.py %{python_sitelib}/avahi/ServiceTypeDatabase.py
%files autoipd %files autoipd
%defattr(-,root,root)
%doc avahi-autoipd/README.SUSE %doc avahi-autoipd/README.SUSE
%doc %{_mandir}/man8/avahi-autoipd* %{_mandir}/man8/avahi-autoipd.8%{ext_man}
%attr(-,avahi-autoipd,avahi-autoipd)%{_localstatedir}/lib/avahi-autoipd %attr(-,avahi-autoipd,avahi-autoipd)%{_localstatedir}/lib/avahi-autoipd
%{_sbindir}/avahi-autoipd %{_sbindir}/avahi-autoipd
%{_sysconfdir}/avahi/avahi-autoipd.action %{_sysconfdir}/avahi/avahi-autoipd.action
/etc/sysconfig/network/*/avahi-autoipd %{_sysconfdir}/sysconfig/network/*/avahi-autoipd
%{_fillupdir}/sysconfig.avahi-autoipd %{_fillupdir}/sysconfig.avahi-autoipd
%files utils %files utils
%defattr(-,root,root)
%{_bindir}/avahi-browse* %{_bindir}/avahi-browse*
%{_bindir}/avahi-publish* %{_bindir}/avahi-publish*
%{_bindir}/avahi-resolve* %{_bindir}/avahi-resolve*
%{_bindir}/avahi-set-host-name %{_bindir}/avahi-set-host-name
%dir %{_datadir}/avahi/ %dir %{_datadir}/avahi/
%{_datadir}/avahi/avahi-service.dtd %{_datadir}/avahi/avahi-service.dtd
%doc %{_mandir}/man1/avahi-browse*.1* %{_mandir}/man1/avahi-browse*.1*
%doc %{_mandir}/man1/avahi-publish*.1* %{_mandir}/man1/avahi-publish*.1*
%doc %{_mandir}/man1/avahi-resolve*.1* %{_mandir}/man1/avahi-resolve*.1*
%doc %{_mandir}/man1/avahi-set-host-name.1* %{_mandir}/man1/avahi-set-host-name.1*
%files -n libavahi-devel %files -n libavahi-devel
%defattr(-,root,root)
# FIXME: Maybe split to particular subpackages. # FIXME: Maybe split to particular subpackages.
#%doc doc/api/html #%doc doc/api/html
#%doc doc/*.html doc/*.txt doc/file-boilerplate.c doc/TODO #%doc doc/*.html doc/*.txt doc/file-boilerplate.c doc/TODO
@ -1178,63 +1122,53 @@ chown -R avahi-autoipd:avahi-autoipd %{_localstatedir}/lib/avahi-autoipd
%{_libdir}/pkgconfig/avahi-core.pc %{_libdir}/pkgconfig/avahi-core.pc
%files compat-mDNSResponder-devel %files compat-mDNSResponder-devel
%defattr(-,root,root)
%{_includedir}/avahi-compat-libdns_sd %{_includedir}/avahi-compat-libdns_sd
%{_includedir}/dns_sd.h %{_includedir}/dns_sd.h
%{_libdir}/libdns_sd.*a %{_libdir}/libdns_sd.*a
%{_libdir}/pkgconfig/avahi-compat-libdns_sd.pc %{_libdir}/pkgconfig/avahi-compat-libdns_sd.pc
%files compat-howl-devel %files compat-howl-devel
%defattr(-,root,root)
%{_includedir}/avahi-compat-howl %{_includedir}/avahi-compat-howl
%{_libdir}/libhowl.so %{_libdir}/libhowl.so
%{_libdir}/libhowl.*a %{_libdir}/libhowl.*a
%{_libdir}/pkgconfig/avahi-compat-howl.pc %{_libdir}/pkgconfig/avahi-compat-howl.pc
%{_libdir}/pkgconfig/howl.pc %{_libdir}/pkgconfig/howl.pc
%endif %endif
%if %build_glib2
%if %{build_glib2}
%files -n libavahi-ui0 %files -n libavahi-ui0
%defattr(-,root,root)
%{_libdir}/libavahi-ui.so.* %{_libdir}/libavahi-ui.so.*
%files -n libavahi-ui-gtk3-%{avahi_gtk3_soname} %files -n libavahi-ui-gtk3-%{avahi_gtk3_soname}
%defattr(-,root,root)
%{_libdir}/libavahi-ui-gtk3.so.%{avahi_gtk3_soname}* %{_libdir}/libavahi-ui-gtk3.so.%{avahi_gtk3_soname}*
%files -n libavahi-glib1 %files -n libavahi-glib1
%defattr(-,root,root)
%{_libdir}/libavahi-glib*.so.* %{_libdir}/libavahi-glib*.so.*
%files -n libavahi-gobject0 %files -n libavahi-gobject0
%defattr(-,root,root)
%{_libdir}/libavahi-gobject*.so.* %{_libdir}/libavahi-gobject*.so.*
%files -n typelib-1_0-Avahi-0_6 %files -n typelib-1_0-Avahi-0_6
%defattr(-,root,root)
%{_libdir}/girepository-1.0/Avahi-0.6.typelib %{_libdir}/girepository-1.0/Avahi-0.6.typelib
%{_libdir}/girepository-1.0/AvahiCore-0.6.typelib %{_libdir}/girepository-1.0/AvahiCore-0.6.typelib
%files -n python-avahi-gtk %files -n python-avahi-gtk
%defattr(-,root,root)
%{_bindir}/avahi-discover %{_bindir}/avahi-discover
%{_datadir}/applications/avahi-discover.desktop %{_datadir}/applications/avahi-discover.desktop
%doc %{_mandir}/man1/avahi-discover.1* %{_mandir}/man1/avahi-discover.1*
%{python_sitelib}/avahi_discover %{python_sitelib}/avahi_discover
%files -n avahi-utils-gtk %files -n avahi-utils-gtk
%defattr(-,root,root)
%{_bindir}/bshell %{_bindir}/bshell
%{_bindir}/bssh %{_bindir}/bssh
%{_bindir}/bvnc %{_bindir}/bvnc
%{_bindir}/avahi-discover-standalone %{_bindir}/avahi-discover-standalone
%{_datadir}/applications/bssh.desktop %{_datadir}/applications/bssh.desktop
%{_datadir}/applications/bvnc.desktop %{_datadir}/applications/bvnc.desktop
%doc %{_mandir}/man1/bssh.1.* %{_mandir}/man1/bssh.1%{ext_man}
%doc %{_mandir}/man1/bvnc.1.* %{_mandir}/man1/bvnc.1%{ext_man}
%files -n libavahi-glib-devel %files -n libavahi-glib-devel
%defattr(-,root,root)
%{_includedir}/avahi-glib %{_includedir}/avahi-glib
%{_includedir}/avahi-ui %{_includedir}/avahi-ui
%{_libdir}/libavahi-glib*.*a %{_libdir}/libavahi-glib*.*a
@ -1246,45 +1180,39 @@ chown -R avahi-autoipd:avahi-autoipd %{_localstatedir}/lib/avahi-autoipd
%{_libdir}/pkgconfig/avahi-ui-gtk3.pc %{_libdir}/pkgconfig/avahi-ui-gtk3.pc
%files -n libavahi-gobject-devel %files -n libavahi-gobject-devel
%defattr(-,root,root)
%{_includedir}/avahi-gobject %{_includedir}/avahi-gobject
%{_libdir}/libavahi-gobject*.*a %{_libdir}/libavahi-gobject*.*a
%{_libdir}/libavahi-gobject*.so %{_libdir}/libavahi-gobject*.so
%{_libdir}/pkgconfig/avahi-gobject.pc %{_libdir}/pkgconfig/avahi-gobject.pc
%{_datadir}/gir-1.0/*.gir %{_datadir}/gir-1.0/*.gir
%endif %endif
%if %build_qt3
%if %{build_qt3}
%files -n libavahi-qt3-devel %files -n libavahi-qt3-devel
%defattr(-,root,root)
%{_includedir}/avahi-qt3 %{_includedir}/avahi-qt3
%{_libdir}/libavahi-qt3*.*a %{_libdir}/libavahi-qt3*.*a
%{_libdir}/libavahi-qt3*.so %{_libdir}/libavahi-qt3*.so
%{_libdir}/pkgconfig/avahi-qt3.pc %{_libdir}/pkgconfig/avahi-qt3.pc
%files -n libavahi-qt3-1 %files -n libavahi-qt3-1
%defattr(-,root,root)
%{_libdir}/libavahi-qt3*.so.* %{_libdir}/libavahi-qt3*.so.*
%endif %endif
%if %build_qt4
%if %{build_qt4}
%files -n libavahi-qt4-devel %files -n libavahi-qt4-devel
%defattr(-,root,root)
%{_includedir}/avahi-qt4 %{_includedir}/avahi-qt4
%{_libdir}/libavahi-qt4*.*a %{_libdir}/libavahi-qt4*.*a
%{_libdir}/libavahi-qt4*.so %{_libdir}/libavahi-qt4*.so
%{_libdir}/pkgconfig/avahi-qt4.pc %{_libdir}/pkgconfig/avahi-qt4.pc
%files -n libavahi-qt4-1 %files -n libavahi-qt4-1
%defattr(-,root,root)
%{_libdir}/libavahi-qt4*.so.* %{_libdir}/libavahi-qt4*.so.*
%endif %endif
%if %build_mono
%if %build_core
%if %{build_mono}
%if %{build_core}
%files -n avahi-mono %files -n avahi-mono
%else %else
%files %files
%endif %endif
%defattr(-,root,root) %defattr(-,root,root)