aboutsummaryrefslogtreecommitdiff
path: root/ninit.spec
diff options
context:
space:
mode:
authorKlaatu <[email protected]>2015-05-17 15:33:21 +1200
committerKlaatu <[email protected]>2015-05-17 15:33:21 +1200
commitb0de699679e8f1e39af847ed172d1ba605b4370c (patch)
tree01dac00471d61f727394e508c613b29cff0ceae5 /ninit.spec
bulk upload of source
Diffstat (limited to 'ninit.spec')
-rw-r--r--ninit.spec60
1 files changed, 60 insertions, 0 deletions
diff --git a/ninit.spec b/ninit.spec
new file mode 100644
index 0000000..6c1fd3e
--- /dev/null
+++ b/ninit.spec
@@ -0,0 +1,60 @@
+Summary: small init with build-in SVC and cron
+Name: ninit
+Version: 0.14
+Release: 1
+Group: System Environment/Daemons
+Packager: Nikola Vladov <[email protected]>
+Source: http://riemann.fmi.uni-sofia.bg/ninit/ninit-%{version}.tar.bz2
+URL: http://riemann.fmi.uni-sofia.bg/ninit/
+License: GPL
+Prefix: /
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+
+%description
+
+Ninit is a small daemon which can be PID 1. It has build-in SVC and cron.
+Read more about it on http://riemann.fmi.uni-sofia.bg/ninit/
+
+%prep
+
+%setup -q
+
+%build
+MYARCH=`uname -m | sed -e's/i[4-9]86/i386/' -e's/armv[3-6]t\?e\?[lb]/arm/'`
+test "i386" != ${MYARCH} -a "x86_64" != ${MYARCH} && MYARCH=withdiet
+make ${MYARCH} prefix=${RPM_BUILD_ROOT}
+test -d bin-${MYARCH} && cp bin-${MYARCH}/* .
+
+%install
+mkdir -p ${RPM_BUILD_ROOT}/usr/share/man
+make install DESTDIR=${RPM_BUILD_ROOT}
+rm -f ${RPM_BUILD_ROOT}/etc/ninit/in ${RPM_BUILD_ROOT}/etc/ninit/out
+
+%clean
+rm -rf ${RPM_BUILD_ROOT}
+
+%post
+test -p /etc/ninit/in || mkfifo -m 600 /etc/ninit/in
+test -p /etc/ninit/out || mkfifo -m 600 /etc/ninit/out
+
+aa=`readlink /proc/1/exe`
+if test "$aa" = "/sbin/ninit" ; then
+ /sbin/ninit-reload -v -u /sbin/ninit
+else
+ echo See the home page of ninit how to prepare the host to boot
+ echo with /sbin/ninit instead of default /sbin/init.
+ echo http://riemann.fmi.uni-sofia.bg/ninit/
+fi
+%postun
+
+%files
+%defattr(-,root,root)
+/sbin
+/usr
+/etc
+/bin
+%doc README CHANGES
+
+%changelog
+* Thu May 14 2008 Nikola Vladov <[email protected]>
+- Create rpm