]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without tests # build without tests | |
4 | ||
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} | |
11 | Version: 0.2.0 | |
12 | Release: 1 | |
13 | License: PHP 3.01 | |
14 | Group: Development/Languages/PHP | |
15 | Source0: http://pecl.php.net/get/%{modname}-0.1.0.tgz | |
16 | # Source0-md5: 8431731cc8a7921a2922af23a57a572f | |
17 | Patch99: prepatch.patch | |
18 | Patch100: branch.diff | |
19 | Patch1: php-pecl-%{modname}-lib64_fix.patch | |
20 | URL: http://pecl.php.net/package/sasl/ | |
21 | BuildRequires: %{php_name}-devel >= 3:5.0.4 | |
22 | BuildRequires: cyrus-sasl-devel | |
23 | BuildRequires: rpmbuild(macros) >= 1.650 | |
24 | %{?with_tests:BuildRequires: %{php_name}-cli} | |
25 | %{?requires_php_extension} | |
26 | Provides: php(%{modname}) = %{version} | |
27 | Obsoletes: php-pecl-sasl < 0.1.0-14 | |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
29 | ||
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 | |
33 | support to connection-based protocols. The SASL extension for PHP | |
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 | ||
40 | In PECL status of this extension is: %{status}. | |
41 | ||
42 | %description -l pl.UTF-8 | |
43 | SASL to warstwa prostego uwierzytelnienia i bezpieczeństwa (Simple | |
44 | Authentication and Security Layer) zdefiniowana w RFC 2222. Dostarcza | |
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. | |
52 | ||
53 | To rozszerzenie ma w PECL status: %{status}. | |
54 | ||
55 | %prep | |
56 | %setup -qc | |
57 | mv %{modname}-*/* . | |
58 | %patch99 -p1 | |
59 | %patch100 -p0 | |
60 | %if "%{_lib}" == "lib64" | |
61 | %patch1 -p1 | |
62 | %endif | |
63 | ||
64 | %build | |
65 | phpize | |
66 | %configure | |
67 | %{__make} | |
68 | ||
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 | ||
78 | %install | |
79 | rm -rf $RPM_BUILD_ROOT | |
80 | install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}} | |
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 | |
85 | EOF | |
86 | ||
87 | %clean | |
88 | rm -rf $RPM_BUILD_ROOT | |
89 | ||
90 | %post | |
91 | %php_webserver_restart | |
92 | ||
93 | %postun | |
94 | if [ "$1" = 0 ]; then | |
95 | %php_webserver_restart | |
96 | fi | |
97 | ||
98 | %files | |
99 | %defattr(644,root,root,755) | |
100 | %doc docs/TODO docs/guide.txt | |
101 | %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini | |
102 | %attr(755,root,root) %{php_extensiondir}/%{modname}.so |