File whisker-shell.spec of Package whisker-shell

#
# spec file for package quickshell
#
# Copyright (c) 2025 SUSE LLC and contributors
#
# 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/
#
%define _lto_cflags %{nil}
%define __builder ninja
%define git_rev %(echo %{version} | sed 's/.*g//')
%define pkg_ver %(echo %{version} | sed 's/\.g.*//')
Name:           whisker-shell
Version:        r57.807610c
Release:        0
Summary:        Quickshell-based desktop environment for Hyprland
License:        GPL-3.0-only
URL:            https://github.com/corecathx/whisker
Source0:        %{name}-%{version}.tar.gz
#BuildRequires:  haxe
BuildRequires:  bluez
Requires:       brightnessctl
Requires:       bash
Requires:       power-profiles-daemon
Requires:       hyprland
Requires:       quickshell
Requires:       cava
Requires:       matugen
Requires:       ttf-outfit
Requires:       material-symbols-variable
Requires:       qt6-multimedia
Requires:       NetworkManager
Requires:       qt6ct

%description
Desktop shell built with Quickshell and follows Material 3 Design rules.

%prep
%autosetup -p1

%build
cd "whisker-cli"
echo "  -> change directory: $PWD"

export HAXELIB_PATH="../haxelib"
echo "  -> set HAXELIB_PATH to $HAXELIB_PATH"

mkdir -p "$HAXELIB_PATH"
echo "  -> create HAXELIB_PATH directory"

echo "  -> haxelib install hxcpp --always --quiet"
#haxelib install hxcpp --always --quiet

echo "  -> starting haxe build"
#haxe release.hxml

%install
# install whisker binary
install -dm755 "%{buildroot}%{_bindir}"
install -Dm0755 "whisker-cli/target/cpp/whisker" "%{buildroot}%{_bindir}/"

# install whisker's quickshell config
install -dm755 "%{buildroot}%{_sysconfdir}/xdg/quickshell/whisker"
cp -r "whisker/"* "%{buildroot}%{_sysconfdir}/xdg/quickshell/whisker/"

## cleanup
rm -rf "%{buildroot}%{_sysconfdir}/xdg/quickshell/whisker/.git"*
rm -rf "%{buildroot}/whisker-cli/target"

%files
%{_bindir}/whisker
%dir %{_sysconfdir}/xdg/quickshell
%dir %{_sysconfdir}/xdg/quickshell/whisker/
%config %{_sysconfdir}/xdg/quickshell/whisker/

%changelog
* Thu Nov 4 2025 kaiman <home:kaiman>
- 首次打包发布
openSUSE Build Service is sponsored by