File sapconf.spec of Package sapconf.2087

#
# spec file for package sapconf
#
# Copyright (c) 2016 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 http://bugs.opensuse.org/
#


Name:           sapconf
Version:        4.1
Release:        0
Summary:        Kernel Parameter Initializiation for SAP Systems
License:        LGPL-2.1+
Group:          Productivity/Other
Url:            http://www.novell.com/partners/sap/
Source0:        sapconf.tgz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
BuildRequires:  tuned
# sapconf definitely requires tuned to run.
# If tuned package is missing, sapconf will prompt user to install it.
# Reason of using "recommends" instead of "requires" is difficult to explain.
# See fate#319480 for more details.
Recommends:     tuned
# The following are not real runtime requirements.
# But they are "very useful" thus installed along with this package.
Requires:       sysstat
Requires:       uuidd
Suggests:       cron logrotate
%{?systemd_requires}

%description 
This package sets the kernel parameters to recommended values for SAP
systems in a dynamic way during boot time by using the sysctl(8) tool.

The kernel parameters can be changed by the user by editing the
variables in the configuration file /etc/sysconfig/sapconf.

Furthermore, it is checked that a well-sized /dev/shm is available for
the XSI shared memory facility.  Note that /dev/shm is already part of
the tmpfs /dev which is mounted by the initial initrd ramdisk system
before booting.

Authors:
--------
    Werner Fink, Fabian Herschel, Howard Guo

%prep
tar xvf %{S:0}

%build

%install
mkdir -p %{buildroot}%{_libexecdir}/tuned/
cp -R sap-hana sap-netweaver %{buildroot}%{_libexecdir}/tuned/

mkdir -p %{buildroot}%{_unitdir}/systemd/system/ %{buildroot}%{_sbindir}/
install -m 0644 sapconf.service %{buildroot}%{_unitdir}/
install -m 0755 sapconf SAPconf %{buildroot}%{_sbindir}/
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcsapconf

mkdir -p %{buildroot}%{_mandir}/{man7,man8}/
install -m 0644 *.7 %{buildroot}%{_mandir}/man7/
install -m 0644 *.8 %{buildroot}%{_mandir}/man8/

mkdir -p %{buildroot}%{_var}/adm/fillup-templates/
install -m 0444 sysconfig.sapconf %{buildroot}%{_var}/adm/fillup-templates/

%pre
%service_add_pre sapconf.service

%post
%fillup_only
%service_add_post sapconf.service

%preun
%service_del_preun sapconf.service

%postun
%service_del_postun sapconf.service

%files 
%defattr(-,root,root)
%{_sbindir}/SAPconf
%{_sbindir}/sapconf
%{_sbindir}/rcsapconf
%{_libexecdir}/tuned/sap-netweaver
%{_libexecdir}/tuned/sap-hana
%{_unitdir}/sapconf.service
%{_mandir}/man7/*
%{_mandir}/man8/*
/var/adm/fillup-templates/*

%changelog
openSUSE Build Service is sponsored by