[packages/openrc] add start-stop-daemon subpackage; drop installing the rest

glen glen at pld-linux.org
Mon Feb 15 21:08:08 CET 2016


commit f05d4873a1072dcafe06cb629369878697aa801b
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Mon Feb 15 22:08:04 2016 +0200

    add start-stop-daemon subpackage; drop installing the rest

 openrc.spec | 31 ++++++++++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)
---
diff --git a/openrc.spec b/openrc.spec
index 644b33d..e41b0f1 100644
--- a/openrc.spec
+++ b/openrc.spec
@@ -1,3 +1,7 @@
+#
+# Conditional build:
+%bcond_with	openrc		# package OpenRC files
+
 Summary:	OpenRC manages the services, startup and shutdown of a host
 Name:		openrc
 Version:	0.20.4
@@ -17,6 +21,14 @@ OpenRC is a dependency-based init system that works with the
 system-provided init program, normally /sbin/init. Currently, it does
 not have an init program of its own.
 
+%package start-stop-daemon
+Summary:	start-stop-daemon - ensures that daemons start and stop
+Group:		Applications/System
+
+%description start-stop-daemon
+start-stop-daemon provides a consistent method of starting, stopping
+and signaling daemons.
+
 %prep
 %setup -q
 
@@ -44,11 +56,24 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
+%if %{without openrc}
+%{__rm} -r $RPM_BUILD_ROOT%{_sysconfdir}
+%{__rm} -r $RPM_BUILD_ROOT/lib
+%{__rm} -r $RPM_BUILD_ROOT/libexec
+%{__rm} -r $RPM_BUILD_ROOT/sbin
+%{__rm} -r $RPM_BUILD_ROOT%{_includedir}
+%{__rm} -r $RPM_BUILD_ROOT%{_prefix}/lib
+%{__rm} -r $RPM_BUILD_ROOT%{_prefix}/libexec
+%{__rm} -r $RPM_BUILD_ROOT%{_bindir}/rc-status
+%endif
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%if %{with openrc}
 %files
 %defattr(644,root,root,755)
+%doc AUTHORS TODO ChangeLog LICENSE *.md
 %attr(755,root,root) %{_sbindir}/openrc
 %attr(755,root,root) %{_sbindir}/openrc-run
 %attr(755,root,root) %{_sbindir}/rc
@@ -56,7 +81,6 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_sbindir}/rc-update
 %attr(755,root,root) %{_sbindir}/runscript
 %attr(755,root,root) %{_sbindir}/service
-%attr(755,root,root) %{_sbindir}/start-stop-daemon
 %{_mandir}/man3/e*.3*
 %{_mandir}/man3/rc*.3*
 %{_mandir}/man8/openrc-run.8*
@@ -66,4 +90,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man8/rc-status.8*
 %{_mandir}/man8/rc-update.8*
 %{_mandir}/man8/service.8
+%endif
+
+%files start-stop-daemon
+%defattr(644,root,root,755)
 %{_mandir}/man8/start-stop-daemon.8*
+%attr(755,root,root) %{_sbindir}/start-stop-daemon
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/openrc.git/commitdiff/f05d4873a1072dcafe06cb629369878697aa801b



More information about the pld-cvs-commit mailing list