2006-12-18 23:17:15 +00:00
|
|
|
#
|
2011-11-16 14:20:43 +00:00
|
|
|
# spec file for package openslp
|
2006-12-18 23:17:15 +00:00
|
|
|
#
|
2016-09-12 12:26:21 +00:00
|
|
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
2006-12-18 23:17:15 +00:00
|
|
|
#
|
2008-08-21 16:49:33 +00:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2006-12-18 23:17:15 +00:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: openslp
|
2012-02-08 20:18:39 +00:00
|
|
|
BuildRequires: bison
|
|
|
|
BuildRequires: flex
|
|
|
|
BuildRequires: libtool
|
|
|
|
BuildRequires: openssl-devel
|
2011-12-23 22:23:29 +00:00
|
|
|
%if 0%{?suse_version} > 1140
|
2014-09-01 13:58:21 +00:00
|
|
|
BuildRequires: pkgconfig
|
2014-07-28 03:30:41 +00:00
|
|
|
BuildRequires: pkgconfig(libsystemd-daemon)
|
2012-10-18 14:49:46 +00:00
|
|
|
BuildRequires: pkgconfig(systemd)
|
2011-12-23 22:23:29 +00:00
|
|
|
%define has_systemd 1
|
|
|
|
%endif
|
2006-12-18 23:17:15 +00:00
|
|
|
Summary: An OpenSLP Implementation of Service Location Protocol V2
|
2011-12-06 17:34:39 +00:00
|
|
|
License: BSD-3-Clause
|
2006-12-18 23:17:15 +00:00
|
|
|
Group: System/Daemons
|
2014-02-19 17:44:41 +00:00
|
|
|
Version: 2.0.0
|
2012-02-08 20:18:39 +00:00
|
|
|
Release: 0
|
2008-03-26 15:26:26 +00:00
|
|
|
Url: http://www.openslp.org/
|
2009-01-09 00:42:35 +00:00
|
|
|
#
|
2006-12-18 23:17:15 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2014-02-19 18:15:04 +00:00
|
|
|
Source0: http://sourceforge.net/projects/openslp/files/2.0.0/%{version}/%name-%version.tar.gz
|
2006-12-18 23:17:15 +00:00
|
|
|
Source1: slpd.init
|
2014-02-19 17:44:41 +00:00
|
|
|
Source2: README.SUSE
|
2006-12-18 23:17:15 +00:00
|
|
|
Source3: openslp.desktop
|
|
|
|
Source4: openslp-devel.desktop
|
|
|
|
Source5: openslp.logrotate
|
2006-12-19 00:35:00 +00:00
|
|
|
Source6: slpd.xml
|
2010-10-15 10:39:37 +00:00
|
|
|
Source7: openslp.SuSEfirewall2
|
|
|
|
Source8: baselibs.conf
|
2011-12-23 22:23:29 +00:00
|
|
|
Source9: slpd.service
|
2014-02-19 17:44:41 +00:00
|
|
|
Patch1: openslp.audit.diff
|
|
|
|
Patch2: extensions.diff
|
|
|
|
Patch3: openslp.truncate.diff
|
|
|
|
Patch4: openslp.netlink.diff
|
|
|
|
Patch5: openslp.initda.diff
|
|
|
|
Patch6: openslp.visibility.diff
|
|
|
|
Patch7: openslp.daemon.diff
|
|
|
|
Patch8: openslp.cloexec.diff
|
|
|
|
Patch9: openslp.hardmtu.diff
|
|
|
|
Patch10: openslp.tcplocal.diff
|
|
|
|
Patch11: openslp.localtime.diff
|
2014-07-28 03:30:41 +00:00
|
|
|
Patch12: openslp.sd_notify.diff
|
2016-09-12 12:26:21 +00:00
|
|
|
Patch13: openslp.predicatestorage.diff
|
|
|
|
Patch14: openslp.doubleequal.diff
|
|
|
|
Patch15: openslp.noconvenience.diff
|
2014-09-01 13:58:21 +00:00
|
|
|
|
2006-12-18 23:17:15 +00:00
|
|
|
%description
|
|
|
|
Service Location Protocol is an IETF standards track protocol that
|
|
|
|
provides a framework that allows 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 includes the slptool
|
|
|
|
and runtime libraries.
|
|
|
|
|
|
|
|
%package server
|
|
|
|
Summary: The OpenSLP Implementation of the Service Location Protocol V2
|
2012-02-08 20:18:39 +00:00
|
|
|
Group: System/Daemons
|
2015-03-18 16:42:50 +00:00
|
|
|
PreReq: /usr/sbin/useradd
|
2012-02-08 20:18:39 +00:00
|
|
|
%if 0%{?has_systemd}
|
|
|
|
%{?systemd_requires}
|
2015-03-18 16:42:50 +00:00
|
|
|
%else
|
|
|
|
PreReq: %fillup_prereq %insserv_prereq
|
2012-02-08 20:18:39 +00:00
|
|
|
%endif
|
2008-11-17 16:38:39 +00:00
|
|
|
Recommends: logrotate
|
2006-12-18 23:17:15 +00:00
|
|
|
|
|
|
|
%description server
|
|
|
|
Service Location Protocol is an IETF standards track protocol that
|
|
|
|
provides a framework that allows networking applications to discover
|
|
|
|
the existence, location, and configuration of networked services in
|
|
|
|
enterprise networks.
|
|
|
|
|
|
|
|
This package contains the SLP server. Every system, which provides any
|
|
|
|
services that should be used via an SLP client must run this server and
|
|
|
|
register the service.
|
|
|
|
|
|
|
|
%package devel
|
2012-08-30 23:50:58 +00:00
|
|
|
Requires: openslp = %version
|
|
|
|
Requires: openssl-devel
|
2006-12-18 23:17:15 +00:00
|
|
|
Summary: OpenSLP Development SDK
|
2012-02-08 20:18:39 +00:00
|
|
|
Group: System/Daemons
|
2006-12-18 23:17:15 +00:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
Service Location Protocol is an IETF standards track protocol that
|
|
|
|
provides a framework that allows networking applications to discover
|
|
|
|
the existence, location, and configuration of networked services in
|
|
|
|
enterprise networks.
|
|
|
|
|
|
|
|
This package contains header and library files to compile applications
|
|
|
|
with SLP support. It also contains developer documentation to develop
|
|
|
|
such applications.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
%patch1
|
|
|
|
%patch2
|
|
|
|
%patch3
|
|
|
|
%patch4
|
|
|
|
%patch5
|
|
|
|
%patch6
|
|
|
|
%patch7
|
|
|
|
%patch8
|
|
|
|
%patch9
|
|
|
|
%patch10
|
|
|
|
%patch11
|
2014-07-28 03:30:41 +00:00
|
|
|
%if 0%{?has_systemd}
|
|
|
|
%patch12
|
|
|
|
%endif
|
2016-09-12 12:26:21 +00:00
|
|
|
%patch13
|
|
|
|
%patch14
|
|
|
|
%patch15
|
2006-12-18 23:17:15 +00:00
|
|
|
%build
|
2009-01-22 12:06:13 +00:00
|
|
|
autoreconf -fiv
|
|
|
|
%configure --disable-static --with-pic --enable-slpv1 \
|
2006-12-18 23:17:15 +00:00
|
|
|
--enable-async-api \
|
|
|
|
--enable-slpv2-security
|
2009-01-22 12:06:13 +00:00
|
|
|
%{__make} %{?jobs:-j%jobs}
|
2006-12-18 23:17:15 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
mkdir -p ${RPM_BUILD_ROOT}/etc/slp.reg.d
|
2010-10-15 10:39:37 +00:00
|
|
|
mkdir -p ${RPM_BUILD_ROOT}/etc/slp.reg.d/slpd
|
2006-12-18 23:17:15 +00:00
|
|
|
cp etc/slp.conf ${RPM_BUILD_ROOT}/etc
|
|
|
|
cp etc/slp.reg ${RPM_BUILD_ROOT}/etc
|
|
|
|
cp etc/slp.spi ${RPM_BUILD_ROOT}/etc
|
|
|
|
mkdir -p ${RPM_BUILD_ROOT}/%_libdir
|
2008-05-09 20:11:17 +00:00
|
|
|
./libtool --mode=install install libslp/libslp.la ${RPM_BUILD_ROOT}/%_libdir
|
2006-12-18 23:17:15 +00:00
|
|
|
mkdir -p ${RPM_BUILD_ROOT}/usr/sbin
|
2008-05-09 20:11:17 +00:00
|
|
|
./libtool --mode=install install slpd/slpd ${RPM_BUILD_ROOT}/usr/sbin
|
2006-12-18 23:17:15 +00:00
|
|
|
mkdir -p ${RPM_BUILD_ROOT}/usr/bin
|
2008-05-09 20:11:17 +00:00
|
|
|
./libtool --mode=install install slptool/slptool ${RPM_BUILD_ROOT}/usr/bin
|
2006-12-18 23:17:15 +00:00
|
|
|
mkdir -p ${RPM_BUILD_ROOT}/usr/include
|
|
|
|
cp libslp/slp.h ${RPM_BUILD_ROOT}/usr/include
|
|
|
|
mkdir -p ${RPM_BUILD_ROOT}%_defaultdocdir/%name
|
|
|
|
find . -name CVS -o -name .cvsignore -o -name .xvpics | xargs rm -rf
|
2014-02-19 17:44:41 +00:00
|
|
|
cp -a AUTHORS COPYING README FAQ doc/doc/rfc doc/doc/html %SOURCE2 \
|
2006-12-18 23:17:15 +00:00
|
|
|
${RPM_BUILD_ROOT}%_defaultdocdir/%name
|
2014-09-01 13:58:21 +00:00
|
|
|
%if 0%{?has_systemd}
|
|
|
|
ln -s %{_sbindir}/service ${RPM_BUILD_ROOT}/usr/sbin/rcslpd
|
|
|
|
ln -s %{_sbindir}/service ${RPM_BUILD_ROOT}/usr/sbin/rcopenslp
|
|
|
|
%else
|
2006-12-18 23:17:15 +00:00
|
|
|
mkdir -p ${RPM_BUILD_ROOT}/etc/init.d/
|
|
|
|
install -m 755 %{SOURCE1} ${RPM_BUILD_ROOT}/etc/init.d/slpd
|
|
|
|
ln -sf ../../etc/init.d/slpd ${RPM_BUILD_ROOT}/usr/sbin/rcslpd
|
|
|
|
ln -sf ../../etc/init.d/slpd ${RPM_BUILD_ROOT}/usr/sbin/rcopenslp
|
2014-07-28 03:30:41 +00:00
|
|
|
%endif
|
2006-12-18 23:17:15 +00:00
|
|
|
install -D -m 0644 %{SOURCE5} ${RPM_BUILD_ROOT}/etc/logrotate.d/openslp-server
|
|
|
|
# install susehelp file
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/usr/share/susehelp/meta/Administration/
|
|
|
|
install -m 0644 %SOURCE3 \
|
|
|
|
$RPM_BUILD_ROOT/usr/share/susehelp/meta/Administration/
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/usr/share/susehelp/meta/Development/Libraries/
|
|
|
|
install -m 0644 %SOURCE4 \
|
|
|
|
$RPM_BUILD_ROOT/usr/share/susehelp/meta/Development/Libraries/
|
2007-01-12 00:31:43 +00:00
|
|
|
install -d -m 755 $RPM_BUILD_ROOT/usr/share/omc/svcinfo.d
|
|
|
|
install -m 0644 %SOURCE6 $RPM_BUILD_ROOT/usr/share/omc/svcinfo.d
|
2006-12-18 23:17:15 +00:00
|
|
|
%if 0
|
|
|
|
# actually, these files should get translated, but do we really want to
|
|
|
|
# add update-desktop-files to needed_for_build ?
|
|
|
|
%suse_update_desktop_file $RPM_BUILD_ROOT/usr/share/susehelp/meta/Administration/openslp.desktop
|
|
|
|
%suse_update_desktop_file $RPM_BUILD_ROOT/usr/share/susehelp/meta/Development/Libraries/openslp-devel.desktop
|
|
|
|
%endif
|
2009-01-22 12:06:13 +00:00
|
|
|
%{__rm} -f %{buildroot}%{_libdir}/*.la
|
2010-10-15 10:39:37 +00:00
|
|
|
%if 0%{?suse_version}
|
|
|
|
install -D -m 644 %{S:7} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/openslp
|
|
|
|
%endif
|
2006-12-18 23:17:15 +00:00
|
|
|
|
2011-12-23 22:23:29 +00:00
|
|
|
%if 0%{?has_systemd}
|
|
|
|
install -D -m 644 %{S:9} %{buildroot}%{_unitdir}/slpd.service
|
|
|
|
%endif
|
2011-11-16 14:20:43 +00:00
|
|
|
|
2012-08-30 23:50:58 +00:00
|
|
|
#XXX test suite requires root
|
2014-02-19 17:44:41 +00:00
|
|
|
#check
|
2012-08-30 23:50:58 +00:00
|
|
|
#make check
|
|
|
|
|
2008-11-17 16:38:39 +00:00
|
|
|
%post -p /sbin/ldconfig
|
2006-12-18 23:17:15 +00:00
|
|
|
|
2008-11-17 16:38:39 +00:00
|
|
|
%postun -p /sbin/ldconfig
|
2006-12-18 23:17:15 +00:00
|
|
|
|
2011-03-01 17:47:39 +00:00
|
|
|
%pre server
|
|
|
|
/usr/sbin/useradd -r -g daemon -d /var/lib/empty -s /sbin/nologin -c "openslp daemon" openslp 2>/dev/null || :
|
2011-12-23 22:23:29 +00:00
|
|
|
%if 0%{?has_systemd}
|
|
|
|
%service_add_pre slpd.service
|
|
|
|
%endif
|
2011-03-01 17:47:39 +00:00
|
|
|
|
2006-12-18 23:17:15 +00:00
|
|
|
%post server
|
2011-12-23 22:23:29 +00:00
|
|
|
%if 0%{?has_systemd}
|
|
|
|
%service_add_post slpd.service
|
2014-07-28 03:30:41 +00:00
|
|
|
%else
|
|
|
|
%{fillup_and_insserv slpd}
|
2011-12-23 22:23:29 +00:00
|
|
|
%endif
|
2006-12-18 23:17:15 +00:00
|
|
|
|
|
|
|
%postun server
|
2011-12-23 22:23:29 +00:00
|
|
|
%if 0%{?has_systemd}
|
|
|
|
%service_del_postun slpd.service
|
2014-07-28 03:30:41 +00:00
|
|
|
%else
|
|
|
|
%restart_on_update slpd
|
|
|
|
%insserv_cleanup
|
2011-12-23 22:23:29 +00:00
|
|
|
%endif
|
2006-12-18 23:17:15 +00:00
|
|
|
|
|
|
|
%preun server
|
2011-12-23 22:23:29 +00:00
|
|
|
%if 0%{?has_systemd}
|
|
|
|
%service_del_preun slpd.service
|
2014-07-28 03:30:41 +00:00
|
|
|
%else
|
|
|
|
%stop_on_removal slpd
|
2011-12-23 22:23:29 +00:00
|
|
|
%endif
|
2006-12-18 23:17:15 +00:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir %_defaultdocdir/%name
|
|
|
|
%dir %_defaultdocdir/%name/html
|
|
|
|
%doc %_defaultdocdir/%name/AUTHORS
|
|
|
|
%doc %_defaultdocdir/%name/COPYING
|
|
|
|
%doc %_defaultdocdir/%name/README
|
2014-02-19 17:44:41 +00:00
|
|
|
%doc %_defaultdocdir/%name/README.SUSE
|
2006-12-18 23:17:15 +00:00
|
|
|
%_libdir/libslp.so.*
|
2015-03-18 16:42:50 +00:00
|
|
|
%{_bindir}/slptool
|
2006-12-18 23:17:15 +00:00
|
|
|
%config(noreplace) /etc/slp.conf
|
|
|
|
%config(noreplace) /etc/slp.spi
|
|
|
|
|
|
|
|
%files server
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir /usr/share/susehelp
|
|
|
|
%dir /usr/share/susehelp/meta
|
|
|
|
%dir /usr/share/susehelp/meta/Administration
|
2013-07-16 11:44:35 +00:00
|
|
|
%doc %_defaultdocdir/%name/FAQ
|
2006-12-18 23:17:15 +00:00
|
|
|
%doc %_defaultdocdir/%name/html/IntroductionToSLP
|
|
|
|
%doc %_defaultdocdir/%name/html/UsersGuide
|
|
|
|
%doc %_defaultdocdir/%name/html/faq.html
|
|
|
|
%doc %_defaultdocdir/%name/rfc
|
|
|
|
%doc /usr/share/susehelp/meta/Administration/openslp.desktop
|
|
|
|
%dir /etc/slp.reg.d/
|
2010-10-15 10:39:37 +00:00
|
|
|
%dir /etc/slp.reg.d/slpd
|
2006-12-18 23:17:15 +00:00
|
|
|
/usr/sbin/rcopenslp
|
|
|
|
/usr/sbin/rcslpd
|
|
|
|
/usr/sbin/slpd
|
|
|
|
%config(noreplace) /etc/slp.reg
|
|
|
|
%config(noreplace) /etc/logrotate.d/openslp-server
|
2007-01-12 00:31:43 +00:00
|
|
|
/usr/share/omc/svcinfo.d/slpd.xml
|
2010-10-15 10:39:37 +00:00
|
|
|
%if 0%{?suse_version} > 0
|
|
|
|
%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/openslp
|
|
|
|
%endif
|
2011-12-23 22:23:29 +00:00
|
|
|
%if 0%{?has_systemd}
|
|
|
|
%{_unitdir}/slpd.service
|
2014-07-28 03:30:41 +00:00
|
|
|
%else
|
|
|
|
%config /etc/init.d/slpd
|
2011-12-23 22:23:29 +00:00
|
|
|
%endif
|
2006-12-18 23:17:15 +00:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir /usr/share/susehelp
|
|
|
|
%dir /usr/share/susehelp/meta
|
|
|
|
%dir /usr/share/susehelp/meta/Development
|
|
|
|
%dir /usr/share/susehelp/meta/Development/Libraries
|
|
|
|
%doc %_defaultdocdir/%name/html/ProgrammersGuide
|
|
|
|
%doc /usr/share/susehelp/meta/Development/Libraries/openslp-devel.desktop
|
|
|
|
/usr/include/slp.h
|
|
|
|
%_libdir/libslp.so
|
|
|
|
|
2007-03-29 16:23:18 +00:00
|
|
|
%changelog
|