File nagios-theme-vautour.spec of Package nagios-theme-vautour

# spec file for package nagios-theme-vautour
# Copyright (c) 2015 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

Name:           nagios-theme-vautour
Version:        1.7
Release:        0
License:        CC-BY-2.5
Summary:        Vautour Style for Nagios webfrontend
Group:          System/Monitoring
Source1:        robots.txt
BuildRequires:  nagios-rpm-macros
BuildRequires:  nagios-www
BuildRequires:  unzip
Requires:       nagios-www >= 2.0
%if 0%{?suse_version} > 1020
BuildRequires:  fdupes
Requires:       nagios-www >= 2.0
BuildRequires:  nagios-www
PreReq:         nagios-theme-switcher
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
%define         install_dir /usr/share/nagios-themes/vautour

Vautour Style is a skin for Nagios 3.X and 4.X. Original stylesheets and
original icons have been modified to provide a different presentation for the
Nagios web interface. 

%setup -q -T -c %{name} -a0


mkdir -p %{buildroot}%{install_dir}
mkdir -p %{buildroot}%{_defaultdocdir}/%name/
for file in *.txt ; do
	sed -e "s|||" $file > %{buildroot}%{_defaultdocdir}/%name/$file
chmod 644 %{buildroot}%{_defaultdocdir}/%name/*
install -m644 %{SOURCE1} %{buildroot}%{install_dir}/
cp -a * %{buildroot}%{install_dir}/
find %{buildroot}%{install_dir}/ -type f -exec chmod 644 {} \;
find %{buildroot}%{install_dir}/ -type d -exec chmod 755 {} \;
%if 0%{?suse_version} > 1020
%fdupes %{buildroot}%{install_dir}/

rm -rf %{buildroot}

if [ ${1:-0} -eq 1 ]; then
	# Only switch the theme if we're not in update mode.
    if [ -x %{_sbindir}/switch-nagios-theme ]; then
        test -f /.buildenv || %{_sbindir}/switch-nagios-theme -f vautour

if [ ${1:-0} -eq 1 ]; then
	# Only switch the theme if we're not in update mode.
    if [ -x %{_sbindir}/switch-nagios-theme ]; then
        test -f /.buildenv || %{_sbindir}/switch-nagios-theme -f nagios

%doc %{_defaultdocdir}/%name

openSUSE Build Service is sponsored by