File php5-phalcon.spec of Package php5-phalcon13
#
# spec file for package phalcon
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# See also http://en.opensuse.org/openSUSE:Shared_library_packaging_policy
%define _name phalcon
%ifarch x86_64
%define _dir 64bits
%else
%define _dir 32bits
%endif
Name: php5-phalcon
Version: 1.3.4
Release: 0
Summary: PHP5 Extension Module
License: BSD-3-Clause
Group: Development/Libraries/PHP
Url: http://phalconphp.com/
Source0: %{name}-%{version}.tar.gz
BuildRequires: gcc
BuildRequires: php5-devel
Requires: php5-pear
Requires: php5-mysql
%description
Phalcon is an open source, full stack framework for PHP 5
written as a C-extension, optimized for high performance.
You don't need learn or use the C language, since the functionality
is exposed as PHP classes ready for you to use.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%setup -q
mv README.md README
mv CONTRIBUTING.md CONTRIBUTING
%build
CPPFLAGS="-DPHALCON_RELEASE"
CFLAGS="%{optflags} -march=native -mtune=native -O2 -fno-delete-null-pointer-checks -finline-functions -fomit-frame-pointer -fno-builtin-memcmp"
pushd build/%{_dir}
phpize
%configure --enable-%{_name}
make %{?_smp_mflags}
%install
%{__mkdir_p} %{buildroot}%{_libdir}/php5/extensions
%{__mkdir_p} %{buildroot}%{_sysconfdir}/php5/conf.d
pushd build/%{_dir}
make install INSTALL_ROOT=%{buildroot}
echo "; comment out next line to disable %{_name} extension in php" > %{buildroot}/%{_sysconfdir}/php5/conf.d/%{_name}.ini
echo "extension=%{_name}.so" >> %{buildroot}/%{_sysconfdir}/php5/conf.d/%{_name}.ini
%clean
rm -rf %{buildroot}
%post
#
%postun
#
%files
%defattr(644,root,root,755)
%doc CHANGELOG README CONTRIBUTING
%{_libdir}/php5/extensions/%{_name}.so
%config(noreplace) %{_sysconfdir}/php5/conf.d/%{_name}.ini
%changelog