Building PHP PECL modules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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-%{version}.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


-- 
Alexander Dalloz | Enger, Germany | GPG http://pgp.mit.edu 0xB366A773
legal statement: http://www.uni-x.org/legal.html
Fedora Core 2 GNU/Linux on Athlon with kernel 2.6.11-1.35_FC2smp 
Serendipity 18:53:26 up 24 days, 23:30, load average: 0.18, 0.18, 0.18 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://lists.centos.org/pipermail/centos/attachments/20051229/db2f149c/attachment.bin

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux