File insserv-compat.spec of Package insserv-compat.4861

# spec file for package insserv-compat
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via
# icecream 0

Name:           insserv-compat
Summary:        Simple insserv replacement for systemd only systems
License:        MIT
Group:          System/Base
Version:        0.1
Release:        0
Source1:        init-functions
Source2:        insserv.conf
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
Obsoletes:      insserv <= 1.16.0
Provides:       insserv = 1.16.1-1
Requires:       perl(Getopt::Long)

insserv is used enable System V init scripts. This package only
contains a stub implemenation for use on systemd only systems.

%setup -q -c -T
pod2man -s 8 -c 'The openSUSE boot concept' -r "" -u %SOURCE0 insserv.8

for i in /sbin %{_sbindir} /usr/lib/lsb /lib/lsb %{_mandir}/man8 %{_sysconfdir}; do
	install -d -m 755 %{buildroot}$i
install -m755 %{SOURCE0} %{buildroot}%{_sbindir}/insserv
install -m755 %{SOURCE1} %{buildroot}/lib/lsb/init-functions
install -m644 %{SOURCE2} %{buildroot}%{_sysconfdir}/insserv.conf
install -m644 insserv.8 %{buildroot}%{_mandir}/man8
ln -s ../usr/sbin/insserv  %{buildroot}/sbin/insserv
ln -s ../../sbin/insserv  %{buildroot}/usr/lib/lsb/install_initd
ln -s ../../sbin/insserv  %{buildroot}/usr/lib/lsb/remove_initd
mkdir -p %{buildroot}/etc/init.d/{boot.d,rc0.d,rc1.d,rc2.d,rc3.d,rc4.d,rc5.d,rc6.d,rcS.d}
ln -s init.d %{buildroot}/etc/rc.d

rm -rf %{buildroot}

%config %{_sysconfdir}/insserv.conf
%dir %attr(0755,root,root) /etc/init.d
%dir %attr(0755,root,root) /etc/init.d/boot.d
%dir %attr(0755,root,root) /etc/init.d/rc0.d
%dir %attr(0755,root,root) /etc/init.d/rc1.d
%dir %attr(0755,root,root) /etc/init.d/rc2.d
%dir %attr(0755,root,root) /etc/init.d/rc3.d
%dir %attr(0755,root,root) /etc/init.d/rc4.d
%dir %attr(0755,root,root) /etc/init.d/rc5.d
%dir %attr(0755,root,root) /etc/init.d/rc6.d
%dir %attr(0755,root,root) /etc/init.d/rcS.d

openSUSE Build Service is sponsored by