]> git.pld-linux.org Git - packages/openrc.git/blob - openrc.spec
f8265ec77c1ce96b5138dadcc9af26ade6415753
[packages/openrc.git] / openrc.spec
1 #
2 # Conditional build:
3 %bcond_with     openrc          # package OpenRC files
4
5 Summary:        OpenRC manages the services, startup and shutdown of a host
6 Name:           openrc
7 Version:        0.20.4
8 Release:        0.1
9 License:        BSD
10 Group:          Base
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)
19
20 %description
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.
24
25 %package libs
26 Summary:        OpenRC libraries
27 Group:          Libraries
28
29 %description libs
30 OpenRC libraries
31
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}
36
37 %description start-stop-daemon
38 start-stop-daemon provides a consistent method of starting, stopping
39 and signaling daemons.
40
41 start-stop-daemon first appeared in Debian.
42
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.
45
46 %prep
47 %setup -q
48
49 cat <<EOF >> Makefile.inc
50 LIBNAME=%{_lib}
51 MKNET=no
52 MKPAM=pam
53 MKPREFIX=yes
54 MKPKGCONFIG=no
55 MKSELINUX=yes
56 MKSTATICLIBS=no
57 MKTERMCAP=ncurses
58 MKTOOLS=yes
59 PKG_PREFIX=%{_prefix}/pkg
60 LOCAL_PREFIX=%{_prefix}/local
61 PREFIX=%{_prefix}
62 BRANDING="PLD-Linux/$(uname -s)"
63 EOF
64
65 %build
66 %{__make} \
67         CC="%{__cc}" \
68         CFLAGS="%{rpmcflags}" \
69         LDFLAGS="%{rpmldflags}"
70
71 %install
72 rm -rf $RPM_BUILD_ROOT
73 %{__make} install \
74         DESTDIR=$RPM_BUILD_ROOT
75
76 mv $RPM_BUILD_ROOT{%{_sbindir},/sbin}/start-stop-daemon
77
78 %if %{without openrc}
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
92 %endif
93
94 %clean
95 rm -rf $RPM_BUILD_ROOT
96
97 %if %{with openrc}
98 %files
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
117 %endif
118
119 %files libs
120 %defattr(644,root,root,755)
121 %attr(755,root,root) /lib/libeinfo.so.1
122 %attr(755,root,root) /lib/librc.so.1
123
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
This page took 0.061541 seconds and 2 git commands to generate.