]> git.pld-linux.org Git - packages/php-pecl-archive.git/blame - php-pecl-archive.spec
run project tests
[packages/php-pecl-archive.git] / php-pecl-archive.spec
CommitLineData
976653d5
ER
1#
2# Conditional build:
3%bcond_without tests # build without tests
4
64b5a3de 5%define php_name php%{?php_suffix}
4f8b3975 6%define modname archive
64b5a3de
ER
7%define status beta
8Summary: %{modname} - manipulate tar/cpio archives
9Summary(pl.UTF-8): %{modname} - obróbka archiwów tar/cpio
10Name: %{php_name}-pecl-%{modname}
cfbe30dd
ER
11Version: 0.3.1
12Release: 1
39479244 13License: PHP 3.01
e3c503d7 14Group: Development/Languages/PHP
cfbe30dd 15Source0: http://pecl.php.net/get/%{modname}-0.2.tgz
e3c503d7 16# Source0-md5: 1b121440b2c460b2a1af46e31f23e46e
cfbe30dd 17Patch100: branch.diff
e3c503d7 18URL: http://pecl.php.net/package/archive/
4f8b3975 19BuildRequires: %{php_name}-devel >= 3:5.0.4
3e0bf3e4 20BuildRequires: libarchive-devel
64b5a3de 21BuildRequires: rpmbuild(macros) >= 1.650
976653d5 22%{?with_tests:BuildRequires: %{php_name}-cli}
493dade8 23%{?requires_php_extension}
ac70ff1c 24Provides: php(%{modname}) = %{version}
88371f97 25Obsoletes: php-pecl-archive < 0.2-17
e3c503d7
AG
26BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
e3c503d7
AG
28%description
29archive extension allows to read and write tar and cpio archives using
30libarchive.
31
64b5a3de 32In PECL status of this extension is: %{status}.
e3c503d7 33
b95c4efd
JR
34%description -l pl.UTF-8
35Rozszerzenie archive pozwala na odczyt i zapis archiwów tar oraz cpio
36przy użyciu biblioteki libarchive.
e3c503d7 37
64b5a3de 38To rozszerzenie ma w PECL status: %{status}.
e3c503d7
AG
39
40%prep
64b5a3de 41%setup -qc
cfbe30dd
ER
42mv %{modname}-*/* .
43%patch100 -p1
e3c503d7 44
c95c8d58
ER
45# these segfault
46rm tests/add_bz2/001.phpt
47rm tests/add_gz/001.phpt
48
49# print_r of exception object differs in php 5.5
50rm tests/list_gz/001.phpt
51rm tests/list/001.phpt
52rm tests/list_bz2/001.phpt
53
e3c503d7 54%build
e3c503d7
AG
55phpize
56%configure
57%{__make}
58
976653d5
ER
59%if %{with tests}
60# simple module load test
61%{__php} -n \
62 -dextension_dir=modules \
63 -dextension=%{modname}.so \
64 -m > modules.log
65grep %{modname} modules.log
c95c8d58
ER
66
67cat <<'EOF' > run-tests.sh
68#!/bin/sh
69%{__make} test \
70 PHP_EXECUTABLE=%{__php} \
71 RUN_TESTS_SETTINGS="-q $*"
72EOF
73
74chmod +x run-tests.sh
75./run-tests.sh -w failed.log --show-out
76test -f failed.log -a ! -s failed.log
976653d5
ER
77%endif
78
e3c503d7
AG
79%install
80rm -rf $RPM_BUILD_ROOT
7ef0fd52 81install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}}
64b5a3de
ER
82install -p modules/%{modname}.so $RPM_BUILD_ROOT%{php_extensiondir}
83cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
84; Enable %{modname} extension module
85extension=%{modname}.so
d8a5b3c3 86EOF
e3c503d7
AG
87
88%clean
89rm -rf $RPM_BUILD_ROOT
90
91%post
7ef0fd52 92%php_webserver_restart
e3c503d7 93
d8a5b3c3
ER
94%postun
95if [ "$1" = 0 ]; then
7ef0fd52 96 %php_webserver_restart
e3c503d7
AG
97fi
98
99%files
100%defattr(644,root,root,755)
64b5a3de
ER
101%doc API.txt CREDITS tests
102%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
103%attr(755,root,root) %{php_extensiondir}/%{modname}.so
This page took 0.076895 seconds and 4 git commands to generate.