]>
Commit | Line | Data |
---|---|---|
b7b553cd ER |
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} | |
9b3ecba9 | 7 | Version: 0.1.0 |
5e8ac438 | 8 | Release: 12 |
2afbc69d | 9 | License: PHP 3.01 |
9b3ecba9 | 10 | Group: Development/Languages/PHP |
b7b553cd | 11 | Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz |
9b3ecba9 | 12 | # Source0-md5: 8431731cc8a7921a2922af23a57a572f |
b7b553cd ER |
13 | Patch0: php-pecl-%{modname}-lib_fix.patch |
14 | Patch1: php-pecl-%{modname}-lib64_fix.patch | |
9b3ecba9 AG |
15 | URL: http://pecl.php.net/package/sasl/ |
16 | BuildRequires: cyrus-sasl-devel | |
b7b553cd ER |
17 | BuildRequires: %{php_name}-devel >= 3:5.0.0 |
18 | BuildRequires: rpmbuild(macros) >= 1.650 | |
c3a5ebc9 | 19 | %{?requires_php_extension} |
33ee3aa5 | 20 | Requires: php(core) >= 5.0.4 |
b7b553cd | 21 | Obsoletes: php-pear-%{modname} |
9b3ecba9 AG |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
23 | ||
9b3ecba9 AG |
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 | |
f735bf96 | 27 | support to connection-based protocols. The SASL extension for PHP |
9b3ecba9 AG |
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 | ||
b7b553cd | 34 | In PECL status of this extension is: %{status}. |
9b3ecba9 | 35 | |
0cb9801d JR |
36 | %description -l pl.UTF-8 |
37 | SASL to warstwa prostego uwierzytelnienia i bezpieczeństwa (Simple | |
241d2ddc | 38 | Authentication and Security Layer) zdefiniowana w RFC 2222. Dostarcza |
0cb9801d JR |
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. | |
241d2ddc | 46 | |
b7b553cd | 47 | To rozszerzenie ma w PECL status: %{status}. |
9b3ecba9 AG |
48 | |
49 | %prep | |
b7b553cd ER |
50 | %setup -qc |
51 | mv %{modname}-%{version}/* . | |
7265728d | 52 | # Ugly, could be done somehow prettier (one combined patch?) |
1de3250c | 53 | %if "%{_lib}" == "lib64" |
b7b553cd | 54 | %patch1 -p2 |
1de3250c | 55 | %else |
b7b553cd | 56 | %patch0 -p2 |
7265728d | 57 | %endif |
9b3ecba9 AG |
58 | |
59 | %build | |
9b3ecba9 | 60 | phpize |
7265728d | 61 | %configure |
9b3ecba9 AG |
62 | %{__make} |
63 | ||
64 | %install | |
65 | rm -rf $RPM_BUILD_ROOT | |
1302764a | 66 | install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}} |
b7b553cd ER |
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 | |
c3a5ebc9 | 71 | EOF |
9b3ecba9 AG |
72 | |
73 | %clean | |
74 | rm -rf $RPM_BUILD_ROOT | |
75 | ||
76 | %post | |
1302764a | 77 | %php_webserver_restart |
9b3ecba9 | 78 | |
c3a5ebc9 ER |
79 | %postun |
80 | if [ "$1" = 0 ]; then | |
1302764a | 81 | %php_webserver_restart |
9b3ecba9 AG |
82 | fi |
83 | ||
84 | %files | |
85 | %defattr(644,root,root,755) | |
b7b553cd ER |
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 |