[packages/openrc] package -libs, used by start-stop-daemon
glen
glen at pld-linux.org
Mon Feb 15 21:29:57 CET 2016
commit 29fb097f4de826e9d4b9e9983c657f5f0d94e71f
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Mon Feb 15 22:29:36 2016 +0200
package -libs, used by start-stop-daemon
openrc.spec | 46 +++++++++++++++++++++++++++++++++++++---------
1 file changed, 37 insertions(+), 9 deletions(-)
---
diff --git a/openrc.spec b/openrc.spec
index 660ffbc..f8265ec 100644
--- a/openrc.spec
+++ b/openrc.spec
@@ -14,6 +14,7 @@ URL: https://github.com/OpenRC/openrc
BuildRequires: libselinux-devel
BuildRequires: ncurses-devel
BuildRequires: pam-devel
+Requires: %{name}-libs = %{version}-%{release}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -21,18 +22,32 @@ 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 libs
+Summary: OpenRC libraries
+Group: Libraries
+
+%description libs
+OpenRC libraries
+
%package start-stop-daemon
Summary: start-stop-daemon - ensures that daemons start and stop
Group: Applications/System
+Requires: %{name}-libs = %{version}-%{release}
%description start-stop-daemon
start-stop-daemon provides a consistent method of starting, stopping
and signaling daemons.
+start-stop-daemon first appeared in Debian.
+
+This is a complete re-implementation with the process finding code in
+the OpenRC library (librc, -lrc) so other programs can make use of it.
+
%prep
%setup -q
cat <<EOF >> Makefile.inc
+LIBNAME=%{_lib}
MKNET=no
MKPAM=pam
MKPREFIX=yes
@@ -55,17 +70,25 @@ EOF
%install
rm -rf $RPM_BUILD_ROOT
-%if %{with openrc}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
-%else
-# manually install only start-stop-daemon
-install -d $RPM_BUILD_ROOT/sbin
-install -p src/rc/start-stop-daemon $RPM_BUILD_ROOT/sbin
-%{__make} -C man install \
- MAN3= \
- MAN8=start-stop-daemon.8 \
- DESTDIR=$RPM_BUILD_ROOT
+
+mv $RPM_BUILD_ROOT{%{_sbindir},/sbin}/start-stop-daemon
+
+%if %{without openrc}
+%{__rm} -r $RPM_BUILD_ROOT%{_sysconfdir}
+%{__rm} -r $RPM_BUILD_ROOT/libexec
+%{__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
+%{__rm} -r $RPM_BUILD_ROOT%{_sbindir}
+%{__rm} -r $RPM_BUILD_ROOT%{_mandir}/man3
+%{__rm} -r $RPM_BUILD_ROOT%{_mandir}/man8/openrc*
+%{__rm} -r $RPM_BUILD_ROOT%{_mandir}/man8/rc*
+%{__rm} -r $RPM_BUILD_ROOT%{_mandir}/man8/service*
+%{__rm} $RPM_BUILD_ROOT/sbin/rc-sstat
+%{__rm} $RPM_BUILD_ROOT/lib/*.so
%endif
%clean
@@ -93,6 +116,11 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man8/service.8
%endif
+%files libs
+%defattr(644,root,root,755)
+%attr(755,root,root) /lib/libeinfo.so.1
+%attr(755,root,root) /lib/librc.so.1
+
%files start-stop-daemon
%defattr(644,root,root,755)
%{_mandir}/man8/start-stop-daemon.8*
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/openrc.git/commitdiff/29fb097f4de826e9d4b9e9983c657f5f0d94e71f
More information about the pld-cvs-commit
mailing list