1 %define _modname bcompiler
3 %define _sysconfdir /etc/php
4 %define extensionsdir %(php-config --extension-dir 2>/dev/null)
5 Summary: %{_modname} - a bytecode compiler for classes
6 Summary(pl): %{_modname} - kompilator kodu bajtowego dla klas
7 Name: php-pecl-%{_modname}
11 Group: Development/Languages/PHP
12 Source0: http://pecl.php.net/get/%{_modname}-%{version}.tgz
13 # Source0-md5: 77163ce732d6cd980de570f021214a17
14 URL: http://pecl.php.net/package/bcompiler/
15 BuildRequires: bzip2-devel
16 BuildRequires: php-devel >= 3:5.0.0
17 BuildRequires: rpmbuild(macros) >= 1.254
18 %{?requires_php_extension}
19 Requires: %{_sysconfdir}/conf.d
20 Obsoletes: php-pear-%{_modname}
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 bcompiler enables you to encode your scripts in phpbytecode, enabling
25 you to protect the source. bcompiler could be used in the following
27 - to create a exe file of a PHP-GTK application (in conjunction with
29 - to create closed source libraries
30 - to provide clients with time expired software (prior to payment)
31 - to deliver close source applications
32 - for use on embedded systems, where disk space is a priority.
34 In PECL status of this package is: %{_status}.
37 bcompiler pozwala na zakodowanie skryptów do kodu bajtowego PHP,
38 pozwalaj±c na chronienie swojego kodu. bcompiler mo¿e byæ u¿ywany w
39 nastêpuj±cych sytuacjach:
40 - tworzenie plików exe dla aplikacji PHP-GTK (w po³±czeniu z innym
42 - tworzenie bibliotek z zamkniêtym kodem,
43 - tworzenie oprogramowania z ograniczonym czasem dzia³ania (zale¿nym
45 - dostarczanie aplikacji o zamkniêtym kodzie,
46 - u¿ycie na systemach embedded, gdzie wielko¶æ jest priorytetem.
48 To rozszerzenie ma w PECL status: %{_status}.
54 cd %{_modname}-%{version}
55 cp -f config.m4.old config.m4
56 cp -f Makefile.in.old Makefile.in
63 rm -rf $RPM_BUILD_ROOT
64 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir}}
66 install %{_modname}-%{version}/modules/%{_modname}.so $RPM_BUILD_ROOT%{extensionsdir}
67 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
68 ; Enable %{_modname} extension module
69 extension=%{_modname}.so
73 rm -rf $RPM_BUILD_ROOT
76 [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
77 [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
81 [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
82 [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
86 %defattr(644,root,root,755)
87 %doc %{_modname}-%{version}/examples/*
88 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini
89 %attr(755,root,root) %{extensionsdir}/%{_modname}.so