]> git.pld-linux.org Git - packages/php-pecl-zstd.git/commitdiff
New, version 0.8.0
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 16 Mar 2020 14:34:37 +0000 (16:34 +0200)
committerElan Ruusamäe <glen@pld-linux.org>
Mon, 16 Mar 2020 14:35:03 +0000 (16:35 +0200)
Created from php-pecl.spec template spec

php-pecl-zstd.spec [new file with mode: 0644]

diff --git a/php-pecl-zstd.spec b/php-pecl-zstd.spec
new file mode 100644 (file)
index 0000000..8b4ee16
--- /dev/null
@@ -0,0 +1,69 @@
+#
+# Conditional build:
+%bcond_without tests           # build without tests
+
+%define                php_name        php%{?php_suffix}
+%define                modname zstd
+Summary:       %{modname} - Zstandard extension
+Name:          %{php_name}-pecl-%{modname}
+Version:       0.8.0
+Release:       1
+License:       PHP 3.01
+Group:         Development/Languages/PHP
+Source0:       https://pecl.php.net/get/%{modname}-%{version}.tgz
+# Source0-md5: 6ca4a5f81a2acb47d9ae4fa1d2440434
+URL:           https://pecl.php.net/package/zstd/
+BuildRequires: %{php_name}-cli
+BuildRequires: %{php_name}-devel
+BuildRequires: rpmbuild(macros) >= 1.666
+%{?requires_php_extension}
+Provides:      php(%{modname}) = %{version}
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+PHP extension for compression and decompression with Zstandard
+library.
+
+%prep
+%setup -qc
+mv %{modname}-%{version}/* .
+
+%build
+phpize
+%configure
+%{__make}
+
+# simple module load test
+%{__php} -n -q \
+       -d extension_dir=modules \
+       -d extension=%{modname}.so \
+       -m > modules.log
+grep %{modname} modules.log
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%{__make} install \
+       EXTENSION_DIR=%{php_extensiondir} \
+       INSTALL_ROOT=$RPM_BUILD_ROOT
+
+install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
+cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
+; Enable %{modname} extension module
+extension=%{modname}.so
+EOF
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+%php_webserver_restart
+
+%postun
+if [ "$1" = 0 ]; then
+       %php_webserver_restart
+fi
+
+%files
+%defattr(644,root,root,755)
+%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
+%attr(755,root,root) %{php_extensiondir}/%{modname}.so
This page took 0.115994 seconds and 4 git commands to generate.