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