File ea-php-php70-phalcon.spec of Package ea-php-php70-phalcon

Name: ea-php70-php-phalcon
Version: 3.0.1
Summary: Phalcon PHP
Release: 1%{?dist}
License: BSD
Group: Programming/Languages
URL: https://phalconphp.com
Source: https://github.com/phalcon/cphalcon/archive/v3.0.1.tar.gz
Source1: phalcon.ini

BuildRequires: ea-php70 ea-php70-php-cli

%description
Phalcon PHP for EasyApache 4

%prep
%setup -n cphalcon-%{version}/build/php7/safe

%build
scl enable ea-php70 phpize
scl enable ea-php70 ./configure
make

%install
scl enable ea-php70 'make install INSTALL_ROOT=%{buildroot}'
install -m 755 -d $RPM_BUILD_ROOT/opt/cpanel/ea-php70/root/etc/php.d/
install -m 644 %{SOURCE1} $RPM_BUILD_ROOT/opt/cpanel/ea-php70/root/etc/php.d/

%clean
%{__rm} -rf %{buildroot}

%post
%postrun
cat << EOF
         _____  _                  _   _    _           _
        |  __ \| |                | | | |  | |         | |
        | |__) | | __ _ _ __   ___| |_| |__| | ___  ___| |_ ___ _ __
        |  ___/| |/ _  |  _ \ / _ \ __|  __  |/ _ \/ __| __/ _ \  __|
        | |    | | (_| | | | |  __/ |_| |  | | (_) \__ \ ||  __/ |
        |_|    |_|\__|_|_| |_|\___|\__|_|  |_|\___/|___/\__\___|_|
EOF
sleep 2

%files
/opt/cpanel/ea-php70/root/usr/%{_lib}/php/modules/phalcon.so
/opt/cpanel/ea-php70/root/etc/php.d/phalcon.ini
/opt/cpanel/ea-php70/root/usr/include/php/ext/phalcon/php_phalcon.h


%changelog
* Mon Nov 01 2016 Gabriel Poulenard-Talbot <gabrielpt@support.planethoster.info> - 3.0.1-1
- Initial spec file creation.