File cranix-firewall.spec of Package cranix-firewall
#
# spec file for package cranix-firewall
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: cranix-firewall
Version: %{_cranix_version}
Release: 0
Summary: Setup the Firewall on a CRANIX/CEPHALIX Server
# FIXME: Select a correct license from https://github.com/openSUSE/spec-cleaner#spdx-licenses
License: CC-BY-NC-ND-4.0
Vendor: %{_cranix_vendor}
URL: %_cranix_url
Source: %{name}.tar.bz2
BuildArch: noarch
Requires: /usr/sbin/iptables
BuildRequires: cranix-base
BuildRequires: systemd-rpm-macros
Provides: firewalld, firewall-macros, firewalld-bash-completion, firewalld-lang, python3-firewall
Obsoletes: firewalld, firewall-macros, firewalld-bash-completion, firewalld-lang, python3-firewall
Conflicts: firewalld, firewall-macros, firewalld-bash-completion, firewalld-lang, python3-firewall
%description
%prep
%setup -q -n %{name}
%build
%install
%make_install
%pre
%service_add_pre %{name}.service
%preun
%service_del_preun %{name}.service
%post
%service_add_post %{name}.service
/usr/bin/systemctl enable cranix-firewall
%postun
%service_del_postun %{name}.service
%files
%defattr(-,root,root)
%license LICENSE
%doc README.md
%dir /usr/share/cranix
%dir /usr/share/cranix/templates
%dir /usr/share/cranix/tools
/usr/share/cranix/templates/firewall
/usr/lib/systemd/system/cranix-firewall.service
%defattr(755,root,root)
/usr/share/cranix/tools/firewall
/usr/sbin/crx_firewall.py
/usr/bin/firewall-*
%changelog