%define name openslp %define version 1.0.10 %define release 1mdk %define major 1 %define libname lib%{name}%{major} Name: %name Version: %version Release: %release Summary: OpenSLP implementation of Service Location Protocol V2 License: BSD-like Group: Networking/Other PreReq: /sbin/chkconfig, /sbin/service, rpm-helper Packager: Yves Duret <yves@zarb.org> URL: http://www.openslp.org/ BuildRoot: %{_tmppath}/%{name}-root Source0: ftp://openslp.org/pub/openslp/%{name}-%{version}/%{name}-%{version}.tar.bz2 %Description Service Location Protocol is an IETF standards track protocol that provides a framework to allow networking applications to discover the existence, location, and configuration of networked services in enterprise networks. OpenSLP is an open source implementation of the SLPv2 protocol as defined by RFC 2608 and RFC 2614. This package include the daemon, libraries, header files and documentation %package -n %{libname} Summary: OpenSLP implementation of Service Location Protocol V2 Group: System/Libraries Requires: %name = %version-%release %description -n %{libname} Service Location Protocol is an IETF standards track protocol that provides a framework to allow networking applications to discover the existence, location, and configuration of networked services in enterprise networks. OpenSLP is an open source implementation of the SLPv2 protocol as defined by RFC 2608 and RFC 2614. This package include the daemon, libraries, header files and documentation This package contains the %libname runtime library. %package -n %{libname}-devel Summary: Development tools for programs which will use the %{name} library Group: Development/C Requires: %{libname} = %version-%release Provides: %{name}-devel = %version-%release Provides: lib%{name}-devel = %version-%release %description -n %{libname}-devel The %{name}-devel package includes the header files and static libraries necessary for developing programs using the %{name} library. If you are going to develop programs, you should install %{name}-devel. You'll also need to have the %{name} package installed. %prep %setup -q %build %serverbuild %configure %make %install %makeinstall_std #fix doc mv %buildroot/%_usr/doc/openslp-1.0.10/ installeddoc rm -rf `find installeddoc -name CVS` chmod -R 0755 installeddoc mkdir -p %buildroot/%_sysconfdir/sysconfig/daemons cat <<EOF > %buildroot/%_sysconfdir/sysconfig/daemons/slpd IDENT=slp DESCRIPTIVE="SLP Service Agent" ONBOOT="yes" EOF mkdir -p %buildroot/%_sysconfdir/rc.d/init.d install -m 755 etc/slpd.all_init %buildroot/%_sysconfdir/rc.d/init.d/slpd %clean rm -rf %buildroot %post %_post_service slpd %PreUn %_preun_service slpd %post -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig %Files %defattr(-,root,root) %doc installeddoc/* %config(noreplace) %_sysconfdir/slp.conf %config(noreplace) %_sysconfdir/slp.reg %config(noreplace) %_sysconfdir/slp.spi %config(noreplace) %_sysconfdir/sysconfig/daemons/slpd %config(noreplace) %_initrddir/slpd %_sbindir/slpd %_bindir/slptool %files -n %{libname} %defattr(-,root,root) %doc AUTHORS COPYING %_libdir/*.so.* %files -n %{libname}-devel %defattr(-,root,root) %doc ChangeLog COPYING %_libdir/*a %_libdir/*.so %_includedir/* %changelog * Fri Jan 10 2003 Yves Duret <yves@zarb.org> 1.0.10-1mdk - first mandrake version * Wed Feb 06 2002 alain.richard@equation.fr Adapted to enable build under redhat 7.x (uses BuildRoot macro, install instead of installtool for non libraries objects, protected rm -r for install & clean) * Wed Jun 13 2001 matt@caldera.com Removed server stuff. We want on binary rpm again * Wed Jul 17 2000 mpeterson@calderasystems.com Added lisa stuff * Thu Jul 7 2000 david.mccormack@ottawa.com Made it work with the new autoconf/automake scripts. * Wed Apr 27 2000 mpeterson started