avahi/avahi.spec

192 lines
5.0 KiB
RPMSpec
Raw Normal View History

Name: avahi
Version: 0.5.2
Release: 2
Summary: local network service discovery
Group: System Environment/Base
License: LGPL
URL: http://www.freedesktop.org/Software/Avahi
Source0: %{name}-%{version}.tar.gz
Patch1: avahi-0.5.2-fedora.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: doxygen, gtk2-devel, qt-devel, libdaemon-devel, dbus-devel, expat-devel, python, dbus-python
Requires: dbus
%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 tools
Summary: tools for mDNS browsing and publishing
Group: System Environment/Base
Requires: %{name} = %{version}
%description tools
Tools that use avahi to browse and publish mDNS services and hosts.
%package glib
Summary: glib libraries for avahi
Group: System Environment/Base
Requires: %{name} = %{version}
%description glib
Libraries for easy use of avahi from glib applications.
%package glib-devel
Summary: libraries and header files for avahi glib development
Group: Development/Libraries
Requires: %{name}-glib = %{version}
Requires: %{name}-devel = %{version}
Requires: glib2-devel
%description glib-devel
The avahi-devel package contains the header files and libraries
necessary for developing programs using avahi with glib.
%package qt3
Summary: Qt3 libraries for avahi
Group: System Environment/Base
Requires: %{name} = %{version}
Requires: %{name}-devel = %{version}
Requires: qt-devel
%description qt3
Libraries for easy use of avahi from Qt3 applications.
%package qt3-devel
Summary: libraries and header files for avahi Qt3 development
Group: Development/Libraries
Requires: %{name}-devel = %{version}
%description qt3-devel
The avahi-devel package contains the header files and libraries
necessary for developing programs using avahi with Qt3.
%package devel
Summary: libraries and header files for avahi development
Group: Development/Libraries
Requires: %{name} = %{version}
%description devel
The avahi-devel package contains the header files and libraries
necessary for developing programs using avahi.
%define avahi_user_uid 70
%prep
%setup -q
%patch1 -p1 -b .fedora
%build
# auto* update needed for avahi-0.5.2-fedora.patch
aclocal -I common
libtoolize --force
automake-1.9 --add-missing
autoconf
%configure --with-distro=fedora --disable-qt4 --disable-mono --disable-mono-docs --with-avahi-user=avahi --with-avahi-group=avahi
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
# remove example
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/avahi/services/ssh.service
# remove desktop file for avahi-discover
rm -f $RPM_BUILD_ROOT%{_datadir}/applications/avahi-discover.desktop
%clean
rm -rf $RPM_BUILD_ROOT
%pre
# Add the "avahi" user
/usr/sbin/useradd -c 'Avahi daemon' -u %{avahi_user_uid} \
-s /sbin/nologin -r -d '/' avahi 2> /dev/null || :
%post
/sbin/ldconfig
# We should realy makee dbus reload the system.d config here. Dunno how though.
/sbin/chkconfig --add avahi-daemon
%postun
/sbin/ldconfig
%preun
if [ $1 = 0 ]; then
service avahi-daemon stop > /dev/null 2>&1
/sbin/chkconfig --del avahi-daemon
fi
%files
%defattr(-,root,root,-)
%doc docs/* avahi-daemon/example.service avahi-daemon/ssh.service
%{_sysconfdir}/init.d/*
%dir %{_sysconfdir}/avahi
%dir %{_sysconfdir}/avahi/services
%config %{_sysconfdir}/avahi/avahi-daemon.conf
%config %{_sysconfdir}/avahi/avahi-dnsconfd.action
%config %{_sysconfdir}/dbus-1/system.d/avahi-dbus.conf
%{_sbindir}/*
%{_libdir}/libavahi-common.so*
%{_libdir}/libavahi-core.so*
%{_libdir}/libavahi-client.so*
%{_datadir}/avahi
%exclude %{_datadir}/avahi/interfaces
%{_mandir}/man5/*
%{_mandir}/man8/*
%files tools
%defattr(-, root, root)
%{_bindir}/*
2005-10-25 08:05:10 +00:00
# These are .py files only, so they don't go in lib64
%{_prefix}/lib/python2.4/site-packages/*
%{_mandir}/man1/*
%{_datadir}/avahi/interfaces
%files devel
%defattr(-, root, root)
%{_libdir}/libavahi-common.so
%{_libdir}/libavahi-core.so
%{_libdir}/libavahi-client.so
%{_includedir}/avahi-client
%{_includedir}/avahi-common
%{_includedir}/avahi-core
%{_libdir}/pkgconfig/*
%files glib
%defattr(-, root, root)
%{_libdir}/libavahi-glib.so*
%files glib-devel
%defattr(-, root, root)
%{_libdir}/libavahi-glib.so
%{_includedir}/avahi-glib
%files qt3
%defattr(-, root, root)
%{_libdir}/libavahi-qt3.so*
%files qt3-devel
%defattr(-, root, root)
%{_libdir}/libavahi-qt3.so
%{_includedir}/avahi-qt3
%changelog
* Wed Oct 26 2005 Karsten Hopp <karsten@redhat.de> 0.5.2-2
- add buildrequires dbus-python
* Fri Oct 21 2005 Alexander Larsson <alexl@redhat.com> - 0.5.2-1
- Initial package