Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37567349
en ru br
Репозитории ALT
S:0.8-alt2
5.1: 0.6.25-alt3
4.1: 0.6.22-alt6.M41.2
4.0: 0.6.21-alt0.M40.1
3.0:
+backports:0.6.18-alt0.2.M30
www.altlinux.org/Changes

Группа :: Система/Основа
Пакет: avahi

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

%define aIF_ver_gt() %if "%(rpmvercmp '%1' '%2')" > "0"
%define aIF_ver_gteq() %if "%(rpmvercmp '%1' '%2')" >= "0"
%define aIF_ver_lt() %if "%(rpmvercmp '%2' '%1')" > "0"
%define aIF_ver_lteq() %if "%(rpmvercmp '%2' '%1')" >= "0"

%def_with python
%def_without howl
%def_with mdns
%ifndef _qt3dir
%define _qt3dir %_libdir/qt3
%endif
%define glibc_code_ver %{get_version glibc-core}

%define avahi_user _avahi
%define avahi_group_priv netdev
%define avahi_user_autoipd  _avahi_autoipd
%define avahi_rundir %_var/run

Name: avahi
Version: 0.6.18
Release: alt0.2.M30

Group: System/Base
Summary: Local network service discovery
License: LGPL
Url: http://www.avahi.org/
Packager: Sergey V Turchin <zerg at altlinux dot org>

Source0: %name-%version.tar.gz
Patch1: avahi-0.6.16-altlinux.patch
Patch2: avahi-0.6.1-sbinresolver.patch
Patch3: avahi-0.6.18-alt-gcc3.patch

Requires: dbus
Requires: lib%name = %version-%release
%if_with howl
Obsoletes: howl
%endif
%if_with mdns
Obsoletes: mdnsresponder
%endif

# Automatically added by buildreq on Wed Dec 14 2005

#BuildRequires: doxygen fontconfig-devel freetype2-devel gcc-c++ gcc-g77 glib2-devel graphviz libatk-devel libaudio-devel libcairo-devel libcap-devel libdaemon-devel libdbus-devel libexpat-devel libg2c-devel libgdbm-devel libglade2-devel libglitz-devel libgtk+2-devel libpango-devel libpng-devel libqt3-devel libstdc++-devel libxml2-devel pkg-config xorg-x11-devel zlib-devel
BuildRequires: doxygen fontconfig-devel freetype2-devel gcc-c++ glib2-devel
BuildRequires: libatk-devel libaudio-devel libcairo-devel libcap-devel
BuildRequires: libdaemon-devel libdbus-devel libexpat-devel libgdbm-devel
BuildRequires: libglitz-devel libpango-devel libpng-devel
BuildRequires: libqt3-devel libstdc++-devel libxml2-devel pkg-config xorg-x11-devel zlib-devel
BuildRequires: libqt4-devel
BuildRequires: libgtk+2-devel libglade2-devel
BuildRequires: linux-libc-headers rpm-utils
%if_with python
BuildRequires: python-module-pygtk python-module-dbus
%endif

%description
Avahi is a system which facilitates service discovery on
a local network -- this means that you can plug your laptop or
computer into a network and instantly be able to view other people who
you can chat with, find printers to print to or find files being
shared. This kind of technology is already found in MacOS X (branded
'Rendezvous', 'Bonjour' and sometimes 'ZeroConf') and is very
convenient.

%package -n lib%name
Summary: Libraries for avahi
Group: System/Base
%if_with mdns
Obsoletes: libmdnsresponder
Provides: libmdnsresponder
%endif
%if_with howl
Obsoletes: libhowl
Provides: libhowl
%endif

%description -n lib%name
Libraries for use of avahi.

%package tools
Summary: Tools for mDNS browsing and publishing
Group: System/Base
Conflicts: lib%name > %version-%release
Conflicts: lib%name < %version-%release
%if_with python
%py_requires avahi gtk gobject dbus libglade
%endif

%description tools
Tools that use avahi to browse and publish mDNS services and hosts.

%package -n lib%name-glib
Summary: Glib libraries for avahi
Group: System/Base
Requires: lib%name = %version-%release
%description -n lib%name-glib
Libraries for easy use of avahi from glib applications.

%package -n lib%name-glib-devel
Summary: Libraries and header files for avahi glib development
Group: Development/GNOME and GTK+
Requires: lib%name-devel = %version-%release
Requires: lib%name-glib = %version-%release
Requires: glib2-devel
%description -n lib%name-glib-devel
Header files and libraries necessary for developing
programs using avahi with glib.

