%global tag 1.35.1 %global debug_package %{nil} Name: k0s Release: %autorelease Version: %{tag} Summary: Zero Friction Kubernetes License: Apache-2.0 URL: https://k0sproject.io/ Source1: k0s.target Source2: k0s-master.service Source3: k0s-controller.service Source4: k0s-worker.service Source10: https://github.com/k0sproject/k0s/releases/download/v%{tag}%2Bk0s.1/k0s-v%{tag}+k0s.1-amd64 Source11: https://github.com/k0sproject/k0s/releases/download/v%{tag}%2Bk0s.1/k0s-v%{tag}+k0s.1-arm64 ExclusiveArch: x86_64 arm64 Requires: systemd Recommends: container-selinux %description k0s - The Zero Friction Kubernetes %files %{_bindir}/k0s %{_bindir}/kubectl %{_prefix}/lib/systemd/system/k0s.target %{_prefix}/lib/systemd/system/k0s-master.service %{_prefix}/lib/systemd/system/k0s-controller.service %{_prefix}/lib/systemd/system/k0s-worker.service %dir %{_sysconfdir}/k0s %ghost %config %attr(600, root, root) %{_sysconfdir}/k0s/k0s.yaml %install install -m 0755 -vd %{buildroot}%{_bindir} %ifarch x86_64 install -m 0755 -vp %{S:10} %{buildroot}%{_bindir}/k0s %endif %ifarch aarch64 install -m 0755 -vp %{S:11} %{buildroot}%{_bindir}/k0s %endif ln -sf k0s %{buildroot}%{_bindir}/kubectl install -m 0755 -vd %{buildroot}%{_sysconfdir}/k0s touch %{buildroot}%{_sysconfdir}/k0s/k0s.yaml install -m 0755 -vd %{buildroot}%{_prefix}/lib/systemd/system/ install -m 0644 -vp %{S:1} %{buildroot}%{_prefix}/lib/systemd/system/k0s.target install -m 0644 -vp %{S:2} %{buildroot}%{_prefix}/lib/systemd/system/k0s-master.service install -m 0644 -vp %{S:3} %{buildroot}%{_prefix}/lib/systemd/system/k0s-controller.service install -m 0644 -vp %{S:4} %{buildroot}%{_prefix}/lib/systemd/system/k0s-worker.service %post %systemd_post k0s.target %systemd_post k0s-master.target %systemd_post k0s-controller.target %systemd_post k0s-worker.target k0s config create >%{_sysconfdir}/k0s/k0s.yaml || true %postun %systemd_post k0s.target %systemd_post k0s-master.target %systemd_post k0s-controller.target %systemd_post k0s-worker.target %changelog %autochangelog