1 # Replace MODNAME with real module name (example for mod_example)
2 # Replace VERSION with version since what confdir support was
3 # introduced for the module. only needed for older .specs, not needed
6 %define mod_name auth_cas
7 %define apxs %{_sbindir}/apxs
8 Summary: Apache module: CAS
9 Summary(pl.UTF-8): ModuĊ Apache'a: CAS
10 Name: apache-mod_%{mod_name}
14 Group: Networking/Daemons/HTTP
15 # svn export https://www.ja-sig.org/svn/cas-clients/mod_auth_cas/tags/mod_auth_cas-1.0.8
16 Source0: mod_%{mod_name}-%{version}.tar.bz2
17 # Source0-md5: 2bd4117f7a8b25ade77f53c59c66944a
19 URL: https://www.ja-sig.org/svn/cas-clients/mod_auth_cas/
20 BuildRequires: %{apxs}
21 BuildRequires: apache-devel >= 2.2
22 BuildRequires: rpmbuild(macros) >= 1.268
23 Requires: apache(modules-api) = %apache_modules_api
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
27 %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
31 %description -l pl.UTF-8
34 %setup -q -n mod_%{mod_name}-%{version}
37 %{apxs} -c src/mod_%{mod_name}.c
40 rm -rf $RPM_BUILD_ROOT
41 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
43 install src/.libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
45 # module configuration
46 # - should contain LoadModule line
47 # - and directives must be between IfModule (so user could disable the module easily)
48 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf
51 rm -rf $RPM_BUILD_ROOT
54 %service -q httpd restart
57 if [ "$1" = "0" ]; then
58 %service -q httpd restart
62 %defattr(644,root,root,755)
64 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf
65 %attr(755,root,root) %{_pkglibdir}/*