File wzmach.spec of Package wzmach
Name: wzmach
Version: 1.2.0
Release: 1%{?dist}
Summary: Btrfs automated snapshot manager.
License: Apache-2.0
URL: https://github.com/maurges/wzmach
Source0: wzmach-%{version}.tar
BuildRequires: cargo
BuildRequires: pkgconfig(libudev)
BuildRequires: dbus-1-devel
BuildRequires: libinput-devel
BuildRequires: libinput-udev
Requires: bash >= 4.0
Requires: dbus-1
Requires: dbus-1-common
Requires: dbus-1-tools
Requires: libdbus-1
Recommends: dbus-1-x11
Requires: libinput10
Requires: libinput-udev
Requires: libdbus-1
Requires: libudev1
Requires: udev
Requires: shadow
Requires: glibc
Requires: grep
%description
Yet another touchpad gesture engine. Supporting X and wayland.
%prep
%setup -n wzmach-%{version}
%build
cargo build --release --manifest-path ./Cargo.toml --offline --all-targets --all-features -v
%post
if ( getent group|grep -qw input )
then
chown root:input /usr/bin/wzmach
chmod 2755 /usr/bin/wzmach
else
chmod 6755 /usr/bin/wzmach
fi
%install
install -d -m 755 %{buildroot}%{_datadir}/applications
install -d -m 755 %{buildroot}%{_bindir}
install -d -m 755 %{buildroot}%{_sysconfdir}/wzmach
install -d -m 755 %{buildroot}%{_prefix}/lib/udev/rules.d
install -p -m 2755 target/release/wzmach %{buildroot}%{_bindir}/wzmach
install -p -m 644 config.ron %{buildroot}%{_sysconfdir}/wzmach/config.ron
install -p -m 644 wzmach.desktop %{buildroot}%{_datadir}/applications/wzmach.desktop
install -p -m 644 91-uinput.rules %{buildroot}%{_prefix}/lib/udev/rules.d/91-uinput.rules
%files
%dir %{_sysconfdir}/wzmach
%dir %{_prefix}/lib/udev
%dir %{_prefix}/lib/udev/rules.d
%{_bindir}/wzmach
%{_datadir}/applications/wzmach.desktop
%{_sysconfdir}/wzmach/config.ron
%{_prefix}/lib/udev/rules.d/91-uinput.rules
%changelog