]> git.pld-linux.org Git - packages/php-pecl-zstd.git/blame - php-pecl-zstd.spec
New, version 0.8.0
[packages/php-pecl-zstd.git] / php-pecl-zstd.spec
CommitLineData
260423e2
ER
1#
2# Conditional build:
3%bcond_without tests # build without tests
4
5%define php_name php%{?php_suffix}
6%define modname zstd
7Summary: %{modname} - Zstandard extension
8Name: %{php_name}-pecl-%{modname}
9Version: 0.8.0
10Release: 1
11License: PHP 3.01
12Group: Development/Languages/PHP
13Source0: https://pecl.php.net/get/%{modname}-%{version}.tgz
14# Source0-md5: 6ca4a5f81a2acb47d9ae4fa1d2440434
15URL: https://pecl.php.net/package/zstd/
16BuildRequires: %{php_name}-cli
17BuildRequires: %{php_name}-devel
18BuildRequires: rpmbuild(macros) >= 1.666
19%{?requires_php_extension}
20Provides: php(%{modname}) = %{version}
21BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23%description
24PHP extension for compression and decompression with Zstandard
25library.
26
27%prep
28%setup -qc
29mv %{modname}-%{version}/* .
30
31%build
32phpize
33%configure
34%{__make}
35
36# simple module load test
37%{__php} -n -q \
38 -d extension_dir=modules \
39 -d extension=%{modname}.so \
40 -m > modules.log
41grep %{modname} modules.log
42
43%install
44rm -rf $RPM_BUILD_ROOT
45%{__make} install \
46 EXTENSION_DIR=%{php_extensiondir} \
47 INSTALL_ROOT=$RPM_BUILD_ROOT
48
49install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
50cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
51; Enable %{modname} extension module
52extension=%{modname}.so
53EOF
54
55%clean
56rm -rf $RPM_BUILD_ROOT
57
58%post
59%php_webserver_restart
60
61%postun
62if [ "$1" = 0 ]; then
63 %php_webserver_restart
64fi
65
66%files
67%defattr(644,root,root,755)
68%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
69%attr(755,root,root) %{php_extensiondir}/%{modname}.so
This page took 0.054699 seconds and 4 git commands to generate.