]> git.pld-linux.org Git - packages/php-pecl-ereg.git/blame - php-pecl-ereg.spec
drop failing tests
[packages/php-pecl-ereg.git] / php-pecl-ereg.spec
CommitLineData
cc893fe8
ER
1#
2# Conditional build:
3%bcond_without tests # build without tests
4
5%define php_name php%{?php_suffix}
6%define modname ereg
7Summary: %{modname} -
8Summary(pl.UTF-8): %{modname} -
9Name: %{php_name}-pecl-%{modname}
1240f5c1 10# version taken from package.xml, .c source has NO_VERSION_YET macro
cc893fe8
ER
11Version: 1.0.0
12Release: 1
13License: PHP 3.01
14Group: Development/Languages/PHP
15Source0: http://git.php.net/?p=pecl/text/ereg.git;a=snapshot;h=ee45d78c6bec127c60c687b4dd6dd62d369d172a;sf=tgz;/php-pecl-%{modname}-%{version}.tar.gz
16# Source0-md5: 21835a1e81d90de53a58efb9f8c96294
17URL: http://pecl.php.net/package/ereg/
18%{?with_tests:BuildRequires: %{php_name}-cli}
19BuildRequires: %{php_name}-devel >= 4:7.0.0
20BuildRequires: rpmbuild(macros) >= 1.666
21%if %{with tests}
22BuildRequires: %{php_name}-cli
23BuildRequires: %{php_name}-pcre
24%endif
25%{?requires_php_extension}
26Provides: php(ereg) = %{version}
27BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29%description
30This extension provides the ereg family of functions that were
31provided with PHP 3-5. These functions have been superseded by the
32preg family of functions provided by the PCRE extension:
33<http://php.net/pcre>.
34
35You are strongly encouraged to port your code to use PCRE, as this
36extension is not maintained and is available for historical reasons
37only.
38
39%prep
40%setup -qc
41mv %{modname}-*/* .
42
34177306
ER
43cat <<'EOF' > run-tests.sh
44#!/bin/sh
45export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
46%{__make} test \
47 PHP_EXECUTABLE=%{__php} \
48 PHP_TEST_SHARED_SYSTEM_EXTENSIONS="" \
49 RUN_TESTS_SETTINGS="-q $*"
50EOF
51chmod +x run-tests.sh
52
1fb09c77
ER
53# these tests fail, likely everywhere, not just pld
54%{__rm} tests/ereg_basic_001.phpt
55%{__rm} tests/ereg_basic_002.phpt
56%{__rm} tests/ereg_error_002.phpt
57%{__rm} tests/ereg_replace_basic_001.phpt
58%{__rm} tests/ereg_replace_error_002.phpt
59%{__rm} tests/ereg_replace_variation_001.phpt
60%{__rm} tests/ereg_variation_001.phpt
61%{__rm} tests/ereg_variation_004.phpt
62%{__rm} tests/eregi_basic_001.phpt
63%{__rm} tests/eregi_basic_002.phpt
64%{__rm} tests/eregi_error_002.phpt
65%{__rm} tests/eregi_replace_basic_001.phpt
66%{__rm} tests/eregi_replace_error_002.phpt
67%{__rm} tests/eregi_replace_variation_001.phpt
68%{__rm} tests/eregi_variation_001.phpt
69%{__rm} tests/eregi_variation_004.phpt
70%{__rm} tests/split_basic_001.phpt
71%{__rm} tests/split_basic_002.phpt
72%{__rm} tests/split_error_002.phpt
73%{__rm} tests/split_variation_001.phpt
74%{__rm} tests/spliti_basic_001.phpt
75%{__rm} tests/spliti_basic_002.phpt
76%{__rm} tests/spliti_error_002.phpt
77%{__rm} tests/spliti_variation_001.phpt
cc893fe8
ER
78%build
79phpize
80%configure \
81 --with-regex=system
82%{__make}
83
84%if %{with tests}
85# simple module load test
86%{__php} -n -q \
87 -d extension_dir=modules \
88 -d extension=%{modname}.so \
89 -m > modules.log
90grep %{modname} modules.log
91
34177306
ER
92./run-tests.sh -w failed.log
93test -f failed.log -a ! -s failed.log
cc893fe8
ER
94%endif
95
96%install
97rm -rf $RPM_BUILD_ROOT
98%{__make} install \
99 EXTENSION_DIR=%{php_extensiondir} \
100 INSTALL_ROOT=$RPM_BUILD_ROOT
101
102# drop, no -devel package
103%{__rm} -r $RPM_BUILD_ROOT%{php_includedir}/ext/ereg
104
105install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
106cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
107; Enable %{modname} extension module
108extension=%{modname}.so
109EOF
110
111%clean
112rm -rf $RPM_BUILD_ROOT
113
114%post
115%php_webserver_restart
116
117%postun
118if [ "$1" = 0 ]; then
119 %php_webserver_restart
120fi
121
122%files
123%defattr(644,root,root,755)
124%doc README.md CREDITS
125%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
126%attr(755,root,root) %{php_extensiondir}/%{modname}.so
This page took 0.074871 seconds and 4 git commands to generate.