File krohnkite.spec of Package krohnkite

#
# spec file for package krohnkite
#
# Copyright (c) 2020 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 plasma6_version 6.0.0

Name:           krohnkite
Version:        0.9.8.3.3~git.349801c
Release:        0
Summary:        A dynamic tiling extension for KWin 6
# FIXME: Select a correct license from https://github.com/openSUSE/spec-cleaner#spdx-licenses
License:        MIT
Url:            https://github.com/anametologin/krohnkite
Source:         %{name}-%{version}.tar.gz
BuildRequires:  typescript >= 3.1
BuildRequires:  p7zip-full
BuildRequires:  cmake(Plasma) >= %{plasma6_version}
BuildArch:      noarch

%description
Kröhnkite is mainly inspired by dwm from suckless folks, and aims to provide 
rock solid stability while fully integrating into KWin.

Features:
 DWM-like window tiling
	 Dynamically tile windows, rather than manually placing each.
	 Floating windows
 Fully integrates into KWin features, including:
	 Multi-screen
	 Activities & Virtual desktop
	 Basic window management (minimize, fullscreen, switching, etc)
 Multiple Layout Support
	 Tiling layout
	 Monocle layout
	 Desktop-friendly layouts (Spread, Stair)

%prep
%setup -q
# replace unavailable revp with version info
sed -i 's/PROJECT_REV  =.*/PROJECT_REV  = %{version}/' Makefile
sed -i 's/\$REV/%{version}/' res/metadata.desktop
sed -i 's/\$VER/%{version}/' res/metadata.desktop
sed -i '/npm install --save-dev/d' Makefile
sed -i 's/npm run tsc --/tsc/' Makefile

%build
make package
make pkg/metadata.json

%install
mkdir -p %{buildroot}%{_datadir}/kwin/scripts/%{name}
# kpackagetool6 --global --type=KWin/Script -i %{name}-*.kwinscript -p %{buildroot}%{_datadir}/kwin/scripts
cp -ra pkg/* %{buildroot}%{_datadir}/kwin/scripts/%{name}/
install -Dm644 res/metadata.desktop %{buildroot}%{_datadir}/kservices6/%{name}.desktop

%post
%postun

%files
%license LICENSE
%doc README.md
%{_datadir}/kwin/scripts/%{name}
%dir %{_datadir}/kwin
%dir %{_datadir}/kwin/scripts
%{_datadir}/kservices6/%{name}.desktop
%dir %{_datadir}/kservices6

%changelog

openSUSE Build Service is sponsored by