This commit is contained in:
2025-02-15 02:47:05 +01:00
commit 4f5b6daa7f
2 changed files with 50 additions and 0 deletions

Binary file not shown.

50
mod_ip_whitelist.spec Normal file
View File

@@ -0,0 +1,50 @@
Name: mod_ip_whitelist
Version: 1.0.0
Release: %autorelease
Summary: IP Whitelist module for Apache
License: GPL-3.0
URL: https://github.com/zepricic/mod_ip_whitelist
Source0: https://github.com/zpericic/mod_ip_whitelist/releases/download/v%{version}/%name-%{version}.tar.gz
BuildRequires: httpd-devel
BuildRequires: libtool, make, cmake
BuildRequires: git
Requires: httpd-mmn = %{_httpd_mmn}
Requires: krb5-libs >= 1.11.5
%description
mod_ip_whitelist allows access to the server to be controlled based on
the IP address of the remote client. You could white list client which
you like and all are served with configurable status code, 403 by
default.
%prep
%autosetup -S git_am
%build
export APXS=%{_httpd_apxs}
%cmake
%cmake_build
%install
%{__rm} -rf %{buildroot}
mkdir -p %{buildroot}%{_httpd_moddir}
%cmake_install
# Apache configuration for the module
echo "LoadModule ip_whitelist_module modules/mod_ip_whitelist.so" > 10-ip_whitelist.conf
mkdir -p %{buildroot}%{_httpd_modconfdir}
install -m 644 10-ip_whitelist.conf %{buildroot}%{_httpd_modconfdir}
%files
%doc
%defattr(-,root,root)
%doc README.md COPYING
%config(noreplace) %{_httpd_modconfdir}/10-ip_whitelist.conf
%{_httpd_moddir}/mod_ip_whitelist.so
%changelog
%autochangelog