File wluma.spec of Package wluma
#
# spec file for package wluma
#
# Copyright (c) 2023 SUSE LLC
#
# 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/
#
Name: wluma
Version: 4.3.0
Release: 0
Summary: Automatic brightness adjustment based on screen contents and ALS
License: ISC
URL: https://github.com/maximbaz/wluma
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
Source1: vendor.tar.zst
BuildRequires: cargo-packaging
BuildRequires: clang
BuildRequires: pkgconfig
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(libv4l1)
BuildRequires: pkgconfig(vulkan)
%description
A tool for wlroots-based compositors that automatically adjusts screen
brightness based on the screen contents and amount of ambient light around
you.
%prep
%autosetup -a1 -p1
%build
%{cargo_build}
%install
install -D -m755 target/release/wluma -t %{buildroot}%{_bindir}
install -D -m644 90-wluma-backlight.rules -t %{buildroot}%{_udevrulesdir}
install -D -m644 config.toml -t %{buildroot}%{_sysconfdir}/xdg/wluma/
install -D -m644 wluma.service -t %{buildroot}%{_userunitdir}
%pre
%systemd_user_pre %{name}.service
%post
%systemd_user_post %{name}.service
%files
%license LICENSE*
%doc README*
%{_bindir}/%{name}
%config %{_sysconfdir}/xdg/%{name}
%{_udevrulesdir}
%{_userunitdir}
%changelog