%global plugin_id gitea-proxy %global plugin_name %{plugin_id}-rule-exclusions Name: mod_security_crs_plugin_%{gsub %{plugin_id} - _} Version: 1.7.0 Release: %autorelease Summary: CRS Gitea proxy rule exclusions plugin License: Apache-2.0 URL: https://git.demus.dk/demus/%{plugin_name}-plugin/ Source0: https://git.demus.dk/demus/%{plugin_name}-plugin/archive/%{version}.tar.gz BuildArch: noarch Requires: mod_security_crs > 4.2.0-2 %description This CRS plugin contains rule exclusions for proxying an external address to a local Gitea instance, a git devops platform, so it can be run together with OWASP CRS (CRS). %prep %setup -q -n %{plugin_name}-plugin %build %install %{__install} -Dm0644 plugins/%{plugin_name}-before.conf %{buildroot}%{_datarootdir}/mod_modsecurity_crs/plugins/%{plugin_id}/%{plugin_name}-before.conf %{__install} -m0644 plugins/%{plugin_name}-config.conf %{buildroot}%{_datarootdir}/mod_modsecurity_crs/plugins/%{plugin_id}/%{plugin_name}-config.conf.example %{__install} -Dm0644 plugins/%{plugin_name}-config.conf %{buildroot}%{_sysconfdir}/httpd/modsecurity.d/plugins/%{plugin_name}-config.conf %{__install} -m0644 plugins/%{plugin_id}-whitelisted-files.data %{buildroot}%{_sysconfdir}/httpd/modsecurity.d/plugins/%{plugin_id}-whitelisted-files.data %post if [ $1 == 1 ]; then %{__ln_s} %{_datarootdir}/mod_modsecurity_crs/plugins/%{plugin_id}/%{plugin_name}-before.conf %{_sysconfdir}/httpd/modsecurity.d/plugins/%{plugin_name}-before.conf fi exit 0 %preun if [ $1 == 0 ]; then %{__rm} %{_sysconfdir}/httpd/modsecurity.d/plugins/%{plugin_name}-before.conf fi exit 0 %files %license LICENSE %doc README.md %config(noreplace) %{_sysconfdir}/httpd/modsecurity.d/plugins/%{plugin_name}-config.conf %config(noreplace) %{_sysconfdir}/httpd/modsecurity.d/plugins/%{plugin_id}-whitelisted-files.data %ghost %config(noreplace) %{_sysconfdir}/httpd/modsecurity.d/plugins/%{plugin_name}-before.conf %{_datarootdir}/mod_modsecurity_crs/plugins/%{plugin_id}/ %changelog %autochangelog