]>
Commit | Line | Data |
---|---|---|
49a45d24 ER |
1 | %define mod_name auth_openid |
2 | %define apxs %{_sbindir}/apxs | |
3 | Summary: The Apache OpenID Module | |
4 | Name: apache-mod_%{mod_name} | |
5 | Version: 0.6 | |
6 | Release: 0.1 | |
7 | License: MIT | |
8 | Group: Networking/Daemons/HTTP | |
9 | Source0: http://butterfat.net/releases/mod_auth_openid/mod_auth_openid-%{version}.tar.gz | |
10 | # Source0-md5: f72c6a716e368f83756b25c062e70666 | |
11 | URL: http://findingscience.com/mod_auth_openid/ | |
12 | BuildRequires: %{apxs} | |
13 | BuildRequires: apache-devel >= 2.2 | |
14 | BuildRequires: libopkele-devel >= 2.0 | |
15 | BuildRequires: rpmbuild(macros) >= 1.268 | |
16 | BuildRequires: sqlite3-devel | |
17 | Requires: apache(modules-api) = %apache_modules_api | |
18 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
19 | ||
20 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) | |
21 | %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d | |
22 | ||
23 | %description | |
24 | mod_auth_openid is an authentication module for the Apache 2 | |
25 | webserver. It handles the functions of an OpenID consumer as specified | |
26 | in the OpenID 2.0 specification. | |
27 | ||
28 | %prep | |
29 | %setup -q -n mod_%{mod_name}-%{version} | |
30 | ||
31 | %build | |
32 | %configure \ | |
33 | --with-apxs=%{apxs} | |
34 | %{__make} \ | |
35 | CC="%{__cc}" \ | |
36 | APACHE_CFLAGS="%{rpmcflags} -I$(%{apxs} -q INCLUDEDIR) -I$(apr-1-config --includedir) -I$(apu-1-config --includedir)" | |
37 | ||
38 | %install | |
39 | rm -rf $RPM_BUILD_ROOT | |
40 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}} | |
41 | install -p .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir} | |
42 | ||
43 | # or, if no directives needed, put just LoadModule line | |
44 | echo 'LoadModule %{mod_name}_module modules/mod_%{mod_name}.so' > \ | |
45 | $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf | |
46 | ||
47 | %clean | |
48 | rm -rf $RPM_BUILD_ROOT | |
49 | ||
50 | %post | |
51 | %service -q httpd restart | |
52 | ||
53 | %postun | |
54 | if [ "$1" = "0" ]; then | |
55 | %service -q httpd restart | |
56 | fi | |
57 | ||
58 | %files | |
59 | %defattr(644,root,root,755) | |
60 | %doc AUTHORS COPYING ChangeLog NEWS README UPGRADE | |
61 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf | |
62 | %attr(755,root,root) %{_pkglibdir}/mod_%{mod_name}.so |