3 %bcond_without tests # build without tests
5 %define php_name php%{?php_suffix}
6 %define modname bytekit
7 Summary: An extension to represent the opcodes generated by Zend Engine
8 Name: %{php_name}-%{modname}
11 License: Bytekit 1.0 (based on PHP 3.0)
12 Group: Development/Languages/PHP
13 Source0: http://www.bytekit.org/download/%{modname}-%{version}.tgz
14 # Source0-md5: 83d0a325713201947aec441f30be58d8
15 URL: http://www.bytekit.org/
16 BuildRequires: %{php_name}-devel
17 BuildRequires: rpmbuild(macros) >= 1.666
18 %{?requires_php_extension}
19 Obsoletes: php-bytekit < 0.1.1-3
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 Bytekit is a PHP extension that provides a userspace representation of
24 the opcodes generated by the Zend engine compiler built into PHP.
26 This extension provides not only access to the raw op_array data but
27 also contains a Zend engine disassembler that exports control flow
28 information in form of code flow graphs and basic blocks. Bytekit is
29 meant as a tool to understand the internals of PHP better, to debug
30 Zend engine error cases and as base to develop all kinds of static and
31 dynamic code analysis tools.
34 %setup -q -n %{modname}-%{version}
41 %{?with_tests:%{__make} test}
44 rm -rf $RPM_BUILD_ROOT
46 EXTENSION_DIR=%{php_extensiondir} \
47 INSTALL_ROOT=$RPM_BUILD_ROOT
49 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
50 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
51 ; Enable %{modname} extension module
52 extension=%{modname}.so
55 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
56 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
59 rm -rf $RPM_BUILD_ROOT
62 %defattr(644,root,root,755)
63 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
64 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
65 %{_examplesdir}/%{name}-%{version}