]>
Commit | Line | Data |
---|---|---|
1 | %define _modname sasl | |
2 | %define _status alpha | |
3 | Summary: %{_modname} - Cyrus SASL extension | |
4 | Summary(pl.UTF-8): %{_modname} - rozszerzenie Cyrus SASL | |
5 | Name: php-pecl-%{_modname} | |
6 | Version: 0.1.0 | |
7 | Release: 7 | |
8 | License: PHP 3.01 | |
9 | Group: Development/Languages/PHP | |
10 | Source0: http://pecl.php.net/get/%{_modname}-%{version}.tgz | |
11 | # Source0-md5: 8431731cc8a7921a2922af23a57a572f | |
12 | Patch0: %{name}-lib_fix.patch | |
13 | Patch1: %{name}-lib64_fix.patch | |
14 | URL: http://pecl.php.net/package/sasl/ | |
15 | BuildRequires: cyrus-sasl-devel | |
16 | BuildRequires: php-devel >= 3:5.0.0 | |
17 | BuildRequires: rpmbuild(macros) >= 1.344 | |
18 | %{?requires_php_extension} | |
19 | Requires: php-common >= 4:5.0.4 | |
20 | Obsoletes: php-pear-%{_modname} | |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
22 | ||
23 | %description | |
24 | SASL is the Simple Authentication and Security Layer (as defined by | |
25 | RFC 2222). It provides a system for adding plugable authenticating | |
26 | support to connection-based protocols. The SASL extension for PHP | |
27 | makes the Cyrus SASL library functions available to PHP. It aims to | |
28 | provide a 1-to-1 wrapper around the SASL library to provide the | |
29 | greatest amount of implementation flexibility. To that end, it is | |
30 | possible to build both a client-side and server-side SASL | |
31 | implementation entirely in PHP. | |
32 | ||
33 | In PECL status of this extension is: %{_status}. | |
34 | ||
35 | %description -l pl.UTF-8 | |
36 | SASL to warstwa prostego uwierzytelnienia i bezpieczeństwa (Simple | |
37 | Authentication and Security Layer) zdefiniowana w RFC 2222. Dostarcza | |
38 | system do dodawania wtyczek obsługujących uwierzytelnianie do | |
39 | protokołów opartych na połączeniach. Rozszerzenie SASL dla PHP | |
40 | udostępnia w PHP funkcje biblioteki Cyrus SASL. Celem jest | |
41 | dostarczenie obudowania 1-do-1 biblioteki SASL, aby udostępnić jak | |
42 | największą elastyczność implementacji. W tym celu możliwe jest | |
43 | zbudowanie zarówno klienckiej jak i serwerowej implementacji SASL | |
44 | całkowicie w PHP. | |
45 | ||
46 | To rozszerzenie ma w PECL status: %{_status}. | |
47 | ||
48 | %prep | |
49 | %setup -q -c | |
50 | # Ugly, could be done somehow prettier (one combined patch?) | |
51 | %if "%{_lib}" == "lib64" | |
52 | %patch1 -p1 | |
53 | %else | |
54 | %patch0 -p1 | |
55 | %endif | |
56 | ||
57 | %build | |
58 | cd %{_modname}-%{version} | |
59 | phpize | |
60 | %configure | |
61 | %{__make} | |
62 | ||
63 | %install | |
64 | rm -rf $RPM_BUILD_ROOT | |
65 | install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}} | |
66 | ||
67 | install %{_modname}-%{version}/modules/%{_modname}.so $RPM_BUILD_ROOT%{php_extensiondir} | |
68 | cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{_modname}.ini | |
69 | ; Enable %{_modname} extension module | |
70 | extension=%{_modname}.so | |
71 | EOF | |
72 | ||
73 | %clean | |
74 | rm -rf $RPM_BUILD_ROOT | |
75 | ||
76 | %post | |
77 | %php_webserver_restart | |
78 | ||
79 | %postun | |
80 | if [ "$1" = 0 ]; then | |
81 | %php_webserver_restart | |
82 | fi | |
83 | ||
84 | %files | |
85 | %defattr(644,root,root,755) | |
86 | %doc %{_modname}-%{version}/docs/TODO | |
87 | %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{_modname}.ini | |
88 | %attr(755,root,root) %{php_extensiondir}/%{_modname}.so |