Am Do, den 29.12.2005 schrieb Aleksandar Milivojevic um 4:40:
I'm attempting to build some PECL modules on fully updated CentOS 4.2 system. Preferably pack them into nice RPM packages. However, seems I'm missing something. For example, this is what I get for sqlite module:
$ pear makerpm SQLite-1.0.3.tgz `phpize' failed
The php-devel package is installed (so I do have phpize command). It's just that it is failing. If I unpack the files into directory, and do "pear build" or "pear install", I'm getting a bit more verbose error:
Hi Aleksandar :)
I would guess you know
http://phprpms.sourceforge.net/sqlite
But maybe not. For other PECL modules (I recently made a fileinfo RPM for horde/imp) following .spec might be a help:
$ cat /home/rpmbuild/SPECS/php-pecl-fileinfo.spec
%define php_extdir %(php-config --extension-dir || echo %{_libdir}/php4)
Summary: PEAR: libmagic bindings Name: php-pecl-fileinfo Version: 1.0.1 Release: 1.ad License: PHP Group: Development/Libraries Source: http://pecl.php.net/get/Fileinfo-%%7Bversion%7D.tgz URL: http://pecl.php.net/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: php-devel, php, autoconf, automake, libtool, gcc-c++ Requires: php
%description This extension allows retrieval of information regarding vast majority of file. This information may include dimensions, quality, length etc...
Additionally it can also be used to retrieve the mime type for a particular file and for text files proper language encoding.
%prep %setup -n Fileinfo-%{version}
%build phpize %configure make
%install rm -rf %{buildroot} make install INSTALL_ROOT=%{buildroot}
# Drop in the bit of configuration mkdir -p %{buildroot}%{_sysconfdir}/php.d cat > %{buildroot}%{_sysconfdir}/php.d/fileinfo.ini << 'EOF' ; Enable Fileinfo extension module extension=fileinfo.so EOF
%clean rm -rf %{buildroot}
%files %defattr(-, root, root, 0755) %doc CREDITS EXPERIMENTAL %config(noreplace) %{_sysconfdir}/php.d/fileinfo.ini %{php_extdir}/fileinfo.so
%changelog * Wed Dec 07 2005 Alexander Dalloz me@camouflage - Initial build on CentOS 4.2
Alexander