File gufw.spec of Package gufw

%global gufw_py3_install() %{expand:\\\
  CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\
  %{__python3} %{py_setup} %{?py_setup_args} install -O1 --root %{buildroot} --prefix %{_prefix} %{?*}
  rm -rfv %{buildroot}%{_bindir}/__pycache__
}

Name:           gufw
Version:        24.04
Release:        0
Summary:        Uncomplicated Firewall

License:        GPLv3
URL:            https://github.com/costales/gufw
Source0:        %{name}-%{version}.tar.xz
Patch0:         gufw-21.04.0-wayland.patch
Patch1:         gufw-21.04.0-location.patch

BuildArch:      noarch
BuildRequires:  autoconf
BuildRequires:  intltool
BuildRequires:  gtk3
BuildRequires:  python3-devel python3-distutils-extra python3-gobject
Requires:       gtk3
Requires:       webkit2gtk3
Requires:       polkit
Requires:       python3-gobject
Requires:       ufw

%description
An easy, intuitive, way to manage your Linux firewall. It supports common
tasks such as allowing or blocking pre-configured, common p2p, or individual
ports port(s), and many others!

%prep
%autosetup -p1

%build
%py3_build

%install
%gufw_py3_install

%files
%license COPYING.GPL3
%doc README.md
%{_sysconfdir}/gufw
%{_bindir}/gufw
%{_bindir}/gufw-pkexec
%{python3_sitelib}/gufw*
%{_datadir}/applications/gufw.desktop
%{_datadir}/gufw
%{_datadir}/icons/hicolor/*/apps/gufw.*
%{_mandir}/man8/gufw.8.*
%{_datadir}/polkit-1/actions/com.ubuntu.pkexec.gufw.policy
%{_datadir}/locale/*/LC_MESSAGES/gufw.mo

%changelog
openSUSE Build Service is sponsored by