]>
Commit | Line | Data |
---|---|---|
1 | %define php_name php%{?php_suffix} | |
2 | %define modname sasl | |
3 | %define status alpha | |
4 | Summary: %{modname} - Cyrus SASL extension | |
5 | Summary(pl.UTF-8): %{modname} - rozszerzenie Cyrus SASL | |
6 | Name: %{php_name}-pecl-%{modname} | |
7 | Version: 0.1.0 | |
8 | Release: 12 | |
9 | License: PHP 3.01 | |
10 | Group: Development/Languages/PHP | |
11 | Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz | |
12 | # Source0-md5: 8431731cc8a7921a2922af23a57a572f | |
13 | Patch0: php-pecl-%{modname}-lib_fix.patch | |
14 | Patch1: php-pecl-%{modname}-lib64_fix.patch | |
15 | URL: http://pecl.php.net/package/sasl/ | |
16 | BuildRequires: cyrus-sasl-devel | |
17 | BuildRequires: %{php_name}-devel >= 3:5.0.0 | |
18 | BuildRequires: rpmbuild(macros) >= 1.650 | |
19 | %{?requires_php_extension} | |
20 | Requires: php(core) >= 5.0.4 | |
21 | Obsoletes: php-pear-%{modname} | |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
23 | ||
24 | %description | |
25 | SASL is the Simple Authentication and Security Layer (as defined by | |
26 | RFC 2222). It provides a system for adding plugable authenticating | |
27 | support to connection-based protocols. The SASL extension for PHP | |
28 | makes the Cyrus SASL library functions available to PHP. It aims to | |
29 | provide a 1-to-1 wrapper around the SASL library to provide the | |
30 | greatest amount of implementation flexibility. To that end, it is | |
31 | possible to build both a client-side and server-side SASL | |
32 | implementation entirely in PHP. | |
33 | ||
34 | In PECL status of this extension is: %{status}. | |
35 | ||
36 | %description -l pl.UTF-8 | |
37 | SASL to warstwa prostego uwierzytelnienia i bezpieczeństwa (Simple | |
38 | Authentication and Security Layer) zdefiniowana w RFC 2222. Dostarcza | |
39 | system do dodawania wtyczek obsługujących uwierzytelnianie do | |
40 | protokołów opartych na połączeniach. Rozszerzenie SASL dla PHP | |
41 | udostępnia w PHP funkcje biblioteki Cyrus SASL. Celem jest | |
42 | dostarczenie obudowania 1-do-1 biblioteki SASL, aby udostępnić jak | |
43 | największą elastyczność implementacji. W tym celu możliwe jest | |
44 | zbudowanie zarówno klienckiej jak i serwerowej implementacji SASL | |
45 | całkowicie w PHP. | |
46 | ||
47 | To rozszerzenie ma w PECL status: %{status}. | |
48 | ||
49 | %prep | |
50 | %setup -qc | |
51 | mv %{modname}-%{version}/* . | |
52 | # Ugly, could be done somehow prettier (one combined patch?) | |
53 | %if "%{_lib}" == "lib64" | |
54 | %patch1 -p2 | |
55 | %else | |
56 | %patch0 -p2 | |
57 | %endif | |
58 | ||
59 | %build | |
60 | phpize | |
61 | %configure | |
62 | %{__make} | |
63 | ||
64 | %install | |
65 | rm -rf $RPM_BUILD_ROOT | |
66 | install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}} | |
67 | install -p 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 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 |