Created
November 29, 2014 19:02
-
-
Save yohgaki/ee26b252d85ac6655c16 to your computer and use it in GitHub Desktop.
phalcon-php.spec - See http://blog.ohgaki.net/phalcon-php-rpm-package
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%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 | |
URL: http://phalconphp.com | |
Source0: c%{pkgname}-master.zip | |
Source1: %{pkgname}-devtools-master.zip | |
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 | |
%description | |
PhalconPHP is a web framework written in C and works as C module. | |
%prep | |
%setup -q -n cphalcon-master | |
unzip %{SOURCE1} | |
(cd phalcon-devtools-master; find * > ../phalcon-devtools-files) | |
%build | |
cd build | |
%ifarch i686 i586 i486 i386 | |
cd 32bits | |
%else | |
cd 64bits | |
%endif | |
phpize | |
%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} | |
%install | |
rm -rf %{buildroot} | |
%ifarch i686 i586 i486 i386 | |
INSTALL_ROOT=%{buildroot} make -C build/32bits install | |
%else | |
INSTALL_ROOT=%{buildroot} make -C build/64bits install | |
%endif | |
cat > phalcon.ini << 'EOF' | |
; Enable phalcon extension module | |
extension = phalcon.so | |
EOF | |
%{__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/{README.md,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.sh phalcon) | |
%clean | |
rm -rf %{buildroot} | |
%files | |
%defattr(-, root, root, 0755) | |
%{php_extdir}/phalcon.so | |
%config(noreplace) %{php_inidir}/phalcon.ini | |
%doc CHANGELOG README.md CONTRIBUTING.md docs/* | |
%{_bindir}/phalcon | |
%{_datadir}/phalcon-devtools | |
%changelog | |
* Fri Nov 22 2013 Yasuo Ohgaki <yohgaki@ohgaki.net> | |
- Initial build. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment