File kalpa-release.spec of Package kalpa-release
#
# spec file for package kalpa-release
#
# Copyright (c) 2023 Richard Brown
# Copyright (c) 2023 openSUSE Project
#
# 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://github.com/ProjectGreybeard/bugs
#
Name: Kalpa-release
Version: 20230530
Release: 0
Summary: openSUSE Kalpa
License: GPL-2.0-or-later
Group: System/Fhs
Source1: LICENSE
URL: https://kalpadesktop.org
Conflicts: distribution-release
Provides: distribution-release
# Kalpa is a SUSE Linux type distribution
Provides: suse-release = %{version}-%{release}
Provides: suse-release-oss = %{version}-%{release}
# Give zypp a hint that this product must be kept up-to-date using zypper dup, not up (boo#1061384)
Provides: product-update() = dup
# Kalpa replaces MicroOS
Provides: MicroOS-release = %{version}
Obsoletes: MicroOS-release
%description
Kalpa is an immutable, automatically updating, graphical linux workstation OS with a focus on working out of the box.
%prep
%build
%install
mkdir -p %{buildroot}%{_sysconfdir} %{buildroot}%{_prefix}/lib/issue.d %{buildroot}/run
echo -e "\nWelcome to openSUSE Kalpa (%{_target_cpu}) - Kernel \\\r (\\\l).\n" > %{buildroot}%{_prefix}/lib/issue.d/10-OS
echo -e "\n" > %{buildroot}%{_prefix}/lib/issue.d/90-OS
VERSION_ID=`echo %{version}|tr '[:upper:]' '[:lower:]'|sed -e 's/ //g;'`
# note: VERSION is an optional field and has no meaning other than informative on a rolling distro
# We do thus not add it to the os-release file
cat > %{buildroot}%{_prefix}/lib/os-release <<EOF
NAME="openSUSE Kalpa"
# VERSION="%{version}%{?betaversion: %{betaversion}}"
ID="opensuse-kalpa"
ID_LIKE="suse opensuse opensuse-tumbleweed opensuse-microos"
VERSION_ID="$VERSION_ID"
PRETTY_NAME="openSUSE Kalpa"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:kalpa:%{version}"
BUG_REPORT_URL="https://bugzilla.opensuse.org"
HOME_URL="https://kalpadesktop.org"
DOCUMENTATION_URL="https://en.opensuse.org/Portal:Kalpa"
LOGO="distributor-logo-kalpa"
EOF
ln -s ..%{_prefix}/lib/os-release %{buildroot}%{_sysconfdir}/os-release
mkdir -p "%{buildroot}%_defaultlicensedir/%name/"
install -m 0755 %{SOURCE1} "%{buildroot}%_defaultlicensedir/%name/LICENSE"
# License location required by jeos-firstboot
mkdir -p "%{buildroot}%_defaultlicensedir/product/base/"
install -m 0755 %{SOURCE1} "%{buildroot}%_defaultlicensedir/product/base/license.txt"
%post
%postun
%files
%defattr(644,root,root,755)
%dir %_defaultlicensedir/product
%dir %_defaultlicensedir/product/base
%_defaultlicensedir/product/base/license.txt
%license LICENSE
%{_sysconfdir}/os-release
%{_prefix}/lib/os-release
%dir %{_prefix}/lib/issue.d
%{_prefix}/lib/issue.d/*-OS
%changelog