]>
Commit | Line | Data |
---|---|---|
d0a2bbe4 ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # build without tests | |
4 | ||
5 | %define modname bytekit | |
6 | Summary: An extension to represent the opcodes generated by Zend Engine | |
7 | Name: php-%{modname} | |
8 | Version: 0.1.1 | |
9 | Release: 1 | |
10 | License: Bytekit 1.0 (based on PHP 3.0) | |
11 | Group: Development/Languages/PHP | |
12 | Source0: http://www.bytekit.org/download/%{modname}-%{version}.tgz | |
13 | # Source0-md5: 83d0a325713201947aec441f30be58d8 | |
14 | URL: http://www.bytekit.org/ | |
15 | BuildRequires: php-devel >= 4:5.0.4 | |
16 | BuildRequires: rpmbuild(macros) >= 1.519 | |
17 | %{?requires_php_extension} | |
18 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
19 | ||
20 | %description | |
21 | Bytekit is a PHP extension that provides a userspace representation of | |
22 | the opcodes generated by the Zend engine compiler built into PHP. | |
23 | ||
24 | This extension provides not only access to the raw op_array data but | |
25 | also contains a Zend engine disassembler that exports control flow | |
26 | information in form of code flow graphs and basic blocks. Bytekit is | |
27 | meant as a tool to understand the internals of PHP better, to debug | |
28 | Zend engine error cases and as base to develop all kinds of static and | |
29 | dynamic code analysis tools. | |
30 | ||
31 | %prep | |
32 | %setup -q -n %{modname}-%{version} | |
33 | ||
34 | %build | |
35 | phpize | |
36 | %configure | |
37 | %{__make} | |
38 | ||
39 | %install | |
40 | rm -rf $RPM_BUILD_ROOT | |
41 | install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d | |
42 | install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}} | |
43 | install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir},%{_examplesdir}/%{name}-%{version}} | |
44 | ||
45 | %{__make} install \ | |
46 | EXTENSION_DIR=%{php_extensiondir} \ | |
47 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
48 | cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini | |
49 | ; Enable %{modname} extension module | |
50 | extension=%{modname}.so | |
51 | EOF | |
52 | ||
53 | cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
54 | ||
55 | %clean | |
56 | rm -rf $RPM_BUILD_ROOT | |
57 | ||
58 | %files | |
59 | %defattr(644,root,root,755) | |
60 | %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini | |
61 | %attr(755,root,root) %{php_extensiondir}/%{modname}.so | |
62 | %{_examplesdir}/%{name}-%{version} |