%global gui_name tailor-gui %global branch_name main %global datestamp %(date +%Y%m%d) Name: tailord Version: 0.2.5 Summary: System daemon for TUXEDO hardware control Release: 0.1.%{datestamp}%{?dist} License: GPL-2.0-or-later URL: https://github.com/AaronErhardt/tuxedo-rs/ Source0: %{url}/archive/refs/heads/%{branch_name}.tar.gz#/%{name}-%{branch_name}.tar.gz BuildRequires: meson pkgconfig cargo gcc sed BuildRequires: rust-srpm-macros BuildRequires: systemd-rpm-macros BuildRequires: desktop-file-utils libappstream-glib-devel BuildRequires: pkgconfig(libadwaita-1) pkgconfig(gtk4) Requires: tuxedo-drivers systemd-libs %package -n %{gui_name} Summary: Graphical client for the %{name} daemon Requires: %{name} = %{version}-%{release} gtk4 libadwaita %description This package contains the %{name} system service, which provides the D-Bus interface for controlling TUXEDO hardware. %description -n %{gui_name} This package provides the graphical Gtk4 client for the %{name} service. %prep %autosetup -n tuxedo-rs-%{branch_name} sed -e 's|ExecStart=.*|ExecStart=%{_bindir}/%{name}|' %{name}/%{name}.service.in > %{name}/%{name}.service %build pushd %{name} %meson _build %meson_build -C _build popd pushd %{gui_name} %meson _build %meson_build -C _build popd %install pushd %{name} %meson_install -C _build popd pushd %{gui_name} %meson_install -C _build popd %post %systemd_post %{name}.service %preun %systemd_preun %{name}.service %postun %systemd_postun_with_restart %{name}.service %files %license LICENSE %doc README.md CHANGELOG.md %{_bindir}/%{name} %{_datadir}/dbus-1/system.d/com.tux.Tailor.conf %{_unitdir}/%{name}.service %files -n %{gui_name} %{_bindir}/%{gui_name} %{_datadir}/applications/com.github.AaronErhardt.Tailor.desktop %{_datadir}/metainfo/com.github.AaronErhardt.Tailor.metainfo.xml %{_datadir}/icons/hicolor/ %changelog * %(date +"%a %b %d %Y") Your Name - %{version}-0.1.%{datestamp} - Nightly build from main branch