51 lines
1.3 KiB
RPMSpec
51 lines
1.3 KiB
RPMSpec
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
|