avahi/avahi.spec

430 lines
14 KiB
RPMSpec
Raw Normal View History

%{?!WITH_MONO: %define WITH_MONO 1}
%ifarch ppc64
%define WITH_MONO 0
%endif
Name: avahi
2006-03-08 01:09:51 +00:00
Version: 0.6.9
Release: 1
2005-11-14 21:50:58 +00:00
Summary: Local network service discovery
Group: System Environment/Base
License: LGPL
2006-01-09 16:25:30 +00:00
URL: http://avahi.org
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: doxygen, gtk2-devel, qt-devel, libglade2-devel, libdaemon-devel, glib-devel, libcap-devel, dbus-devel, expat-devel, python, dbus-python, gdbm-devel pygtk2
%if %{WITH_MONO}
BuildRequires: mono-devel >= 1.1.13
%endif
Requires: dbus, libdaemon, expat, python, dbus-python, libcap
2006-02-23 17:21:13 +00:00
Requires(post): initscripts, chkconfig, ldconfig
Obsoletes: howl, howl-libs
Source0: %{name}-%{version}.tar.gz
Patch1: avahi-0.5.2-fedora.patch
2005-11-14 21:50:58 +00:00
Patch2: avahi-0.5.2-start_after_dbus.patch
2005-11-30 19:37:42 +00:00
Patch3: avahi-0.6-initscript_status.patch
Patch4: avahi-0.6-dbus-0.6.patch
2006-01-09 19:54:38 +00:00
Patch5: avahi-0.6.3-bz177148.patch
2006-01-12 22:49:32 +00:00
# enable mono's mcs to work in beehive buildroot:
Patch6: avahi-0.6.3-MONO_SHARED_DIR.patch
Patch7: avahi-0.6.4-initscript-i18n.patch
Patch8: avahi-0.6.3-lockfile.patch
2006-01-24 00:51:30 +00:00
Patch9: avahi-0.6.4-localtime.patch
Patch10: avahi-0.6.4-bz178784.patch
Patch11: avahi-0.6.5-bz179448.patch
Patch12: avahi-0.6.7-initscript.patch
%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
2005-11-14 21:50:58 +00:00
Summary: Tools for mDNS browsing and publishing
Group: System Environment/Base
2006-01-12 20:53:31 +00:00
Requires: %{name} = %{version}, gtk2, pygtk2, libglade2, pygtk2-libglade, gdbm
%description tools
Tools that use avahi to browse and publish mDNS services and hosts.
%package glib
2005-11-14 21:50:58 +00:00
Summary: Glib libraries for avahi
Group: System Environment/Base
Requires: %{name} = %{version}
2005-11-22 18:20:55 +00:00
Requires: glib2
%description glib
Libraries for easy use of avahi from glib applications.
%package glib-devel
2005-11-14 21:50:58 +00:00
Summary: Libraries and header files for avahi glib development
Group: Development/Libraries
Requires: %{name}-devel = %{version}
2005-11-22 18:20:55 +00:00
Requires: %{name}-glib = %{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}
2005-11-22 18:20:55 +00:00
Requires: qt
%description qt3
Libraries for easy use of avahi from Qt3 applications.
%package qt3-devel
2005-11-14 21:50:58 +00:00
Summary: Libraries and header files for avahi Qt3 development
Group: Development/Libraries
Requires: %{name}-devel = %{version}
2005-11-22 18:20:55 +00:00
Requires: %{name}-qt3 = %{version}
Requires: qt-devel
%description qt3-devel
2006-01-12 20:53:31 +00:00
The avahi-qt3-devel package contains the header files and libraries
necessary for developing programs using avahi with Qt3.
%if %{WITH_MONO}
2006-01-12 20:53:31 +00:00
%package sharp
Summary: Mono language bindings for avahi mono development
Group: Development/Libraries
Requires: %{name}-devel = %{version}
2006-01-13 16:03:23 +00:00
Requires: mono-core >= 1.1.13
2006-01-12 20:53:31 +00:00
%description sharp
The avahi-sharp package contains the files needed to develop
mono programs that use avahi.
%endif
2006-01-12 20:53:31 +00:00
%package devel
2005-11-14 21:50:58 +00:00
Summary: Libraries and header files for avahi development
Group: Development/Libraries
Requires: %{name} = %{version}
Obsoletes: howl-devel
%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
2005-11-21 21:56:55 +00:00
#%patch1 -p1 -b .fedora
#^- this patch now upstream
#%patch2 -p1 -b .start_after_dbus
#^- this patch now upstream
#%patch3 -p1 -b .initscript_status
#^- this patch now upstream
2006-01-09 16:25:30 +00:00
#%patch4 -p1 -b .dbus-0.6
#^- this patch now upstream
#%patch5 -p1 -b .bz177148
#^- this patch now upstream
%if %{WITH_MONO}
2006-01-12 22:49:32 +00:00
%patch6 -p1 -b .MONO_SHARED_DIR
%endif
#%patch7 -p1 -b .i18n
#^- this patch now upstream
#%patch8 -p1 -b .lockfile
#^- this patch now upstream
#%patch9 -p1 -b .localtime
#^- this patch now upstream
#%patch10 -p1 -b .bz178746
#^- this patch now upstream
#%patch11 -p1 -b .bz179448
#^- this patch now upstream
%patch12 -p1 -b .initscript
%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-monodoc --without-python-twisted --with-avahi-user=avahi --with-avahi-group=avahi --enable-compat-howl --enable-compat-libdns_sd \
%if ! %{WITH_MONO}
--disable-mono \
%endif
;
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
2005-11-14 21:50:58 +00:00
# create /var/run/avahi-daemon to ensure correct selinux policy for it:
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/avahi-daemon
2005-11-30 19:37:42 +00:00
# remove the documentation directory - let \%doc handle it:
rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}
2005-12-02 20:41:01 +00:00
# remove avahi-bookmarks - unusable without python-twisted,
# which has been judged dangerous and is removed from the
# Fedora Core distribution:
rm -f $RPM_BUILD_ROOT/%{_bindir}/avahi-bookmarks $RPM_BUILD_ROOT/%{_mandir}/man1/avahi-bookmarks*
#
# move initscripts into /etc/rc.d/init.d :
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d
mv $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/* $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d
rm -rf $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/*
#
# Make /etc/avahi/etc/localtime owned by avahi:
mkdir -p $RPM_BUILD_ROOT/etc/avahi/etc
touch $RPM_BUILD_ROOT/etc/avahi/etc/localtime
2005-12-02 20:41:01 +00:00
:;
%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
if [ "$1" -eq 1 ]; then
2005-12-09 21:27:55 +00:00
if ! /sbin/chkconfig --list avahi-daemon >/dev/null 2>&1 ; then
# if user has not configured avahi service at all
/sbin/chkconfig --add avahi-daemon >/dev/null 2>&1
fi;
if ! /sbin/chkconfig --list avahi-dnsconfd >/dev/null 2>&1 ; then
# avahi-dnsconfd NOT run by default in any runlevel; add it
# so system-config-services can see it
/sbin/chkconfig --add avahi-dnsconfd >/dev/null 2>&1
fi;
# We should realy make dbus reload the system.d config here. Dunno how though.
# kill -HUP `cat /var/run/messagebus.pid` ?
if [ -s /etc/localtime ]; then
cp -fp /etc/localtime /etc/avahi/etc/localtime || :;
fi;
elif [ "$1" -gt 1 ]; then
2005-12-09 21:27:55 +00:00
if ! /sbin/chkconfig --list avahi-daemon >/dev/null 2>&1 ; then
# if user has not configured avahi service at all
# reset initscript run order:
LC_ALL=C /sbin/chkconfig --levels=0123456 avahi-daemon reset >/dev/null 2>&1
fi;
# pre 0.5.2-3, avahi-daemon initscript had 'chkconfig: 345 34 66',
# so it got started AFTER messagebus ( 97 ) and was unable to start.
# It now has 'chkconfig: 345 98 02'.
/sbin/service avahi-daemon condrestart >/dev/null 2>&1
/sbin/service avahi-dnsconfd condrestart >/dev/null 2>&1
fi;
2005-11-14 21:50:58 +00:00
%postun -p /sbin/ldconfig
%preun
2005-11-14 21:50:58 +00:00
if [ "$1" -eq 0 ]; then
service avahi-daemon stop > /dev/null 2>&1
/sbin/chkconfig --del avahi-daemon
service avahi-dnsconfd stop >/dev/null 2>&1
/sbin/chkconfig --del avahi-dnsconfd
fi
2005-11-14 21:50:58 +00:00
%post glib -p /sbin/ldconfig
%postun glib -p /sbin/ldconfig
%post qt3 -p /sbin/ldconfig
%postun qt3 -p /sbin/ldconfig
%files
2005-12-05 20:09:44 +00:00
%defattr(0644,root,root,0755)
%doc docs/* avahi-daemon/example.service avahi-daemon/ssh.service
%attr(755,root,root) %{_sysconfdir}/rc.d/init.d/*
2005-12-05 20:09:44 +00:00
%dir %{_sysconfdir}/avahi
%dir %{_sysconfdir}/avahi/etc
%ghost %{_sysconfdir}/avahi/etc/localtime
%{_sysconfdir}/avahi/hosts
2005-12-05 20:09:44 +00:00
%dir %{_sysconfdir}/avahi/services
%dir %{_localstatedir}/run/avahi-daemon
%config %{_sysconfdir}/avahi/avahi-daemon.conf
%config %{_sysconfdir}/avahi/avahi-dnsconfd.action
%config %{_sysconfdir}/dbus-1/system.d/avahi-dbus.conf
2005-11-14 21:50:58 +00:00
%attr(755,root,root) %{_sbindir}/*
%attr(755,root,root) %{_libdir}/libavahi-common.so.*
%attr(755,root,root) %{_libdir}/libavahi-core.so.*
%attr(755,root,root) %{_libdir}/libavahi-client.so.*
2005-12-07 18:49:56 +00:00
%attr(755,root,root) %{_libdir}/libhowl.so.*
%attr(755,root,root) %{_libdir}/libdns_sd.so.*
2005-11-14 21:50:58 +00:00
%attr(755,root,root) %{_datadir}/avahi
%exclude %{_datadir}/avahi/interfaces
%{_mandir}/man5/*
%{_mandir}/man8/*
%files tools
2005-12-05 20:09:44 +00:00
%defattr(0755, root, root, 0755)
%{_bindir}/*
2005-10-25 08:05:10 +00:00
# These are .py files only, so they don't go in lib64
2005-12-05 20:09:44 +00:00
%{_prefix}/lib/python2.4/site-packages/*
%attr(0644,root,root) %{_mandir}/man1/*
%{_datadir}/avahi/interfaces/
%files devel
2005-12-05 20:09:44 +00:00
%defattr(0644, root, root, 0755)
2005-11-14 21:50:58 +00:00
%attr(755,root,root) %{_libdir}/libavahi-common.so
%attr(755,root,root) %{_libdir}/libavahi-core.so
%attr(755,root,root) %{_libdir}/libavahi-client.so
2005-12-07 18:49:56 +00:00
%attr(755,root,root) %{_libdir}/libhowl.so
%attr(755,root,root) %{_libdir}/libdns_sd.so
%{_includedir}/avahi-client
%{_includedir}/avahi-common
%{_includedir}/avahi-core
%{_includedir}/avahi-compat-howl
%{_includedir}/avahi-compat-libdns_sd
2005-11-14 21:50:58 +00:00
%{_libdir}/pkgconfig/avahi-core.pc
%{_libdir}/pkgconfig/avahi-client.pc
2005-11-21 21:56:55 +00:00
%{_libdir}/pkgconfig/avahi-compat-howl.pc
%{_libdir}/pkgconfig/avahi-compat-libdns_sd.pc
%files glib
2005-12-05 20:09:44 +00:00
%defattr(0755, root, root, 0755)
2005-11-14 21:50:58 +00:00
%{_libdir}/libavahi-glib.so.*
%files glib-devel
2005-12-07 18:49:56 +00:00
%defattr(0644, root, root, 0755)
2005-11-14 21:50:58 +00:00
%attr(755,root,root) %{_libdir}/libavahi-glib.so
2005-12-07 18:49:56 +00:00
%{_includedir}/avahi-glib
2005-11-22 18:20:55 +00:00
%{_libdir}/pkgconfig/avahi-glib.pc
%files qt3
2005-12-05 20:09:44 +00:00
%defattr(0644, root, root, 0755)
%attr(755,root,root) %{_libdir}/libavahi-qt3.so.*
2005-11-14 21:50:58 +00:00
%{_libdir}/pkgconfig/avahi-qt3.pc
%files qt3-devel
2005-12-07 18:49:56 +00:00
%defattr(0644, root, root, 0755)
2005-11-14 21:50:58 +00:00
%attr(755,root,root) %{_libdir}/libavahi-qt3.so
2005-12-07 18:49:56 +00:00
%{_includedir}/avahi-qt3
%if %{WITH_MONO}
2006-01-12 20:53:31 +00:00
%files sharp
%defattr(0644, root, root, 0755)
2006-01-18 20:12:49 +00:00
%{_libdir}/mono/avahi-sharp
%{_libdir}/mono/gac/avahi-sharp
%{_libdir}/pkgconfig/avahi-sharp.pc
%endif
2006-01-12 20:53:31 +00:00
%changelog
2006-03-08 01:09:51 +00:00
* Tue Mar 07 2006 Jason Vas Dias <jvdias@redhat.com> - 0.6.9-1
- Upgrade to upstream version 0.6.9
2006-02-23 17:21:13 +00:00
* Thu Feb 23 2006 Jason Vas Dias <jvdias@redhat.com> - 0.6.8-1
- Upgrade to upstream version 0.6.8
- fix bug 182462: +Requires(post): initscripts, chkconfig, ldconfig
* Fri Feb 17 2006 Jason Vas Dias <jvdias@redhat.com> - 0.6.7-1
- Upgrade to upstream version 0.6.7
2006-02-23 17:21:13 +00:00
* Fri Feb 17 2006 Karsten Hopp <karsten@redhat.de> - 0.6.6-4
- BuildRequires pygtk2
2006-02-11 02:03:58 +00:00
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 0.6.6-3.1
- bump again for double-long bug on ppc(64)
2006-02-10 20:50:41 +00:00
* Fri Feb 10 2006 Jason Vas Dias <jvdias@redhat.com> - 0.6.6-3
- rebuild for new gcc (again)
- further fix for bug 178746: fix avahi-dnsconfd initscript
* Tue Feb 07 2006 Jason Vas Dias <jvdias@redhat.com> - 0.6.6-2
- rebuild for new gcc, glibc, glibc-kernheaders
* Wed Feb 01 2006 Jason Vas Dias <jvdias@redhat.com> - 0.6.6-1
- fix bug 179448: mis-alignment of input cmsghdr msg->msg_control buffer on ia64
- Upgrade to 0.6.6
* Thu Jan 26 2006 Jason Vas Dias <jvdias@redhat.com> - 0.6.5-1
- Upgrade to upstream version 0.6.5
- Make /etc/avahi/etc and /etc/avahi/etc/localtime owned by avahi
package; copy system localtime into chroot in post
2006-01-24 00:51:30 +00:00
* Mon Jan 23 2006 Jason Vas Dias <jvdias@redhat.com> - 0.6.4-4
- fix bug 178689: copy localtime to chroot
- fix bug 178784: fix avahi-dnsconfd initscript
* Fri Jan 20 2006 Peter Jones <pjones@redhat.com> - 0.6.4-3
- fix subsystem locking in the initscript
* Thu Jan 19 2006 Jason Vas Dias <jvdias@redhat.com> - 0.6.4-2
- fix bug 178127: fully localize the initscript
* Mon Jan 16 2006 Jason Vas Dias <jvdias@redhat.com> - 0.6.4-1
- Upgrade to upstream version 0.6.4
2006-01-12 20:53:31 +00:00
* Thu Jan 12 2006 Jason Vas Dias <jvdias@redhat.com> - 0.6.3-2
- fix bug 177610: Enable mono support with new avahi-sharp package
- fix bug 177609: add gdbm / gdbm-devel Requires for avahi-browse
2006-01-09 16:25:30 +00:00
* Mon Jan 09 2006 Jason Vas Dias <jvdias@redhat.com> - 0.6.3-1
- Upgrade to upstream version 0.6.3
2006-01-09 19:54:38 +00:00
- fix bug 177148: initscript start should not fail if avahi-daemon running
* Thu Dec 22 2005 Jason Vas Dias <jvdias@redhat.com> - 0.6.1-3
- move initscripts from /etc/init.d to /etc/rc.d/init.d
2005-12-09 22:39:44 +00:00
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
- rebuilt
2005-12-09 21:27:55 +00:00
* Fri Dec 09 2005 Jason Vas Dias<jvdias@redhat.com> - 0.6.1-2
- fix bug 175352: Do not chkconfig --add avahi-daemon
if user has already configured it
* Wed Dec 07 2005 Jason Vas Dias<jvdias@redhat.com> - 0.6.1-1
2005-12-07 18:49:56 +00:00
- Upgrade to 0.6.1
2005-12-05 20:09:44 +00:00
* Mon Dec 05 2005 Jason Vas Dias<jvdias@redhat.com> - 0.6-6
- fix bug 174799 - fix .spec file \%files permissions
2005-12-02 20:41:01 +00:00
* Fri Dec 02 2005 Jason Vas Dias<jvdias@redhat.com> - 0.6-5
- python-twisted has been removed from the FC-5 distribution - disable its use
* Thu Dec 01 2005 Jason Vas Dias<jvdias@redhat.com> - 0.6-4
- Rebuild for dbus-0.6 - remove use of DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT
2005-11-30 19:37:42 +00:00
* Wed Nov 30 2005 Jason Vas Dias<jvdias@redhat.com> - 0.6-3
- fix bug 172047 - tools should require python-twisted
- fix bug 173985 - docs directory permissions
2005-11-21 21:56:55 +00:00
* Mon Nov 21 2005 Jason Vas Dias<jvdias@redhat.com> - 0.6-1
- Upgrade to upstream version 0.6 - now provides 'avahi-howl-compat'
libraries / includes.
2005-11-14 21:50:58 +00:00
* Mon Nov 14 2005 Jason Vas Dias<jvdias@redhat.com> - 0.5.2-7
- fix bug 172034: fix ownership of /var/run/avahi-daemon/
- fix bug 172772: .spec file improvements from matthias@rpmforge.net
* Mon Oct 31 2005 Jason Vas Dias<jvdias@redhat.com> - 0.5.2-6
- put back avahi-devel Obsoletes: howl-devel
* Mon Oct 31 2005 Alexander Larsson <alexl@redhat.com> - 0.5.2-5
- Obsoletes howl, howl-libs, as we want to get rid of them on updates
- No provides yet, as the howl compat library is in Avahi 0.6.0.
2005-10-30 07:04:56 +00:00
* Sun Oct 30 2005 Florian La Roche <laroche@redhat.com>
- disable the Obsoletes: howl until the transition is complete
* Fri Oct 28 2005 Jason Vas Dias<jvdias@redhat.com> - 0.5.2-3
- change initscript to start avahi-daemon AFTER messagebus
* 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