e71a3f8
%{!?_httpd_apxs:       %{expand: %%global _httpd_apxs       %%{_sbindir}/apxs}}
e71a3f8
%{!?_httpd_mmn:        %{expand: %%global _httpd_mmn        %%(cat %{_includedir}/httpd/.mmn || echo missing-httpd-devel)}}
e71a3f8
%{!?_httpd_confdir:    %{expand: %%global _httpd_confdir    %%{_sysconfdir}/httpd/conf.d}}
e71a3f8
# /etc/httpd/conf.d with httpd < 2.4 and defined as /etc/httpd/conf.modules.d with httpd >= 2.4
e71a3f8
%{!?_httpd_modconfdir: %{expand: %%global _httpd_modconfdir %%{_sysconfdir}/httpd/conf.d}}
e71a3f8
%{!?_httpd_moddir:    %{expand: %%global _httpd_moddir    %%{_libdir}/httpd/modules}}
e71a3f8
e71a3f8
e71a3f8
Name: mod_ruid2
e71a3f8
Version: 0.9.8
afe8dea
Release: 6%{?dist}
e71a3f8
Summary: A suexec module for Apache
e71a3f8
e71a3f8
License: ASL 2.0
e71a3f8
URL: http://sourceforge.net/projects/mod-ruid/
e71a3f8
Source0: http://downloads.sourceforge.net/project/mod-ruid/mod_ruid2/mod_ruid2-%{version}.tar.bz2
e71a3f8
Source1: mod_ruid2.conf
e71a3f8
Source2: 10-mod_ruid2.conf
e71a3f8
e71a3f8
BuildRequires: httpd-devel libcap-devel
e71a3f8
e71a3f8
Requires: httpd
e71a3f8
Requires: httpd-mmn = %{_httpd_mmn}
e71a3f8
e71a3f8
%description
e71a3f8
mod_ruid2 is a suexec module for Apache which takes advantage of 
e71a3f8
POSIX.1e capabilities to increase performance.
e71a3f8
e71a3f8
%prep
e71a3f8
%setup -q
e71a3f8
e71a3f8
e71a3f8
%build
e71a3f8
apxs -l cap -c %{name}.c
e71a3f8
e71a3f8
e71a3f8
%install
e71a3f8
mkdir -p %{buildroot}%{_httpd_confdir}
e71a3f8
mkdir -p %{buildroot}%{_libdir}/httpd/modules
e71a3f8
install -m 700 -d %{buildroot}%{_localstatedir}/lib/%{name}
e71a3f8
e71a3f8
%if "%{_httpd_modconfdir}" != "%{_httpd_confdir}"
e71a3f8
# 2.4-style
e71a3f8
install -Dp -m0644 %{SOURCE2} %{buildroot}%{_httpd_modconfdir}/10-mod_ruid2.conf
e71a3f8
install -Dp -m0644 %{SOURCE1} %{buildroot}%{_httpd_confdir}/mod_ruid2.conf
e71a3f8
%else
e71a3f8
# 2.2-style
e71a3f8
install -d -m0755 %{buildroot}%{_httpd_confdir}
e71a3f8
cat %{SOURCE2} %{SOURCE1} > %{buildroot}%{_httpd_confdir}/mod_ruid2.conf
e71a3f8
%endif
e71a3f8
install -m 755 .libs/mod_ruid2.so %{buildroot}%{_httpd_moddir}
e71a3f8
e71a3f8
e71a3f8
%files
e71a3f8
%doc README
e71a3f8
%{_httpd_moddir}/mod_ruid2.so
e71a3f8
%config(noreplace) %{_httpd_confdir}/*.conf
e71a3f8
e71a3f8
%if "%{_httpd_modconfdir}" != "%{_httpd_confdir}"
e71a3f8
    %config(noreplace) %{_httpd_modconfdir}/*.conf
e71a3f8
%endif
e71a3f8
e71a3f8
%{!?_licensedir:%global license %%doc}
e71a3f8
%license LICENSE
e71a3f8
e71a3f8
%changelog
afe8dea
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org>
afe8dea
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
afe8dea
088f673
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org>
088f673
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
088f673
82b8fd7
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.8-4
82b8fd7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
82b8fd7
af89e7c
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.8-3
af89e7c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
af89e7c
e71a3f8
* Mon Mar 16 2015 Athmane Madjoudj <athmane@fedoraproject.org> 0.9.8-2
e71a3f8
- Fix license issue
e71a3f8
- Add a workarround for epel 
e71a3f8
e71a3f8
* Sun Apr 20 2014 Athmane Madjoudj <athmane@fedoraproject.org> 0.9.8-1
e71a3f8
- Initial spec.
e71a3f8