%define modname sasl %define dirname %{modname} %define soname %{modname}.so %define inifile A40_%{modname}.ini Summary: Cyrus SASL Extension Name: php-%{modname} Epoch: 1 Version: 0.1.0 %define subrel 2 Release: %mkrel 34 Group: Development/PHP License: PHP License URL: http://pecl.php.net/package/sasl Source0: sasl-%{version}.tar.bz2 Patch0: sasl-0.1.0-lib64.diff BuildRequires: php-devel >= 3:5.2.0 BuildRequires: libsasl-devel %description SASL is the Simple Authentication and Security Layer (as defined by RFC 2222). It provides a system for adding plugable authenticating support to connection-based protocols. The SASL Extension for PHP makes the Cyrus SASL library functions available to PHP. It aims to provide a 1-to-1 wrapper around the SASL library to provide the greatest amount of implementation flexibility. To that end, it is possible to build both a client-side and server-side SASL implementation entirely in PHP. %prep %setup -q -n sasl-%{version} %patch0 -p0 %build %serverbuild export SASL_SUB="sasl" phpize %configure2_5x --with-libdir=%{_lib} \ --with-%{modname}=shared,%{_prefix} %make mv modules/*.so . %install rm -rf %{buildroot} install -d %{buildroot}%{_libdir}/php/extensions install -d %{buildroot}%{_sysconfdir}/php.d install -m755 %{soname} %{buildroot}%{_libdir}/php/extensions/ cat > %{buildroot}%{_sysconfdir}/php.d/%{inifile} << EOF extension = %{soname} EOF %post if [ -f /var/lock/subsys/httpd ]; then %{_initrddir}/httpd restart >/dev/null || : fi %postun if [ "$1" = "0" ]; then if [ -f /var/lock/subsys/httpd ]; then %{_initrddir}/httpd restart >/dev/null || : fi fi %clean rm -rf %{buildroot} [ "../package.xml" != "/" ] && rm -f ../package.xml %files %defattr(-,root,root) %doc docs tests %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/php.d/%{inifile} %attr(0755,root,root) %{_libdir}/php/extensions/%{soname} %changelog * Tue Feb 21 2012 spuhler <spuhler> 1:0.1.0-34.2.mga1 + Revision: 211429 - rebuilt for php-5.3.10 - rebuild for php-devel-5.3.9 * Sat Apr 30 2011 ahmad <ahmad> 1:0.1.0-34.mga1 + Revision: 93835 - Bump then rel to smoothen upgrades from mdv 2010.1 * Sat Jan 15 2011 spuhler <spuhler> 1:0.1.0-1.mga1 + Revision: 19483 -Release: %%mkrel 37 +Release: %%mkrel 1 -BuildRoot: %%{_tmppath}/%%{name}-%%{version}-%%{release}-buildroot - imported package php-sasl