File dba-php-549-imagick.spec of Package dba-php-549-imagick

%define pkg_name        imagick
%define real_vers       3.1.2

%define php_version     5.4.9
%define php_vers        549
%define prefix          /DBA/apache/PHP/%{php_version}
%define phpcmd          %{prefix}/bin/php
%define phpize          %{prefix}/bin/phpize
%define phpconf         %{prefix}/bin/php-config
%define maketest        0

Name:           dba-php-%{php_vers}-imagick
Summary: 	Provides a wrapper to the ImageMagick/GraphicsMagick library
Version: 	%{real_vers}
Release: 	0
License: 	BSD
Group: 		Productivity/Networking/Web/Servers
URL: 		http://pecl.php.net/package/imagick
Source: 	http://pecl.php.net/get/%{pkg_name}-%{version}.tgz
Source1: 	imagick.ini
BuildRoot: 	%{_tmppath}/%{pkg_name}-%{real_vers}-build

%if 0%{?suse_version} >= 1100
BuildRequires:  -post-build-checks
%endif

%if 0%{?suse_version} >= 1200
BuildRequires:  automake
%endif

BuildRequires:	dba-php-%{php_vers} pcre-devel
#!BuildIgnore:  dba-postgresql-839 dba-postgresql-842 dba-postgresql-845 dba-postgresql-846
#!BuildIgnore:  dba-postgresql-901 dba-postgresql-902 dba-postgresql-904 dba-postgresql-910
#!BuildIgnore:  dba-openssl-098o dba-openssl-098r dba-openssl-098x
#!BuildIgnore:  pango postfix librsvg2
#!BuildIgnore:  dba-curl-7371

%if 0%{?suse_version} > 1020
BuildRequires:  re2c
%endif

%if 0%{?rhel_version} >= 600 && 0%{?rhel_version} <= 699
BuildRequires:  re2c
%else
BuildRequires:  ImageMagick-devel
Requires:       ImageMagick
%endif


%description
Imagick is a native php extension to create and modify images using the ImageMagick API.
This extension requires ImageMagick version 6.2.4+ and PHP 5.1.3+.

IMPORTANT: Version 2.x API is not compatible with earlier versions


%prep
%setup -q -n %{pkg_name}-%{real_vers}


%build
CFLAGS="%{optflags} -fno-strict-aliasing"
CXXFLAGS="%{optflags} -fno-strict-aliasing"
%if 0%{?suse_version} > 1000
CFLAGS="$CFLAGS -fstack-protector"
CXXFLAGS="$CXXFLAGS -fstack-protector"
%endif

%if 0%{?suse_version} >= 1200
CFLAGS="$CFLAGS -I/usr/include/ImageMagick-6"
%endif

export CFLAGS
export CXXFLAGS

%{phpize}

%configure \
  --with-php-config=%{phpconf} 

%{__make} %{?jobs:-j%jobs}


%check
%if %maketest
%{__make} test PHP_EXECUTABLE=/usr/bin/php5
%endif


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


%install
# %makeinstall INSTALL_ROOT=%{buildroot}
%{__mkdir_p} %{buildroot}%{prefix}/conf
%{__mkdir_p} %{buildroot}%{prefix}/lib/php/extensions
%{__install} -D -m 0755 ./.libs/imagick.so %{buildroot}%{prefix}/lib/php/extensions/
%{__install} -D -m 0644 %{S:1} %{buildroot}%{prefix}/conf/imagick.ini

%{__rm} -rf %{buildroot}%{prefix}/include


%files
%defattr(-,root,root,-)
%dir %{prefix}/conf
%dir %{prefix}/lib/php/extensions
%{prefix}/conf/imagick.ini
%{prefix}/lib/php/extensions/imagick.so


%changelog
* Thu Sep 10 2015 Holger Manthey <holger.manthey@bertelsmann.de>
- update to version 3.1.2
* Thu Dec  8 2011 Holger Manthey <holger.manthey@bertelsmann.de>
- initial package
- version 3.1.0RC2 released
openSUSE Build Service is sponsored by