port from sysv5 to systemd [release 2.0.0-3mamba;Sat Apr 22 2023]

This commit is contained in:
Silvan Calarco 2024-01-06 08:15:47 +01:00
parent 6ac29f65c2
commit 48bd3525d2
2 changed files with 32 additions and 8 deletions

11
openslp.service Normal file
View File

@ -0,0 +1,11 @@
[Unit]
Description=Service Location Protocol
After=network.target
[Service]
Type=forking
ExecStart=/usr/sbin/slpd -c /etc/slp/slp.conf -r /etc/slp/slp.reg -s /etc/slp/slp.spi
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=network.target

View File

@ -1,6 +1,6 @@
Name: openslp Name: openslp
Version: 2.0.0 Version: 2.0.0
Release: 2mamba Release: 3mamba
Summary: An open-source implementation of Service Location Protocol Summary: An open-source implementation of Service Location Protocol
Group: System/Servers Group: System/Servers
Vendor: openmamba Vendor: openmamba
@ -8,13 +8,13 @@ Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it> Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.openslp.org URL: http://www.openslp.org
Source: http://downloads.sourceforge.net/sourceforge/openslp/%{name}-%{version}.tar.gz Source: http://downloads.sourceforge.net/sourceforge/openslp/%{name}-%{version}.tar.gz
Source1: openslp.service
Patch0: %{name}-1.2.1-optflags.patch Patch0: %{name}-1.2.1-optflags.patch
Patch1: %{name}-1.2.1-export_slp_net_symbols Patch1: %{name}-1.2.1-export_slp_net_symbols
Patch2: openslp-2.0.0-openssl-1.1.patch Patch2: openslp-2.0.0-openssl-1.1.patch
License: BSD License: BSD
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel BuildRequires: glibc-devel
BuildRequires: ldconfig
BuildRequires: libe2fs-devel BuildRequires: libe2fs-devel
BuildRequires: libkrb5-devel BuildRequires: libkrb5-devel
BuildRequires: libnsl-devel BuildRequires: libnsl-devel
@ -26,7 +26,6 @@ BuildRequires: flex
BuildRequires: bison BuildRequires: bison
BuildRequires: libtool BuildRequires: libtool
Requires: libopenslp = %{?epoch:%epoch:}%{version}-%{release} Requires: libopenslp = %{?epoch:%epoch:}%{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description %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. 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.
@ -53,7 +52,7 @@ This package contains static libraries and header files needed for development.
%prep %prep
%setup -q %setup -q
%patch2 -p1 %patch 2 -p1
%build %build
%configure \ %configure \
@ -73,8 +72,7 @@ This package contains static libraries and header files needed for development.
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall %makeinstall
install -D -m 755 etc/slpd.all_init \ install -D -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/openslp.service
%{buildroot}%{_initrddir}/slpd
#rm -rf rpmdoc #rm -rf rpmdoc
#mv %{buildroot}%{_prefix}/doc/%{name}-%{version} rpmdoc #mv %{buildroot}%{_prefix}/doc/%{name}-%{version} rpmdoc
@ -83,16 +81,29 @@ install -D -m 755 etc/slpd.all_init \
%clean %clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post
%systemd_post openslp
:
%preun
%systemd_preun openslp
:
%postun
%systemd_postun openslp
:
%post -n libopenslp -p /sbin/ldconfig %post -n libopenslp -p /sbin/ldconfig
%postun -n libopenslp -p /sbin/ldconfig %postun -n libopenslp -p /sbin/ldconfig
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%config(noreplace) %{_initrddir}/slpd #%config(noreplace) %{_initrddir}/slpd
%dir %{_sysconfdir}/slp %dir %{_sysconfdir}/slp
%config(noreplace) %{_sysconfdir}/slp/slp.conf %config(noreplace) %{_sysconfdir}/slp/slp.conf
%config(noreplace) %{_sysconfdir}/slp/slp.reg %config(noreplace) %{_sysconfdir}/slp/slp.reg
%config(noreplace) %{_sysconfdir}/slp/slp.spi %config(noreplace) %{_sysconfdir}/slp/slp.spi
%{_unitdir}/openslp.service
%{_bindir}/slptool %{_bindir}/slptool
%{_sbindir}/slpd %{_sbindir}/slpd
@ -104,13 +115,15 @@ install -D -m 755 etc/slpd.all_init \
%files -n libopenslp-devel %files -n libopenslp-devel
%defattr(-,root,root) %defattr(-,root,root)
%{_libdir}/libslp.a %{_libdir}/libslp.a
%{_libdir}/libslp.la
%{_libdir}/libslp.so %{_libdir}/libslp.so
%{_includedir}/*.h %{_includedir}/*.h
%doc ChangeLog FAQ NEWS README THANKS %doc ChangeLog FAQ NEWS README THANKS
#%doc rpmdoc/* #%doc rpmdoc/*
%changelog %changelog
* Sat Apr 22 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 2.0.0-3mamba
- port from sysv5 to systemd
* Sun Dec 06 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 2.0.0-2mamba * Sun Dec 06 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 2.0.0-2mamba
- added debug package, openssl 1.1 patch - added debug package, openssl 1.1 patch