]> git.pld-linux.org Git - projects/template-specs.git/blobdiff - php4-pecl.spec
- disable debug packages when not buildding native version
[projects/template-specs.git] / php4-pecl.spec
index 5ca93b3b9fd6cec41d9e6988c98d2b92871772b8..5efb610dd540bad98fb527f39397165e5de51cb3 100644 (file)
@@ -1,11 +1,8 @@
 %define                _modname        -
 %define                _status         -
-%define                _sysconfdir     /etc/php4
-%define                extensionsdir   %(php-config --extension-dir 2>/dev/null)
-
 Summary:       %{_modname} -
-Summary(pl):   %{_modname} -
-Name:          php-pecl-%{_modname}
+Summary(pl.UTF-8):     %{_modname} -
+Name:          php4-pecl-%{_modname}
 Version:       1.0
 Release:       1
 License:       PHP 2.02
@@ -13,34 +10,36 @@ Group:              Development/Languages/PHP
 Source0:       http://pecl.php.net/get/%{_modname}-%{version}.tgz
 URL:           http://pecl.php.net/package/Modname/
 BuildRequires: php4-devel >= 3:4.0.0
-BuildRequires: rpmbuild(macros) >= 1.238
+BuildRequires: rpmbuild(macros) >= 1.519
+Requires:      php4-common >= 3:4.4.0-3
 %{?requires_php_extension}
-Requires:      %{_sysconfdir}/conf.d
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 
 In PECL status of this extension is: %{_status}.
 
-%description -l pl
+%description -l pl.UTF-8
 
 To rozszerzenie ma w PECL status: %{_status}.
 
 %prep
 %setup -q -c
+mv %{_modname}-%{version}/* .
 
 %build
-cd %{_modname}-%{version}
 phpize
 %configure
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir}}
+install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}}
 
-install %{_modname}-%{version}/modules/%{_modname}.so $RPM_BUILD_ROOT%{extensionsdir}
-cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
+%{__make} install \
+       INSTALL_ROOT=$RPM_BUILD_ROOT \
+       EXTENSION_DIR=%{php_extensiondir}
+cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{_modname}.ini
 ; Enable %{_modname} extension module
 extension=%{_modname}.so
 EOF
@@ -49,17 +48,15 @@ EOF
 rm -rf $RPM_BUILD_ROOT
 
 %post
-[ ! -f /etc/apache/conf.d/??_mod_php4.conf ] || %service -q apache restart
-[ ! -f /etc/httpd/httpd.conf/??_mod_php4.conf ] || %service -q httpd restart
+%php4_webserver_restart
 
 %postun
 if [ "$1" = 0 ]; then
-       [ ! -f /etc/apache/conf.d/??_mod_php4.conf ] || %service -q apache restart
-       [ ! -f /etc/httpd/httpd.conf/??_mod_php4.conf ] || %service -q httpd restart
+       %php4_webserver_restart
 fi
 
 %files
 %defattr(644,root,root,755)
-%doc %{_modname}-%{version}/{CREDITS,EXPERIMENTAL,TODO,README}
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini
-%attr(755,root,root) %{extensionsdir}/%{_modname}.so
+%doc CREDITS EXPERIMENTAL TODO README
+%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{_modname}.ini
+%attr(755,root,root) %{php_extensiondir}/%{_modname}.so
This page took 0.157164 seconds and 4 git commands to generate.