Skip to content

Instantly share code, notes, and snippets.

Created November 29, 2014 19:02
What would you like to do?
%global pkgname phalcon
Name: php-phalcon
Version: 1.3.4
Release: 1%{?dist}
Summary: PhalconPHP is a web framework delivered as a C extension
License: BSD
Source0: c%{pkgname}
Source1: %{pkgname}
BuildRequires: gcc php-devel php-mysql php-pear
Requires: php-mysql php-pear php-mbstring php-mcrypt php-openssl php-pdo
Requires: php(zend-abi) >= 20090626
Requires: php(api) >= 20090626
PhalconPHP is a web framework written in C and works as C module.
%setup -q -n cphalcon-master
unzip %{SOURCE1}
(cd phalcon-devtools-master; find * > ../phalcon-devtools-files)
cd build
%ifarch i686 i586 i486 i386
cd 32bits
cd 64bits
%configure --enable-phalcon
make clean
CFLAGS="-march=native -mtune=native -O2 -fno-delete-null-pointer-checks -finline-functions -fomit-frame-pointer -fno-builtin-memcmp" \
make %{?_smp_mflags}
rm -rf %{buildroot}
%ifarch i686 i586 i486 i386
INSTALL_ROOT=%{buildroot} make -C build/32bits install
INSTALL_ROOT=%{buildroot} make -C build/64bits install
cat > phalcon.ini << 'EOF'
; Enable phalcon extension module
extension =
%{__install} -D -m 644 phalcon.ini %{buildroot}%{php_inidir}/phalcon.ini
%{__install} -d -m 755 %{buildroot}%{_datadir}/phalcon-devtools/
%{__cp} -ad ./phalcon-devtools-master/* %{buildroot}/%{_datadir}/phalcon-devtools/
#%{__install} -d -m 755 %{buildroot}%{_datadir}/phalcon-devtools/docs
#%{__install} -d -m 755 %{buildroot}%{_datadir}/phalcon-devtools/ide
#%{__install} -d -m 755 %{buildroot}%{_datadir}/phalcon-devtools/resources
#%{__install} -d -m 755 %{buildroot}%{_datadir}/phalcon-devtools/templates
#%{__install} phalcon-devtools-master/{,package.xml,phalcon*,webtools.php} %{buildroot}%{_datadir}/phalcon-devtools/
#%{__install} phalcon-devtools-master/docs/* %{buildroot}%{_datadir}/phalcon-devtools/docs/
#%{__install} phalcon-devtools-master/ide/* %{buildroot}%{_datadir}/phalcon-devtools/ide/
#%{__install} phalcon-devtools-master/resources/* %{buildroot}%{_datadir}/phalcon-devtools/resources/
#%{__install} phalcon-devtools-master/templates/* %{buildroot}%{_datadir}/phalcon-devtools/templates/
%{__install} -d 755 %{buildroot}%{_bindir}
(cd %{buildroot}%{_bindir}; ln -sfn ../..%{_datadir}/phalcon-devtools/ phalcon)
rm -rf %{buildroot}
%defattr(-, root, root, 0755)
%config(noreplace) %{php_inidir}/phalcon.ini
%doc CHANGELOG docs/*
* Fri Nov 22 2013 Yasuo Ohgaki <>
- Initial build.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment