Name:		hushboard
Epoch:		2
Version:	1.60.41
Release:	2%{?dist}
Summary:	Mute your mic while you’re typing
Group:		applications/multimedia

License:	MIT
URL:		https://github.com/stuartlangridge/hushboard
Source0:	%{name}-%{version}.tar.gz

Patch1:		hushboard-muted-icon.patch
Patch2:		hushboard-only-running-sources-are-active.patch
Patch3:		hushboard-python-3.12.patch


BuildArch:	noarch
BuildRequires:	python3-devel python3-setuptools

%description
Never listen to the thundering sounds of someone typing on a video
call ever again!

Well, nobody who talks to you will have to listen to it. If you don’t
want to listen to it either, encourage your friends and colleagues to
install Hushboard. While you’re typing, your mic is muted. When you
stop, it unmutes again.

That’s it.

Hushboard. Sssshhhh.

%prep
%autosetup -c -p1

%build
%py3_build
sed -re 's!^(Icon=)\$\{SNAP\}/.*/([^/]+)[[:space:]]*$!\1\2!' \
    -e  's!^(Categories=)(.*)$!\1AudioVideo;Audio;!' \
    snap/gui/hushboard.desktop > hushboard.desktop

%install
%py3_install
install -d ${RPM_BUILD_ROOT}%{_datadir}/applications
install -m 644 %{name}.desktop ${RPM_BUILD_ROOT}%{_datadir}/applications/
install -d ${RPM_BUILD_ROOT}%{_datadir}/icons/hicolor/scalable/apps
install -m 644 %{name}/icons/%{name}.svg ${RPM_BUILD_ROOT}%{_datadir}/icons/hicolor/scalable/apps/

%files
%license LICENSE
%doc README.md
%{python3_sitelib}/*
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg

%changelog
* Wed Dec  4 2024 Philippe Troin <phil@fifi.org> - 2:1.60.41-2
- Add muted icon patch.
- Add Python 3.12 compatibility.
- Only consider running sources as active.

* Wed Jan 10 2024 Philippe Troin <phil@fifi.org> - 1:1.60.41-1
- Bump epoch for new version numbering scheme.

* Wed Jan 10 2024 Philippe Troin <phil@fifi.org> - 1.60.41-1
- Upstream updated to 1.60.41.

* Sat Mar 12 2022 Philippe Troin <phil@fifi.org> - 2021.03.17.git.c16611c539-1
- Created.