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