]>
Commit | Line | Data |
---|---|---|
b963a42b ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # build without tests | |
4 | ||
b7b553cd ER |
5 | %define php_name php%{?php_suffix} |
6 | %define modname sasl | |
7 | %define status alpha | |
8 | Summary: %{modname} - Cyrus SASL extension | |
9 | Summary(pl.UTF-8): %{modname} - rozszerzenie Cyrus SASL | |
10 | Name: %{php_name}-pecl-%{modname} | |
3230199c ER |
11 | Version: 0.2.0 |
12 | Release: 1 | |
2afbc69d | 13 | License: PHP 3.01 |
9b3ecba9 | 14 | Group: Development/Languages/PHP |
3230199c | 15 | Source0: http://pecl.php.net/get/%{modname}-0.1.0.tgz |
9b3ecba9 | 16 | # Source0-md5: 8431731cc8a7921a2922af23a57a572f |
3230199c ER |
17 | Patch99: prepatch.patch |
18 | Patch100: branch.diff | |
b7b553cd | 19 | Patch1: php-pecl-%{modname}-lib64_fix.patch |
9b3ecba9 | 20 | URL: http://pecl.php.net/package/sasl/ |
12a8a0bb | 21 | BuildRequires: %{php_name}-devel >= 3:5.0.4 |
cc0eadf7 | 22 | BuildRequires: cyrus-sasl-devel |
b7b553cd | 23 | BuildRequires: rpmbuild(macros) >= 1.650 |
b963a42b | 24 | %{?with_tests:BuildRequires: %{php_name}-cli} |
c3a5ebc9 | 25 | %{?requires_php_extension} |
cc0eadf7 | 26 | Provides: php(%{modname}) = %{version} |
12b1ccc3 | 27 | Obsoletes: php-pecl-sasl < 0.1.0-14 |
9b3ecba9 AG |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
29 | ||
9b3ecba9 AG |
30 | %description |
31 | SASL is the Simple Authentication and Security Layer (as defined by | |
32 | RFC 2222). It provides a system for adding plugable authenticating | |
f735bf96 | 33 | support to connection-based protocols. The SASL extension for PHP |
9b3ecba9 AG |
34 | makes the Cyrus SASL library functions available to PHP. It aims to |
35 | provide a 1-to-1 wrapper around the SASL library to provide the | |
36 | greatest amount of implementation flexibility. To that end, it is | |
37 | possible to build both a client-side and server-side SASL | |
38 | implementation entirely in PHP. | |
39 | ||
b7b553cd | 40 | In PECL status of this extension is: %{status}. |
9b3ecba9 | 41 | |
0cb9801d JR |
42 | %description -l pl.UTF-8 |
43 | SASL to warstwa prostego uwierzytelnienia i bezpieczeństwa (Simple | |
241d2ddc | 44 | Authentication and Security Layer) zdefiniowana w RFC 2222. Dostarcza |
0cb9801d JR |
45 | system do dodawania wtyczek obsługujących uwierzytelnianie do |
46 | protokołów opartych na połączeniach. Rozszerzenie SASL dla PHP | |
47 | udostępnia w PHP funkcje biblioteki Cyrus SASL. Celem jest | |
48 | dostarczenie obudowania 1-do-1 biblioteki SASL, aby udostępnić jak | |
49 | największą elastyczność implementacji. W tym celu możliwe jest | |
50 | zbudowanie zarówno klienckiej jak i serwerowej implementacji SASL | |
51 | całkowicie w PHP. | |
241d2ddc | 52 | |
b7b553cd | 53 | To rozszerzenie ma w PECL status: %{status}. |
9b3ecba9 AG |
54 | |
55 | %prep | |
b7b553cd | 56 | %setup -qc |
3230199c ER |
57 | mv %{modname}-*/* . |
58 | %patch99 -p1 | |
59 | %patch100 -p0 | |
1de3250c | 60 | %if "%{_lib}" == "lib64" |
3230199c | 61 | %patch1 -p1 |
7265728d | 62 | %endif |
9b3ecba9 AG |
63 | |
64 | %build | |
9b3ecba9 | 65 | phpize |
7265728d | 66 | %configure |
9b3ecba9 AG |
67 | %{__make} |
68 | ||
b963a42b ER |
69 | %if %{with tests} |
70 | # simple module load test | |
71 | %{__php} -n \ | |
72 | -dextension_dir=modules \ | |
73 | -dextension=%{modname}.so \ | |
74 | -m > modules.log | |
75 | grep %{modname} modules.log | |
76 | %endif | |
77 | ||
9b3ecba9 AG |
78 | %install |
79 | rm -rf $RPM_BUILD_ROOT | |
1302764a | 80 | install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}} |
b7b553cd ER |
81 | install -p modules/%{modname}.so $RPM_BUILD_ROOT%{php_extensiondir} |
82 | cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini | |
83 | ; Enable %{modname} extension module | |
84 | extension=%{modname}.so | |
c3a5ebc9 | 85 | EOF |
9b3ecba9 AG |
86 | |
87 | %clean | |
88 | rm -rf $RPM_BUILD_ROOT | |
89 | ||
90 | %post | |
1302764a | 91 | %php_webserver_restart |
9b3ecba9 | 92 | |
c3a5ebc9 ER |
93 | %postun |
94 | if [ "$1" = 0 ]; then | |
1302764a | 95 | %php_webserver_restart |
9b3ecba9 AG |
96 | fi |
97 | ||
98 | %files | |
99 | %defattr(644,root,root,755) | |
3230199c | 100 | %doc docs/TODO docs/guide.txt |
b7b553cd ER |
101 | %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini |
102 | %attr(755,root,root) %{php_extensiondir}/%{modname}.so |