]> git.pld-linux.org Git - packages/php-pecl-bcompiler.git/blobdiff - php-pecl-bcompiler.spec
- rel 4
[packages/php-pecl-bcompiler.git] / php-pecl-bcompiler.spec
index 042cc69f10cdff6b336dec373dccd90e5a55810f..f0d9271a02329c3afce7981afd7eff0b6e49fb8f 100644 (file)
@@ -1,24 +1,25 @@
 %define                _modname        bcompiler
 %define                _status         beta
-Summary:       %{_modname} - A bytecode compiler for classes
-Summary(pl):   %{_modname} - Kompilator kodu bajtowego dla klas
+%define                _sysconfdir     /etc/php
+%define                extensionsdir   %(php-config --extension-dir 2>/dev/null)
+Summary:       %{_modname} - a bytecode compiler for classes
+Summary(pl):   %{_modname} - kompilator kodu bajtowego dla klas
 Name:          php-pecl-%{_modname}
-Version:       0.5
-Release:       1
+Version:       0.7
+Release:       4
 License:       PHP
 Group:         Development/Languages/PHP
-Source0:       http://pear.php.net/get/%{_modname}-%{version}.tgz
-# Source0-md5: c51ba61c9497a5744ffd1d252c7d0935
-URL:           http://pear.php.net/
-BuildRequires: libtool
-BuildRequires: php-devel
-Requires:      php-common
+Source0:       http://pecl.php.net/get/%{_modname}-%{version}.tgz
+# Source0-md5: 77163ce732d6cd980de570f021214a17
+URL:           http://pecl.php.net/package/bcompiler/
+BuildRequires: bzip2-devel
+BuildRequires: php-devel >= 3:5.0.0
+BuildRequires: rpmbuild(macros) >= 1.254
+%{?requires_php_extension}
+Requires:      %{_sysconfdir}/conf.d
 Obsoletes:     php-pear-%{_modname}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                _sysconfdir     /etc/php
-%define                extensionsdir   %{_libdir}/php
-
 %description
 bcompiler enables you to encode your scripts in phpbytecode, enabling
 you to protect the source. bcompiler could be used in the following
@@ -30,7 +31,7 @@ situations:
 - to deliver close source applications
 - for use on embedded systems, where disk space is a priority.
 
-This extension has in PEAR status: %{_status}.
+In PECL status of this package is: %{_status}.
 
 %description -l pl
 bcompiler pozwala na zakodowanie skryptów do kodu bajtowego PHP,
@@ -44,7 +45,7 @@ nast
 - dostarczanie aplikacji o zamkniêtym kodzie,
 - u¿ycie na systemach embedded, gdzie wielko¶æ jest priorytetem.
 
-To rozszerzenie ma w PEAR status: %{_status}.
+To rozszerzenie ma w PECL status: %{_status}.
 
 %prep
 %setup -q -c
@@ -60,22 +61,29 @@ phpize
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{extensionsdir}
+install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir}}
 
 install %{_modname}-%{version}/modules/%{_modname}.so $RPM_BUILD_ROOT%{extensionsdir}
+cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
+; Enable %{_modname} extension module
+extension=%{_modname}.so
+EOF
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post
-%{_sbindir}/php-module-install install %{_modname} %{_sysconfdir}/php-cgi.ini
+[ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
+[ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
 
-%preun
-if [ "$1" = "0" ]; then
-       %{_sbindir}/php-module-install remove %{_modname} %{_sysconfdir}/php-cgi.ini
+%postun
+if [ "$1" = 0 ]; then
+       [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
+       [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
 fi
 
 %files
 %defattr(644,root,root,755)
 %doc %{_modname}-%{version}/examples/*
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini
 %attr(755,root,root) %{extensionsdir}/%{_modname}.so
This page took 0.03394 seconds and 4 git commands to generate.