Search
j0ke.net Open Build Service
>
Projects
>
internetx
:
php5
:
EL5
:
5.4.23
:
extensions
>
php-pecl-dbase
> php-pecl-dbase.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File php-pecl-dbase.spec of Package php-pecl-dbase
%global php_apiver %((echo 0; php -i 2>/dev/null | sed -n 's/^PHP API => //p') | tail -1) %{!?__pecl: %{expand: %%global __pecl %{_bindir}/pecl}} %{!?php_extdir: %{expand: %%global php_extdir %(php-config --extension-dir)}} %define pecl_name dbase Name: php-pecl-dbase Version: 5.1.0 Release: 1 Summary: PECL dbase package License: BSD Group: Development/Languages URL: http://pecl.php.net/package/dbase Source0: %{pecl_name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: automake php-devel php-pear >= 1:1.4.9-1.2 #BuildRequires: libedit-devel %define config_flags --without-libedit Requires(post): %{__pecl} Requires(postun): %{__pecl} Provides: php-pecl(Xhprof) = %{version} %if %{defined php_zend_api} Requires: php(zend-abi) = %{php_zend_api} Requires: php(api) = %{php_core_api} %else Requires: php-api = %{php_apiver} %endif %description These functions allow you to access records stored in dBase-format (dbf) databases. There is no support for indexes or memo fields. There is no support for locking, too. Two concurrent webserver processes modifying the same dBase file will very likely ruin your database. dBase files are simple sequential files of fixed length records. Records are appended to the end of the file and delete records are kept until you call dbase_pack(). %prep %setup -n %{pecl_name}-%{version} cd .. [ -f package2.xml ] || mv package.xml package2.xml mv package2.xml %{pecl_name}-%{version}/%{pecl_name}.xml cd %{pecl_name}-%{version} %build phpize %configure --enable-dbase CFLAGS="$RPM_OPT_FLAGS" make %install rm -rf $RPM_BUILD_ROOT %__make install INSTALL_ROOT=$RPM_BUILD_ROOT # install config file install -d $RPM_BUILD_ROOT%{_sysconfdir}/php.d cat > $RPM_BUILD_ROOT%{_sysconfdir}/php.d/dbase.ini << 'EOF' ; Enable dbase extension module extension=dbase.so EOF # install doc files install -d docs install -pm 644 CREDITS docs # Install XML package description install -d $RPM_BUILD_ROOT%{pecl_xmldir} install -pm 644 %{pecl_name}.xml $RPM_BUILD_ROOT%{pecl_xmldir}/%{name}.xml %if 0%{?pecl_install:1} %post %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : %endif %if 0%{?pecl_uninstall:1} %postun if [ $1 -eq 0 ] ; then %{pecl_uninstall} %{pecl_name} >/dev/null || : fi %endif %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc docs/* %config(noreplace) %{_sysconfdir}/php.d/dbase.ini %{php_extdir}/dbase.so %{pecl_xmldir}/%{name}.xml %changelog