File crowdsec-apache2-bouncer.spec of Package crowdsec-apache2-bouncer

#
# spec file for package crowdsec-apache2-bouncer
#
# Copyright (c) 2025 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:           crowdsec-apache2-bouncer
Version:        0.1
Release:        0
Summary:        Apache httpd access module for Crowdsec service
License:        MIT
URL:            https://github.com/crowdsecurity/cs-apache2-bouncer
Source0:        %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1:        setup-%{name}
BuildRequires:  apache2-devel
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  crowdsec
BuildRequires:  gettext
BuildRequires:  libtool
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(apr-1) >= 1.3
BuildRequires:  pkgconfig(apr-util-1) >= 1.3

%description
Module for the Apache HTTP Web Server that allows filtering of unwanted web traffic.

%prep
%autosetup -n cs-apache2-bouncer-%{version}

%build
autoreconf -vfi
%configure
%make_build

%install
%make_install
install -Dm0644 config/%{name}.conf %{buildroot}%{_sysconfdir}/crowdsec/bouncers/%{name}.conf
install -Dm0600 config/mod_crowdsec.conf %{buildroot}%{_sysconfdir}/apache2/conf.d/mod_crowdsec.conf
install -Dm0755 %{SOURCE1} %{buildroot}%{_bindir}/setup-%{name}

%files
%license LICENSE
%doc README.md
%config(noreplace) %{_sysconfdir}/crowdsec/bouncers/%{name}.conf
%config %{_sysconfdir}/apache2/conf.d/mod_crowdsec.conf
%{_bindir}/setup-%{name}
%{_libdir}/apache2/mod_crowdsec.so

%changelog
openSUSE Build Service is sponsored by