File quickshell.spec of Package quickshell

#
# spec file for package quickshell
#
# Copyright (c) 2026 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 __builder ninja
%bcond asan 0
%bcond x11 0
Name:		quickshell
Version:	0
Release:	0
Summary:Desktop shell building blocks
# FIXME: Select a correct license from https://github.com/openSUSE/spec-cleaner#spdx-licenses
License:	LGPL-3.0-only
URL:		https://quickshell.org/
Source:		_service
BuildRequires:  Mesa-libGLESv3-devel
BuildRequires:	c++_compiler
BuildRequires:	cmake
BuildRequires:	ninja
BuildRequires:	qt6-declarative-devel
BuildRequires:	pkgconfig(polkit-agent-1)
BuildRequires:	spirv-tools
BuildRequires:	wayland-devel
BuildRequires:	cmake(Qt6Core)
BuildRequires:	cmake(Qt6Svg)
BuildRequires:	cmake(Qt6CorePrivate)
BuildRequires:	cmake(Qt6Qml)
BuildRequires:	cmake(Qt6Quick)
BuildRequires:	cmake(Qt6QuickControls2)
BuildRequires:	cmake(Qt6QuickPrivate)
BuildRequires:	cmake(Qt6ShaderTools)
BuildRequires:	cmake(Qt6WaylandClient)
BuildRequires:	cmake(Qt6WaylandClientPrivate)
BuildRequires:	cmake(Qt6Widgets)
BuildRequires:	pkgconfig(CLI11)
BuildRequires:	pkgconfig(gbm)
BuildRequires:	pkgconfig(jemalloc)
BuildRequires:	pkgconfig(libdrm)
BuildRequires:	pkgconfig(libpipewire-0.3)
BuildRequires:	pkgconfig(pam)
BuildRequires:	pkgconfig(wayland-client)
BuildRequires:	pkgconfig(wayland-protocols)
BuildRequires:	desktop-file-utils

%if %{with asan}
### BuildRequires:      libasan8
%endif
Requires:	libQt6Svg6
%description
Quickshell is a toolkit for building status bars, widgets,
lockscreens, and other desktop components using QtQuick.
It can be used alongside your Wayland compositor or window manager
to build a complete desktop environment.

%prep
%setup -q -n %_sourcedir/%name-%version -T -D
%__mkdir -p %_builddir/%_sourcedir
%__ln -rs %_sourcedir/%name-%version %_builddir/%_sourcedir

%build
#export CFLAGS="%{optflags} -I/usr/include/wayland"
export CXXFLAGS="%{optflags} -Wno-error=return-type"
%cmake \
	-DINSTALL_QML_PREFIX="%{_lib}/qt6/qml" \
	-DGIT_REVISION="%version" \
	-DDISTRIBUTOR="openSUSE (home:lighthomo)" \
	-DASAN=%{?with_asan:ON}%{!?with_asan:OFF} \
	-DCMAKE_SKIP_RPATH=TRUE \
	-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE \
	-DCMAKE_INSTALL_RPATH="" \
	-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE \
	-DX11=%{?with_x11:ON}%{!?with_x11:OFF} \
	-DCRASH_HANDLER=OFF
%cmake_build

%install
%cmake_install

%check
desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop

%files
%license LICENSE*
%doc BUILD.md CONTRIBUTING.md README.md changelog/
%{_bindir}/qs
%{_bindir}/quickshell
%{_datadir}/applications/org.quickshell.desktop
%{_datadir}/icons/hicolor/scalable/apps/org.quickshell.svg
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/scalable
%dir %{_datadir}/icons/hicolor/scalable/apps
%{_qt6_qmldir}/Quickshell/
%changelog

openSUSE Build Service is sponsored by