Accepting request 684560 from home:jmoellers:branches:network

OBS-URL: https://build.opensuse.org/request/show/684560
OBS-URL: https://build.opensuse.org/package/show/network/pen?expand=0&rev=5
This commit is contained in:
Tomáš Chvátal 2019-03-13 10:03:05 +00:00 committed by Git OBS Bridge
parent 7a8ac69609
commit cec807ab5a
3 changed files with 33 additions and 11 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Mar 12 14:48:32 UTC 2019 - josef.moellers@suse.com
- Added systemd support.
[bsc#1116032, pen.service]
-------------------------------------------------------------------
Tue Feb 10 18:02:56 UTC 2015 - sfalken@opensuse.org

9
pen.service Normal file
View File

@ -0,0 +1,9 @@
[Unit]
Description=A simple load balancer for tcp based protocols
After=time-sync.target nss-lookup.target syslog.socket remote-fs.target
[Service]
Type=forking
ExecStart=/usr/share/pen/scripts/rcpen start
ExecStop=/usr/share/pen/scripts/rcpen stop
[Install]
WantedBy=multi-user.system

View File

@ -1,7 +1,7 @@
#
# spec file for package pen
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -27,6 +27,7 @@ Source0: http://siag.nu/pub/pen/%{name}-%{version}.tar.gz
Source1: %{name}.cfg
Source2: init.%{name}
Source3: runpen.sh
Source4: pen.service
PreReq: %insserv_prereq %fillup_prereq
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -72,32 +73,38 @@ mkdir -p $RPM_BUILD_ROOT/%_sbindir
#make DESTDIR="$RPM_BUILD_ROOT" install
%makeinstall
# Install pen init script
mkdir -p $RPM_BUILD_ROOT/etc/init.d
install -m 0744 %SOURCE2 $RPM_BUILD_ROOT/etc/init.d/%{name}
install -d $RPM_BUILD_ROOT%{_datadir}/pen/scripts
install -m 0744 %SOURCE2 $RPM_BUILD_ROOT%{_datadir}/pen/scripts/rcpen
install -d $RPM_BUILD_ROOT%{_unitdir}
install -m 0444 %SOURCE4 $RPM_BUILD_ROOT%{_unitdir}/pen.service
install -m 0744 %SOURCE3 $RPM_BUILD_ROOT/usr/bin/runpen.sh
install -d $RPM_BUILD_ROOT/etc
install -m 0644 %SOURCE1 $RPM_BUILD_ROOT/etc/%{name}.cfg
ln -sf ../../etc/init.d/%{name} $RPM_BUILD_ROOT/usr/sbin/rc%{name}
ln -sf service $RPM_BUILD_ROOT/usr/sbin/rcpen
mkdir -p ${RPM_BUILD_ROOT}%{_docdir}
mv $RPM_BUILD_ROOT/usr/doc/pen ${RPM_BUILD_ROOT}%{_docdir}
%clean
rm -rf ${RPM_BUILD_ROOT}
%post
%{fillup_and_insserv -n pen pen}
%pre
%service_add_pre pen.service
%postun
%restart_on_update %{name}
%insserv_cleanup
%post
%service_add_post pen.service
%preun
%stop_on_removal %{name}
%service_del_preun pen.service
%postun
%service_del_postun pen.service
%files
%defattr(-,root,root)
%{_docdir}/*
%{_mandir}/man1/*.1.gz
/etc/init.d/%{name}
%{_datadir}/pen
%{_unitdir}/pen.service
/usr/bin/%{name}
/usr/bin/runpen.sh
/usr/bin/mergelogs