[packages/php-pecl-spx] New package php-pecl-spx, version 0.4.7
glen
glen at pld-linux.org
Mon Apr 20 14:42:32 CEST 2020
commit 5a5c8674e97b2bf27c5d33a317957b76648367e6
Author: Elan Ruusamäe <glen at pld-linux.org>
Date: Mon Apr 20 15:32:57 2020 +0300
New package php-pecl-spx, version 0.4.7
php-pecl-spx.spec | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 70 insertions(+)
---
diff --git a/php-pecl-spx.spec b/php-pecl-spx.spec
new file mode 100644
index 0000000..9dd341b
--- /dev/null
+++ b/php-pecl-spx.spec
@@ -0,0 +1,70 @@
+#
+# Conditional build:
+%bcond_without tests # build without tests
+
+%define php_name php%{?php_suffix}
+%define modname spx
+Summary: SPX - A simple profiler for PHP
+Name: %{php_name}-pecl-%{modname}
+Version: 0.4.7
+Release: 1
+License: PHP 3.01
+Group: Development/Languages/PHP
+Source0: https://github.com/NoiseByNorthwest/php-spx/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 599bd8812d1abbf804af8dc47c967c71
+URL: https://github.com/NoiseByNorthwest/php-spx
+BuildRequires: %{php_name}-cli
+BuildRequires: %{php_name}-devel >= 4:5.6
+BuildRequires: rpmbuild(macros) >= 1.666
+BuildRequires: zlib-devel
+%{?requires_php_extension}
+Provides: php(%{modname}) = %{version}
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+A simple & straight-to-the-point PHP profiling extension with its
+built-in web UI.
+
+%prep
+%setup -qn php-%{modname}-%{version}
+
+%build
+phpize
+%configure
+%{__make}
+
+# simple module load test
+%{__php} -n -q \
+ -d extension_dir=modules \
+ -d extension=%{modname}.so \
+ -r 'exit(extension_loaded("%{modname}") ? 0 : 1);'
+
+%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
+%{_datadir}/misc/php-spx
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/php-pecl-spx.git/commitdiff/5a5c8674e97b2bf27c5d33a317957b76648367e6
More information about the pld-cvs-commit
mailing list