[packages/php-xz] new, version 0.1
glen
glen at pld-linux.org
Tue Oct 20 15:53:38 CEST 2015
commit 3021604bc27316d52fe9f7816089b5a6548bb224
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Tue Oct 20 16:52:25 2015 +0300
new, version 0.1
version from xz.c file:
https://github.com/payden/php-xz/blob/c8db16e91a56f45a002d5d437348854d85c06983/xz.c#L92
php-xz.spec | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 81 insertions(+)
---
diff --git a/php-xz.spec b/php-xz.spec
new file mode 100644
index 0000000..8a58c51
--- /dev/null
+++ b/php-xz.spec
@@ -0,0 +1,81 @@
+#
+# Conditional build:
+%bcond_without tests # build without tests
+
+%define php_name php%{?php_suffix}
+%define modname xz
+Summary: PHP Extension providing xz (LZMA2) compression/decompression via PHP streams
+Name: %{php_name}-pecl-%{modname}
+Version: 0.1
+Release: 1
+License: PHP 3.01
+Group: Development/Languages/PHP
+Source0: https://github.com/payden/php-xz/archive/master/php-%{modname}-%{version}.tar.gz
+# Source0-md5: 2a110f97e3646f61ce81c66d8ef77a35
+URL: https://github.com/payden/php-xz
+%{?with_tests:BuildRequires: %{php_name}-cli}
+BuildRequires: %{php_name}-devel
+BuildRequires: rpmbuild(macros) >= 1.666
+BuildRequires: xz-devel
+%if %{with tests}
+BuildRequires: %{php_name}-cli
+%endif
+%{?requires_php_extension}
+Provides: php(xz) = %{version}
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+PHP Extension providing xz (LZMA2) compression/decompression via PHP
+streams.
+
+%prep
+%setup -qc
+mv php-%{modname}-*/* .
+
+%build
+phpize
+%configure
+%{__make}
+
+%if %{with tests}
+# simple module load test
+%{__php} -n -q \
+ -d extension_dir=modules \
+ -d extension=%{modname}.so \
+ -m > modules.log
+grep %{modname} modules.log
+
+export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
+%{__make} test \
+ PHP_TEST_SHARED_SYSTEM_EXTENSIONS="" \
+ PHP_EXECUTABLE=%{__php}
+%endif
+
+%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)
+%doc README.md
+%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
+%attr(755,root,root) %{php_extensiondir}/%{modname}.so
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/php-xz.git/commitdiff/3021604bc27316d52fe9f7816089b5a6548bb224
More information about the pld-cvs-commit
mailing list