]> git.pld-linux.org Git - packages/php-pecl-sasl.git/blobdiff - php-pecl-sasl.spec
add module load test
[packages/php-pecl-sasl.git] / php-pecl-sasl.spec
index 9847f173c50957b80b72439de9c11c83d690e66a..cc7c5c2346664f07f2568d1bd42fcad3c82eb749 100644 (file)
@@ -1,24 +1,30 @@
+#
+# Conditional build:
+%bcond_without tests           # build without tests
+
 %define                php_name        php%{?php_suffix}
 %define                modname sasl
 %define                status          alpha
 Summary:       %{modname} - Cyrus SASL extension
 Summary(pl.UTF-8):     %{modname} - rozszerzenie Cyrus SASL
 Name:          %{php_name}-pecl-%{modname}
-Version:       0.1.0
-Release:       12
+Version:       0.2.0
+Release:       1
 License:       PHP 3.01
 Group:         Development/Languages/PHP
-Source0:       http://pecl.php.net/get/%{modname}-%{version}.tgz
+Source0:       http://pecl.php.net/get/%{modname}-0.1.0.tgz
 # Source0-md5: 8431731cc8a7921a2922af23a57a572f
-Patch0:                php-pecl-%{modname}-lib_fix.patch
+Patch99:       prepatch.patch
+Patch100:      branch.diff
 Patch1:                php-pecl-%{modname}-lib64_fix.patch
 URL:           http://pecl.php.net/package/sasl/
+BuildRequires: %{php_name}-devel >= 3:5.0.4
 BuildRequires: cyrus-sasl-devel
-BuildRequires: %{php_name}-devel >= 3:5.0.0
 BuildRequires: rpmbuild(macros) >= 1.650
+%{?with_tests:BuildRequires:   %{php_name}-cli}
 %{?requires_php_extension}
-Requires:      php(core) >= 5.0.4
-Obsoletes:     php-pear-%{modname}
+Provides:      php(%{modname}) = %{version}
+Obsoletes:     php-pecl-sasl < 0.1.0-14
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -48,12 +54,11 @@ To rozszerzenie ma w PECL status: %{status}.
 
 %prep
 %setup -qc
-mv %{modname}-%{version}/* .
-# Ugly, could be done somehow prettier (one combined patch?)
+mv %{modname}-*/* .
+%patch99 -p1
+%patch100 -p0
 %if "%{_lib}" == "lib64"
-%patch1 -p2
-%else
-%patch0 -p2
+%patch1 -p1
 %endif
 
 %build
@@ -61,6 +66,15 @@ phpize
 %configure
 %{__make}
 
+%if %{with tests}
+# simple module load test
+%{__php} -n \
+       -dextension_dir=modules \
+       -dextension=%{modname}.so \
+       -m > modules.log
+grep %{modname} modules.log
+%endif
+
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}}
@@ -83,6 +97,6 @@ fi
 
 %files
 %defattr(644,root,root,755)
-%doc docs/TODO
+%doc docs/TODO docs/guide.txt
 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
This page took 0.229498 seconds and 4 git commands to generate.