]> git.pld-linux.org Git - packages/php-pecl-uri_template.git/blame - php-pecl-uri_template.spec
run tests
[packages/php-pecl-uri_template.git] / php-pecl-uri_template.spec
CommitLineData
4a3fd69b
ER
1#
2# Conditional build:
3%bcond_without tests # build without tests
4
5%define php_name php%{?php_suffix}
6%define modname uri_template
7Summary: Implementation of URI Template(RFC6570) specification for PHP
8Name: %{php_name}-pecl-%{modname}
566f8277 9Version: 1.0
4a3fd69b
ER
10Release: 1
11License: PHP 3.01
12Group: Development/Languages/PHP
13Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz
566f8277 14# Source0-md5: 652dbdb85da3c820f369526155355522
4a3fd69b 15URL: http://pecl.php.net/package/uri_template
52ed46b4 16%{?with_tests:BuildRequires: %{php_name}-cli}
4a3fd69b
ER
17BuildRequires: %{php_name}-devel >= 4:5.3.1
18BuildRequires: rpmbuild(macros) >= 1.666
19%{?requires_php_extension}
20BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22%description
23URI Template PHP Extension implementation of RFC-6570.
24
25%prep
26%setup -qc
27mv %{modname}-%{version}/* .
28
29%build
30phpize
31%configure
32%{__make}
33
52ed46b4
ER
34%if %{with tests}
35# simple module load test
36%{__php} -n -q \
37 -d extension_dir=modules \
38 -d extension=%{modname}.so \
39 -m > modules.log
40grep %{modname} modules.log
41
42export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
43unset TZ LANG LC_ALL || :
44%{__make} test \
45 PHP_EXECUTABLE=%{__php}
46%endif
47
4a3fd69b
ER
48%install
49rm -rf $RPM_BUILD_ROOT
4a3fd69b
ER
50%{__make} install \
51 EXTENSION_DIR=%{php_extensiondir} \
52 INSTALL_ROOT=$RPM_BUILD_ROOT
53
54install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
55cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
56; Enable %{modname} extension module
57extension=%{modname}.so
58EOF
59
605b31ea 60install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
4a3fd69b
ER
61cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
62
63%clean
64rm -rf $RPM_BUILD_ROOT
65
66%post
67%php_webserver_restart
68
69%postun
70if [ "$1" = 0 ]; then
71 %php_webserver_restart
72fi
73
74%files
75%defattr(644,root,root,755)
76%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
77%attr(755,root,root) %{php_extensiondir}/%{modname}.so
78%{_examplesdir}/%{name}-%{version}
This page took 0.104428 seconds and 4 git commands to generate.