%package -n lib%name-qt3
Summary: Qt3 libraries for avahi
Group: System/Base
Requires: lib%name = %version-%release
Requires: libqt3 >= %{get_version libqt3}
%description -n lib%name-qt3
Libraries for easy use of avahi from Qt3 applications.

%package -n lib%name-qt3-devel
Summary: Libraries and header files for avahi Qt3 development
Group: Development/KDE and QT
Requires: lib%name-devel = %version-%release
Requires: lib%name-qt3 = %version
Requires: libqt3-devel
%description -n lib%name-qt3-devel
Header files and libraries necessary for developing
programs using avahi with Qt3.

%package -n lib%name-qt4
Summary: Qt4 libraries for avahi
Group: System/Base
Requires: lib%name = %version-%release
Requires: libqt4-core >= %{get_version libqt4-core}
%description -n lib%name-qt4
Libraries for easy use of avahi from Qt4 applications.

%package -n lib%name-qt4-devel
Summary: Libraries and header files for avahi Qt4 development
Group: Development/KDE and QT
Requires: lib%name-devel = %version-%release
Requires: lib%name-qt4 = %version
Requires: libqt4-devel
%description -n lib%name-qt4-devel
Header files and libraries necessary for developing
programs using avahi with Qt4.

%package -n lib%name-ui
Summary: UI libraries for avahi
Group: System/Base
Requires: lib%name = %version-%release
Requires: lib%name-glib = %version-%release
%description -n lib%name-ui
Libraries for easy use of avahi from UI applications.

%package -n lib%name-ui-devel
Summary: Libraries and header files for avahi UI development
Group: Development/GNOME and GTK+
Requires: lib%name-devel = %version-%release
Requires: lib%name-glib-devel = %version-%release
Requires: lib%name-ui = %version-%release
%description -n lib%name-ui-devel
Header files and libraries necessary for developing
programs using avahi with UI.

%package -n lib%name-devel
Summary: Libraries and header files for avahi development
Group: Development/C
Requires: lib%name = %version-%release
%if_with howl
Obsoletes: howl-devel
%endif
%if_with mdns
Obsoletes: libmdnsresponder-devel
%endif
%description -n lib%name-devel
Header files and libraries necessary for developing
programs using avahi.

%package -n python-module-%name
Summary: Python bindings for Avahi
Group: Development/Python
%description -n python-module-%name
Python bindings for Avahi.


%prep
%setup -q
%patch1 -p1 -b .alt
%patch2 -p1 -b .resolver
%aIF_ver_lt %__gcc_version 4.0
%patch3 -p1 -b .gcc3
%endif
rm -f avahi-python/avahi/ServiceTypeDatabase.py

aclocal -I common
libtoolize --force
automake --add-missing
autoconf

%build
%aIF_ver_lt %glibc_code_ver 2.5
export CFLAGS="-I/usr/include/linux-libc-headers/include"
%endif
export LDFLAGS="-L%_qt3dir/lib"
%configure \
   --with-distro=altlinux \
   --enable-core-docs \
   --disable-mono \
   --disable-monodoc \
%if_with python
   --enable-python \
   --enable-pygtk \
   --enable-python-dbus \
%else
   --disable-python \
   --disable-pygtk \
   --disable-python-dbus \
%endif
%if_with howl
   --enable-compat-howl \
%endif
%if_with mdns
   --enable-compat-libdns_sd \
%endif
   --with-avahi-user=%avahi_user \
   --with-avahi-group=%avahi_user \
   --with-avahi-priv-access-group=%avahi_group_priv \
   --with-autoipd-user=%avahi_user_autoipd \
   --with-autoipd-group=%avahi_user_autoipd

%make_build avahi_runtime_dir=%avahi_rundir avahi_socket=%avahi_rundir/avahi-daemon/socket

%install
%make install \
   DESTDIR=%buildroot \
   pythondir=%python_sitelibdir \
   pyexecdir=%python_sitelibdir

mv %buildroot/%_sysconfdir/avahi/avahi-daemon.conf \
   %buildroot/%_sysconfdir/avahi/avahi-daemon.conf.default
>%buildroot/%_sysconfdir/avahi/avahi-daemon.conf

mkdir -p -m0770 %buildroot/%avahi_rundir/avahi-daemon

