]> git.pld-linux.org Git - packages/php-pecl-uri_template.git/blame - php-pecl-uri_template.spec
up to 1.0
[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
ER
15URL: http://pecl.php.net/package/uri_template
16BuildRequires: %{php_name}-devel >= 4:5.3.1
17BuildRequires: rpmbuild(macros) >= 1.666
18%{?requires_php_extension}
19BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21%description
22URI Template PHP Extension implementation of RFC-6570.
23
24%prep
25%setup -qc
26mv %{modname}-%{version}/* .
27
28%build
29phpize
30%configure
31%{__make}
32
33%install
34rm -rf $RPM_BUILD_ROOT
4a3fd69b
ER
35%{__make} install \
36 EXTENSION_DIR=%{php_extensiondir} \
37 INSTALL_ROOT=$RPM_BUILD_ROOT
38
39install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
40cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
41; Enable %{modname} extension module
42extension=%{modname}.so
43EOF
44
605b31ea 45install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
4a3fd69b
ER
46cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
47
48%clean
49rm -rf $RPM_BUILD_ROOT
50
51%post
52%php_webserver_restart
53
54%postun
55if [ "$1" = 0 ]; then
56 %php_webserver_restart
57fi
58
59%files
60%defattr(644,root,root,755)
61%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
62%attr(755,root,root) %{php_extensiondir}/%{modname}.so
63%{_examplesdir}/%{name}-%{version}
This page took 0.092822 seconds and 4 git commands to generate.