File k3s_install.spec of Package k3s_install-formula
# vim: set nospell:
# spec file for package k3s_insall
#
# Copyright (c) 2025 SUSE LLC
#
# 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 https://bugs.opensuse.org/
# Build: rpmbuild -v --clean --target noarch -ba k3s_insall.spec
%define fname k3s_install
%define fdir var/lib/containers/storage/volumes
Name: k3s-install-formula
Version: 0.1
Release: 0
Summary: Salt formula for Multi-Linux Manager forms for K3s binary installation
License: Apache-2.0
URL: https://build.opensuse.org/package/show/home:racurtis/k3s_install-formula
Source: k3s-install-formula-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
Packager: Raine Curtis
%description
Salt formula for K3s binary installation using forms in Multi-Linux Manager.
%prep
%setup -q
mkdir -p %{buildroot}
%build
%install
mkdir -p %{buildroot}/%{fdir}/srv-salt/_data/%{fname}
mkdir -p %{buildroot}/%{fdir}/srv-formulametadata/_data/%{fname}
cp %{fdir}/srv-salt/_data/%{fname}/init.sls %{buildroot}/%{fdir}/srv-salt/_data/%{fname}/init.sls
cp %{fdir}/srv-formulametadata/_data/%{fname}/form.yml %{buildroot}/%{fdir}/srv-formulametadata/_data/%{fname}/form.yml
cp %{fdir}/srv-formulametadata/_data/%{fname}/metadata.yml %{buildroot}/%{fdir}/srv-formulametadata/_data/%{fname}/metadata.yml
cp %{fdir}/srv-formulametadata/_data/%{fname}/pillar.example %{buildroot}/%{fdir}/srv-formulametadata/_data/%{fname}/pillar.example
# --
#install -D -m 644 %{fdir}/srv-salt/_data/%{fname}/init.sls %{buildroot}/%{fdir}/srv-salt/_data/%{fname}/init.sls
#install -D -m 644 %{fdir}/srv-formulametadata/_data/%{fname}/form.yml %{buildroot}/%{fdir}/srv-formulametadata/_data/%{fname}/form.yml
#install -D -m 644 %{fdir}/srv-formulametadata/_data/%{fname}/metadata.yml %{buildroot}/%{fdir}/srv-formulametadata/_data/%{fname}/metadata.yml
#install -D -m 644 %{fdir}/srv-formulametadata/_data/%{fname}/pillar.example %{buildroot}/%{fdir}/srv-formulametadata/_data/%{fname}/pillar.example
#cp -R %{fdir}/srv-salt/_data/%{fname}/* %{buildroot}/%{fdir}/srv-salt/_data/%{fname}/
#cp -R %{fdir}/srv-formulametadata/_data/%{fname}/* %{buildroot}/%{fdir}/srv-formulametadata/_data/%{fname}/
%files
%defattr(-,root,root)
%dir /var/lib/containers
%dir /var/lib/containers/storage
%dir /%{fdir}
%dir /%{fdir}/srv-salt/
%dir /%{fdir}/srv-salt/_data
%dir /%{fdir}/srv-formulametadata
%dir /%{fdir}/srv-formulametadata/_data
/%{fdir}/srv-salt/_data/%{fname}
/%{fdir}/srv-formulametadata/_data/%{fname}
%post
%changelog