rm -f %buildroot/%_libdir/*.la
rm -f %buildroot/%_libdir/*.a


%pre
/usr/sbin/useradd -c 'Avahi daemon' -s /sbin/nologin -r %avahi_user 2> /dev/null || :
/usr/sbin/useradd -c 'Avahi autoipd daemon' -s /sbin/nologin -r %avahi_user_autoipd 2> /dev/null || :
%post
/sbin/service messagebus status >/dev/null || echo "Avahi require running messagebus service."
[ "$1" == "1" ] && /sbin/service messagebus condrestart ||:
%post_service avahi-daemon ||:
/sbin/service avahi-dnsconfd condrestart 2>/dev/null ||:
%preun
%preun_service avahi-daemon ||:

%pre -n lib%name
/usr/sbin/groupadd -r %avahi_group_priv 2> /dev/null || :
%post  -n lib%name
%post_ldconfig
%postun  -n lib%name
%postun_ldconfig

%post  -n lib%name-glib
%post_ldconfig
%postun  -n lib%name-glib
%postun_ldconfig

%post  -n lib%name-qt3
%post_ldconfig
%postun  -n lib%name-qt3
%postun_ldconfig

%post  -n lib%name-qt4
%post_ldconfig
%postun  -n lib%name-qt4
%postun_ldconfig

%post  -n lib%name-ui
%post_ldconfig
%postun  -n lib%name-ui
%postun_ldconfig

%post tools
%update_menus
%postun tools
%clean_menus


%files
%doc docs/* avahi-daemon/*.service
%config %_sysconfdir/rc.d/init.d/*
%dir %_sysconfdir/avahi/
%ghost %config(noreplace) %_sysconfdir/avahi/avahi-daemon.conf
%config %_sysconfdir/avahi/avahi-daemon.conf.default
%config %_sysconfdir/avahi/hosts
%config(noreplace) %_sysconfdir/avahi/avahi-*.action
%config %_sysconfdir/dbus-1/system.d/avahi-dbus.conf
%dir %_sysconfdir/avahi/services
%attr(770, %avahi_user, %avahi_user) %dir %avahi_rundir/avahi-daemon
%_sbindir/*
%_datadir/avahi/*
%_datadir/applications/*.desktop
%exclude %_datadir/avahi/interfaces
%_man5dir/*
%_man8dir/*

%files -n lib%name
%_libdir/libavahi-common.so.*
%_libdir/libavahi-core.so.*
%_libdir/libavahi-client.so.*
%dir %_datadir/avahi/
%dir %_datadir/avahi/interfaces/
%if_with mdns
%_libdir/libdns_sd.so.*
%endif
%if_with howl
%_libdir/libhowl.so.*
%endif

%files tools
%_bindir/*
%_man1dir/*
%_datadir/avahi/interfaces/avahi-discover.glade
%_datadir/applications/avahi-discover.desktop

%files -n lib%name-devel
%_libdir/libavahi-common.so
%_libdir/libavahi-core.so
%_libdir/libavahi-client.so
%if_with mdns
%_libdir/libdns_sd.so
%endif
%if_with howl
%_libdir/libhowl.so
%endif
%_includedir/avahi-client/
%_includedir/avahi-common/
%_includedir/avahi-core/
%if_with howl
%_includedir/avahi-compat-howl/
%endif
%if_with mdns
%_includedir/avahi-compat-libdns_sd/
%endif
%_libdir/pkgconfig/avahi-core.pc
%_libdir/pkgconfig/avahi-client.pc
%if_with howl
%_libdir/pkgconfig/avahi-compat-howl.pc
%endif
%if_with mdns
%_libdir/pkgconfig/avahi-compat-libdns_sd.pc
%endif

%files -n lib%name-glib
%_libdir/libavahi-glib.so.*

%files -n lib%name-glib-devel
%_libdir/libavahi-glib.so
%attr(0755,root,root) %dir %_includedir/avahi-glib
%_includedir/avahi-glib/*
%_libdir/pkgconfig/avahi-glib.pc

%files -n lib%name-qt3
%_libdir/libavahi-qt3.so.*
%_libdir/pkgconfig/avahi-qt3.pc

%files -n lib%name-qt3-devel
%defattr(-, root, root, 0644)
%_libdir/libavahi-qt3.so
%attr(0755,root,root) %dir %_includedir/avahi-qt3
%_includedir/avahi-qt3/*

%files -n lib%name-qt4
%_libdir/libavahi-qt4.so.*
%_libdir/pkgconfig/avahi-qt4.pc

%files -n lib%name-qt4-devel
%defattr(-, root, root, 0644)
%_libdir/libavahi-qt4.so
%attr(0755,root,root) %dir %_includedir/avahi-qt4
%_includedir/avahi-qt4/*

%files -n lib%name-ui
%_libdir/libavahi-ui.so.*

%files -n lib%name-ui-devel
%_libdir/libavahi-ui.so
%attr(0755,root,root) %dir %_includedir/avahi-ui
%_includedir/avahi-ui/*
%_libdir/pkgconfig/avahi-ui.pc

%if_with python
%files -n python-module-%name
%python_sitelibdir/%name
%endif    


%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin