bazzite/spec_files/ds-inhibit/ds-inhibit.spec
Kyle Gospodnetich 4c8034f5a6 chore: Standardize all bash scripts on #!/usr/bin/bash
chore: Standardize all python scripts on #!/usr/bin/python3
chore: Update path for ds-inhibit patch
chore(readme): Remove unused package
2023-12-23 00:02:42 -08:00

59 lines
1.4 KiB
RPMSpec

Name: ds-inhibit
Version: {{{ git_dir_version }}}
Release: 1%{?dist}
Summary: DualShock 4/DualSense mouse inhibitor
License: BSD-2-Clause
URL: https://github.com/ublue-os/bazzite
Source: https://gitlab.com/evlaV/%{name}/-/archive/main/%{name}-main.tar.gz
BuildArch: noarch
Patch0: fedora.patch
Requires: python3
Requires: python3-inotify
BuildRequires: systemd-rpm-macros
%description
DualShock 4/DualSense mouse inhibitor
# Disable debug packages
%define debug_package %{nil}
%prep
%setup -n %{name}-main
%patch 0
chmod +x ds_inhibit.py
%build
%install
mkdir -p %{buildroot}%{_bindir}/
mkdir -p %{buildroot}%{_unitdir}/
cp -v ds_inhibit.py %{buildroot}%{_bindir}/ds-inhibit
cp -v systemd.service %{buildroot}%{_unitdir}/ds-inhibit.service
# Do post-installation
%post
%systemd_post ds-inhibit.service
# Do before uninstallation
%preun
%systemd_preun ds-inhibit.service
# Do after uninstallation
%postun
%systemd_postun_with_restart ds-inhibit.service
# This lists all the files that are included in the rpm package and that
# are going to be installed into target system where the rpm is installed.
%files
%license LICENSE
%{_bindir}/ds-inhibit
%{_unitdir}/ds-inhibit.service
# Finally, changes from the latest release of your application are generated from
# your project's Git history. It will be empty until you make first annotated Git tag.
%changelog
{{{ git_dir_changelog }}}