3 %bcond_with openrc # package OpenRC files
5 Summary: OpenRC manages the services, startup and shutdown of a host
11 Source0: https://github.com/OpenRC/openrc/archive/%{version}/%{name}-%{version}.tar.gz
12 # Source0-md5: 12e1e2c70c03f93fb42f3549d8cdbc0a
13 URL: https://github.com/OpenRC/openrc
14 BuildRequires: libselinux-devel
15 BuildRequires: ncurses-devel
16 BuildRequires: pam-devel
17 Requires: %{name}-libs = %{version}-%{release}
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21 OpenRC is a dependency-based init system that works with the
22 system-provided init program, normally /sbin/init. Currently, it does
23 not have an init program of its own.
26 Summary: OpenRC libraries
32 %package start-stop-daemon
33 Summary: start-stop-daemon - ensures that daemons start and stop
34 Group: Applications/System
35 Requires: %{name}-libs = %{version}-%{release}
37 %description start-stop-daemon
38 start-stop-daemon provides a consistent method of starting, stopping
39 and signaling daemons.
41 start-stop-daemon first appeared in Debian.
43 This is a complete re-implementation with the process finding code in
44 the OpenRC library (librc, -lrc) so other programs can make use of it.
49 cat <<EOF >> Makefile.inc
59 PKG_PREFIX=%{_prefix}/pkg
60 LOCAL_PREFIX=%{_prefix}/local
62 BRANDING="PLD-Linux/$(uname -s)"
68 CFLAGS="%{rpmcflags}" \
69 LDFLAGS="%{rpmldflags}"
72 rm -rf $RPM_BUILD_ROOT
74 DESTDIR=$RPM_BUILD_ROOT
76 mv $RPM_BUILD_ROOT{%{_sbindir},/sbin}/start-stop-daemon
79 %{__rm} -r $RPM_BUILD_ROOT%{_sysconfdir}
80 %{__rm} -r $RPM_BUILD_ROOT/libexec
81 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}
82 %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/lib
83 %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/libexec
84 %{__rm} -r $RPM_BUILD_ROOT%{_bindir}/rc-status
85 %{__rm} -r $RPM_BUILD_ROOT%{_sbindir}
86 %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/man3
87 %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/man8/openrc*
88 %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/man8/rc*
89 %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/man8/service*
90 %{__rm} $RPM_BUILD_ROOT/sbin/rc-sstat
91 %{__rm} $RPM_BUILD_ROOT/lib/*.so
95 rm -rf $RPM_BUILD_ROOT
99 %defattr(644,root,root,755)
100 %doc AUTHORS TODO ChangeLog LICENSE *.md
101 %attr(755,root,root) %{_sbindir}/openrc
102 %attr(755,root,root) %{_sbindir}/openrc-run
103 %attr(755,root,root) %{_sbindir}/rc
104 %attr(755,root,root) %{_sbindir}/rc-service
105 %attr(755,root,root) %{_sbindir}/rc-update
106 %attr(755,root,root) %{_sbindir}/runscript
107 %attr(755,root,root) %{_sbindir}/service
108 %{_mandir}/man3/e*.3*
109 %{_mandir}/man3/rc*.3*
110 %{_mandir}/man8/openrc-run.8*
111 %{_mandir}/man8/openrc.8*
112 %{_mandir}/man8/rc-service.8*
113 %{_mandir}/man8/rc-sstat.8*
114 %{_mandir}/man8/rc-status.8*
115 %{_mandir}/man8/rc-update.8*
116 %{_mandir}/man8/service.8
120 %defattr(644,root,root,755)
121 %attr(755,root,root) /lib/libeinfo.so.1
122 %attr(755,root,root) /lib/librc.so.1
124 %files start-stop-daemon
125 %defattr(644,root,root,755)
126 %{_mandir}/man8/start-stop-daemon.8*
127 %attr(755,root,root) /sbin/start-stop-daemon