File ardana-ansible.spec of Package ardana-ansible

#
# spec file for package ardana-ansible
#
# Copyright (c) 2018 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 version_unconverted 8.0+git.1526348056.2dac964

Name:           ardana-ansible
Version:        8.0+git.1526348056.2dac964
Release:        0
Summary:        Ardana core ansible code
License:        Apache-2.0
Group:          System/Management
Url:            https://github.com/ArdanaCLM/
Source0:        %{name}-%{version}.tar
Source1:        package-constants.yml
Source2:        ardana_tar_locations.yml
Source3:        https://git.suse.provo.cloud/cgit/ardana/ardana/plain/ardana-init.bash
# no-deployer-media-legacy-layout.patch -- package only patch!!!
Patch1:         no-deployer-media-legacy-layout.patch
BuildRequires:  ardana-devel
Requires:       ansible1
Requires:       ardana
Requires:       python-Jinja2 >= 2.9.6
Requires:       python-ardana-packager >= 0.0.3
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
%ardana_description
Ardana core ansible code

%prep
%setup -q
%patch1 -p1

%build

%install
%ardana_component_install

install -m 0755 -D %{SOURCE3} %{buildroot}%{_bindir}/ardana-init

install -m 0644 -D %{SOURCE1} %{buildroot}%{ardana_base_dir}/ansible/roles/package-constants/defaults/main.yml
install -m 0644 -D %{SOURCE2} %{buildroot}%{ardana_base_dir}/ansible/roles/deployer-setup/defaults/ardana_tar_locations.yml

echo "%{version}-%{release}" > %{buildroot}%{ardana_base_dir}/ansible/Ardana_version

cat <<EOF > %{buildroot}/%{ardana_base_dir}/ansible/ardana_version.yml
---
ardana_version: "ardana-%{ardana_version}"
EOF

%files
%defattr(-,root,root,-)
%doc LICENSE
%dir %{ardana_base_dir}
%{_bindir}/ardana-init
%{ardana_base_dir}/ansible/

%changelog
openSUSE Build Service is sponsored by