Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Phalcon 2.0.1 SPEC
%global proj_name cphalcon
%global pecl_name phalcon
%global pecl_version 2.0.1
%{!?__pecl: %{expand: %%global __pecl %{_bindir}/pecl}}
%global php_apiver %((echo 0; php -i 2>/dev/null | sed -n 's/^PHP API => //p') | tail -1)
%{!?php_extdir: %{expand: %%global php_extdir %(php-config --extension-dir)}}
%{?filter_provides_in: %filter_provides_in %{php_extdir}/.*\.so$}
%global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}%{php_extdir}/.*\\.so$
%if "%{php_version}" < "5.6"
%global ini_name %{pecl_name}.ini
%global ini_name 50-%{pecl_name}.ini
Summary: Phalcon Framework
Name: php-pecl-%{pecl_name}
Version: %{pecl_version}
Release: 0%{?dist}
License: new BSD
Group: Development/Languages
Source: %{pecl_name}-v%{pecl_version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: php-devel >= 5.1.0
%if 0%{?php_zend_api:1}
Requires: php(zend-abi) = %{php_zend_api}
Requires: php(api) = %{php_core_api}
Requires: php(pdo-abi) = %{php_pdo_api}
Requires: php-api = %{php_apiver}
BuildRequires: gcc make
BuildRequires: php-devel php-pdo php-mbstring
Requires: php-pdo php-mbstring
Provides: php-pecl(%{pecl_name}) = %{version}-%{release}
Phalcon is a web framework implemented as a C extension offering
high performance and lower resource consumption.
%setup -qn %{proj_name}-%{pecl_name}-v%{pecl_version}
%if 0%{?__ztsphp:1}
%{__cp} -r ext ext-zts
cd ext
%configure --with-php-config=%{_bindir}/php-config
%{__make} %{?_smp_mflags}
%if 0%{?__ztsphp:1}
cd ../ext-zts
%configure --with-php-config=%{_bindir}/zts-php-config
%{__make} %{?_smp_mflags}
cd ext
%{__rm} -rf %{buildroot}
%{__make} install INSTALL_ROOT=%{buildroot}
%{__mkdir_p} %{buildroot}%{_sysconfdir}/php.d
%{__cat} > %{buildroot}%{_sysconfdir}/php.d/%{ini_name} << 'EOF'
; Enable %{pecl_name} extension module
%if 0%{?__ztsphp:1}
cd ../ext-zts
%{__make} install INSTALL_ROOT=%{buildroot}
%{__install} -d %{buildroot}%{php_ztsinidir}
%{__cp} %{buildroot}%{_sysconfdir}/php.d/%{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%{__rm} -rf %{buildroot}
%defattr(-, root, root, -)
%config(noreplace) %{_sysconfdir}/php.d/%{ini_name}
%if 0%{?__ztsphp:1}
%config(noreplace) %{php_ztsinidir}/%{ini_name}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.