File sca-patterns-base.spec of Package sca-patterns-base.2129

#
# spec file for package sca-patterns-base
#
# 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 http://bugs.opensuse.org/
#


%define sca_common sca
%define patdirbase /usr/lib/%{sca_common}
%define patdir %{patdirbase}/patterns
%define prodgrp sdp
%define patuser root
%define patgrp root

Name:           sca-patterns-base
Summary:        Supportconfig Analysis Pattern Base Libraries
License:        GPL-2.0
Group:          System/Monitoring
Url:            https://github.com/g23guy/sca-patterns-base
Version:        1.3
Release:        0
Source:         %{name}-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
Requires:       bash
Requires:       perl
Requires:       python

%description
Supportconfig Analysis (SCA) appliance pattern base libraries used 
by all patterns

Authors:
--------
    Jason Record <jrecord@suse.com>

%prep
%setup -q

%build

%install
pwd;ls -la
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT/%{patdirbase}/patterns/local
install -d $RPM_BUILD_ROOT/%{patdirbase}/bash
install -d $RPM_BUILD_ROOT/%{patdirbase}/python
install -d $RPM_BUILD_ROOT/%{patdirbase}/perl/SDP
install -d $RPM_BUILD_ROOT/usr/share/doc/packages/%{sca_common}
install -m 444 libraries/COPYING.GPLv2 $RPM_BUILD_ROOT/usr/share/doc/packages/%{sca_common}
install -m 644 libraries/bash/* $RPM_BUILD_ROOT/%{patdirbase}/bash
install -m 644 libraries/python/* $RPM_BUILD_ROOT/%{patdirbase}/python
install -m 644 libraries/perl/SDP/* $RPM_BUILD_ROOT/%{patdirbase}/perl/SDP

%files
%defattr(-,%{patuser},%{patgrp})
%dir %{patdirbase}
%dir %{patdir}
%dir %{patdir}/local
%dir %{patdirbase}/bash
%dir %{patdirbase}/python
%dir %{patdirbase}/perl
%dir %{patdirbase}/perl/SDP
%dir %attr(-,root,root) /usr/share/doc/packages/%{sca_common}
%attr(-,%{patuser},%{patgrp}) %{patdirbase}/bash/*
%attr(-,%{patuser},%{patgrp}) %{patdirbase}/python/*
%attr(-,%{patuser},%{patgrp}) %{patdirbase}/perl/SDP/*
%doc %attr(-,root,root) /usr/share/doc/packages/%{sca_common}/*

%clean
rm -rf $RPM_BUILD_ROOT

%changelog
openSUSE Build Service is sponsored by