]> git.pld-linux.org Git - packages/php-pecl-bcompiler.git/commitdiff
- full conf.d support and unifications
authorElan Ruusamäe <glen@pld-linux.org>
Sun, 11 Sep 2005 23:53:22 +0000 (23:53 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    php-pecl-bcompiler.spec -> 1.14

php-pecl-bcompiler.spec

index 3133926796241e5c794547206e68512288f5e6a6..91772de4c1e857c057f0523cdeac838ffd8c3707 100644 (file)
@@ -1,25 +1,26 @@
 %define                _modname        bcompiler
 %define                _status         beta
+%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.7
-Release:       1
+Release:       2
 License:       PHP
 Group:         Development/Languages/PHP
 Source0:       http://pecl.php.net/get/%{_modname}-%{version}.tgz
 # Source0-md5: 77163ce732d6cd980de570f021214a17
 URL:           http://pecl.php.net/package/bcompiler/
 BuildRequires: bzip2-devel
-BuildRequires: libtool
-BuildRequires: php-devel
-Requires:      php-common
+BuildRequires: php-devel >= 3:5.0.0
+BuildRequires: rpmbuild(macros) >= 1.230
+%requires_eq_to php-common php-devel
+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
@@ -61,22 +62,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 size mtime md5) %{_sysconfdir}/conf.d/%{_modname}.ini
 %attr(755,root,root) %{extensionsdir}/%{_modname}.so
This page took 0.062047 seconds and 4 git commands to generate.