A new user interface for you! Read more...

File php5-ZendFramework.spec of Package php5-ZendFramework

#
# spec file for package php5-ZendFramework
#
# Copyright (c) 2016 SUSE LINUX 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/
#


# APC is compatible to php < 5.5 only; check version and exclude package otherwise
%define apc_compatible %(php -v 2>/dev/null | grep -q -E '^PHP (5\.2|5\.3|5\.4)' && echo 1 || echo 0)

# CHECK ALWAYS if there is a newer version of the extraas-package available
# shall it be removed at some time?
%define extras_version 1.12.18

%define pkg_name ZendFramework
%if 0%{?suse_version}
%define _phpdir %{_datadir}/php5
%else
%define _phpdir %{_datadir}/php
%endif
Name:           php5-ZendFramework
Version:        1.12.19
Release:        0
Summary:        Leading open-source PHP framework
License:        BSD-3-Clause
Group:          Development/Libraries/Other
Url:            http://framework.zend.com/
Source0:        https://packages.zendframework.com/releases/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
Source100:      https://packages.zendframework.com/releases/%{pkg_name}-%{version}/%{pkg_name}-%{version}-apidoc.tar.gz
Source101:      https://packages.zendframework.com/releases/%{pkg_name}-%{version}/%{pkg_name}-%{version}-manual-de.tar.gz
Source102:      https://packages.zendframework.com/releases/%{pkg_name}-%{version}/%{pkg_name}-%{version}-manual-en.tar.gz
Source103:      https://packages.zendframework.com/releases/%{pkg_name}-%{version}/%{pkg_name}-%{version}-manual-fr.tar.gz
Source104:      https://packages.zendframework.com/releases/%{pkg_name}-%{version}/%{pkg_name}-%{version}-manual-ja.tar.gz
Source105:      https://packages.zendframework.com/releases/%{pkg_name}-%{version}/%{pkg_name}-%{version}-manual-ru.tar.gz
Source106:      https://packages.zendframework.com/releases/%{pkg_name}-%{version}/%{pkg_name}-%{version}-manual-zh.tar.gz
Source150:      https://github.com/zendframework/zf1-extras/archive/release-%{extras_version}.tar.gz#/zf1-extras-release-%{extras_version}.tar.gz
Source200:      %{name}-rpmlintrc
BuildRequires:  php >= 5.2.11
Requires:       pcre
Requires:       php >= 5.2.11
Requires:       php-ctype
Requires:       php-curl
Requires:       php-dom
Requires:       php-hash
Requires:       php-iconv
Requires:       php-pdo
Provides:       php-ZendFramework = %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
%if 0%{?suse_version}
Requires:       php-mbstring
# Suggested modules for improved performance/functionality
Suggests:       php-bcmath
Suggests:       php-bitset
Suggests:       php-json
Suggests:       php-posix
# Documentation & dojo requirements
%if 0%{?suse_version} >= 1140
BuildRequires:  fdupes
%endif
%endif

%description
Extending the art & spirit of PHP, Zend Framework is based on simplicity,
object-oriented best practices, corporate friendly licensing, and a rigorously
tested agile codebase. Zend Framework is focused on building more secure,
reliable, and modern Web 2.0 applications & web services, and consuming widely
available APIs from leading vendors like Google, Amazon, Yahoo!, Flickr, as
well as API providers and catalogers like StrikeIron and ProgrammableWeb.

%package demos
Summary:        Demos for the Zend Framework
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}-%{release}

%description demos
This package includes Zend Framework demos for the Feeds, Gdata, Mail, OpenId,
Pdf, Search-Lucene and Services subpackages.

%package tests
Summary:        Unit tests for the Zend Framework
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}-%{release}
Requires:       php5-pear-phpunit

%description tests
This package includes Zend Framework unit tests for all available subpackages.

%package extras
Summary:        Zend Framework Extras (ZendX)
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}-%{release}
Provides:       %{name}-ZendX = %{version}-%{release}

%description extras
This package includes the ZendX libraries.

%if %apc_compatible
%package cache-backend-apc
Summary:        Zend Framework APC cache backend
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}-%{release}
Requires:       php5-APC

%description cache-backend-apc
This package contains the backend for Zend_Cache to store and retrieve data via
APC.
%endif

%package cache-backend-memcached
Summary:        Zend Framework memcache cache backend
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}-%{release}
Requires:       php5-memcached

%description cache-backend-memcached
This package contains the back end for Zend_Cache to store and retrieve data
via memcache.

%package cache-backend-sqlite
Summary:        Zend Framework sqlite back end
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}-%{release}
Requires:       php5-sqlite

%description cache-backend-sqlite
This package contains the back end for Zend_Cache to store and retrieve data
via sqlite databases.

%package captcha
Summary:        Zend Framework CAPTCHA component
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}-%{release}
Requires:       php5-gd

%description captcha
This package contains the Zend Framework CAPTCHA extension.

%package dojo
Summary:        Dojo javascript toolkit
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}-%{release}
Requires:       unzip

%description dojo
This package contains a full copy of the Dojo Javascript toolkit from
Zend Framework externals. You may wish to install this as a reference or
to build custom Dojo layers for deployment with your site.

# %%package Db-Adapter-Db2
# Summary:  Zend Framework database adapter for DB2
# Group:    Development/Libraries/Other
# Requires: %%{name} = %%{version}-%%{release}
# Requires: php-ibm_db2 # Not available on openSUSE

# %%description Db-Adapter-Db2
# This package contains the files for Zend Framework necessary to connect to an
# IBM DB2 database.

%package Db-Adapter-Firebird
Summary:        Zend Framework database adapter for InterBase/Firebird
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}-%{release}
Requires:       %{name}-extras = %{version}-%{release}
Requires:       php5-firebird

%description Db-Adapter-Firebird
This package contains the files for Zend Framework necessary to connect to a
Firebird/InterBase database.

# %%package Db-Adapter-Oracle
# Summary:  Zend Framework database adapter for Oracle
# Group:    Development/Libraries/Other
# Requires: %%{name} = %%{version}-%%{release}
# Requires: php-oci8 # Not available on openSUSE

# %%description Db-Adapter-Oracle
# This package contains the files for Zend Framework necessary to connect to an
# Oracle database.

%package pdf
Summary:        PDF document creation and manipulation
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}-%{release}
Requires:       php5-gd

%description pdf
Portable Document Format (PDF) from Adobe is the de facto standard for
cross-platform rich documents. Now, PHP applications can create or read PDF
documents on the fly, without the need to call utilities from the shell, depend
on PHP extensions, or pay licensing fees. Zend_Pdf can even modify existing PDF
documents.

* supports Adobe PDF file format
* parses PDF structure and provides access to elements
* creates or modifies PDF documents
* utilizes memory efficiently

%package manual-de
Summary:        Zend Framework German programmers reference guide
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}-%{release}

%description manual-de
Extending the art & spirit of PHP, Zend Framework is based on simplicity,
object-oriented best practices, corporate friendly licensing, and a rigorously
tested agile codebase. Zend Framework is focused on building more secure,
reliable, and modern Web 2.0 applications & web services, and consuming widely
available APIs from leading vendors like Google, Amazon, Yahoo!, Flickr, as
well as API providers and catalogers like StrikeIron and ProgrammableWeb.

Programmer's reference guide - German

%package manual-en
Summary:        Zend Framework English programmers reference guide
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}-%{release}

%description manual-en
Extending the art & spirit of PHP, Zend Framework is based on simplicity,
object-oriented best practices, corporate friendly licensing, and a rigorously
tested agile codebase. Zend Framework is focused on building more secure,
reliable, and modern Web 2.0 applications & web services, and consuming widely
available APIs from leading vendors like Google, Amazon, Yahoo!, Flickr, as
well as API providers and catalogers like StrikeIron and ProgrammableWeb.

Programmer's reference guide - English

%package manual-fr
Summary:        Zend Framework French programmers reference guide
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}-%{release}

%description manual-fr
Extending the art & spirit of PHP, Zend Framework is based on simplicity,
object-oriented best practices, corporate friendly licensing, and a rigorously
tested agile codebase. Zend Framework is focused on building more secure,
reliable, and modern Web 2.0 applications & web services, and consuming widely
available APIs from leading vendors like Google, Amazon, Yahoo!, Flickr, as
well as API providers and catalogers like StrikeIron and ProgrammableWeb.

Programmer's reference guide - French

%package manual-ja
Summary:        Zend Framework Japanese programmers reference guide
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}-%{release}

%description manual-ja
Extending the art & spirit of PHP, Zend Framework is based on simplicity,
object-oriented best practices, corporate friendly licensing, and a rigorously
tested agile codebase. Zend Framework is focused on building more secure,
reliable, and modern Web 2.0 applications & web services, and consuming widely
available APIs from leading vendors like Google, Amazon, Yahoo!, Flickr, as
well as API providers and catalogers like StrikeIron and ProgrammableWeb.

Programmer's reference guide - Japanese

%package manual-ru
Summary:        Zend Framework Russian programmers reference guide
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}-%{release}

%description manual-ru
Extending the art & spirit of PHP, Zend Framework is based on simplicity,
object-oriented best practices, corporate friendly licensing, and a rigorously
tested agile codebase. Zend Framework is focused on building more secure,
reliable, and modern Web 2.0 applications & web services, and consuming widely
available APIs from leading vendors like Google, Amazon, Yahoo!, Flickr, as
well as API providers and catalogers like StrikeIron and ProgrammableWeb.

Programmer's reference guide - Russian

%package manual-zh
Summary:        Zend Framework simplified Chinese programmers reference guide
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}-%{release}

%description manual-zh
Extending the art & spirit of PHP, Zend Framework is based on simplicity,
object-oriented best practices, corporate friendly licensing, and a rigorously
tested agile codebase. Zend Framework is focused on building more secure,
reliable, and modern Web 2.0 applications & web services, and consuming widely
available APIs from leading vendors like Google, Amazon, Yahoo!, Flickr, as
well as API providers and catalogers like StrikeIron and ProgrammableWeb.

Programmer's reference guide - simplified Chinese

%package apidoc
Summary:        Zend Framework API reference guide
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}-%{release}

%description apidoc
Extending the art & spirit of PHP, Zend Framework is based on simplicity,
object-oriented best practices, corporate friendly licensing, and a rigorously
tested agile codebase. Zend Framework is focused on building more secure,
reliable, and modern Web 2.0 applications & web services, and consuming widely
available APIs from leading vendors like Google, Amazon, Yahoo!, Flickr, as
well as API providers and catalogers like StrikeIron and ProgrammableWeb.

API reference guide

%prep
%setup -q -n %{pkg_name}-%{version}
tar zfx %{SOURCE100}
tar zfx %{SOURCE101}
tar zfx %{SOURCE102}
tar zfx %{SOURCE103}
tar zfx %{SOURCE104}
tar zfx %{SOURCE105}
tar zfx %{SOURCE106}
mv %{pkg_name}-%{version}/* ./ && rm -r %{pkg_name}-%{version}

# handle "extras" subpackage
tar fzx %{SOURCE150} --strip-components=1 --directory=extras

# remove cruft (gitignore, placeholder)
find . -name '.gitignore' -delete
find . -name '.placeholder' -delete

%if 0%{?suse_version} < 1120
mv tests/Zend/Tool/Project/_files/.zfproject.xml.orig \
  tests/Zend/Tool/Project/_files/.zfproject.xml
sed -i 's/zfproject.xml.orig/zfproject.xml/g' \
  tests/Zend/Tool/Project/ProfileTest.php
%endif

# Add shebang
sed -i -e '1i#!%{_bindir}/sh' tests/runtests.sh
sed -i -e '1i#!%{_bindir}/php' bin/zf.php

%build
find . -type f -perm /111 \
  -fprint executables -exec chmod -x '{}' \; >/dev/null
find . -type f -name \*.sh \
  -fprint valid_executables -exec chmod +x '{}' \; >/dev/null

cat executables valid_executables|sort|uniq -u > invalid_executables

chmod +x bin/zf.php

%install
# Zend Core
mkdir -p %{buildroot}/%{_phpdir}
cp -pr library/Zend %{buildroot}/%{_phpdir}
cp -pr demos/Zend %{buildroot}/%{_phpdir}/Zend/demos
cp -pr tests %{buildroot}/%{_phpdir}/Zend

# ZendX
cp -pr extras/library/ZendX %{buildroot}/%{_phpdir}
cp -pr extras/tests %{buildroot}/%{_phpdir}/ZendX

# Manual
for lang in {de,en,fr,ja,ru,zh}; do
  mkdir -p %{buildroot}/%{_datadir}/doc/ZendFramework/${lang}
  cp -pr documentation/manual/core/${lang}/* %{buildroot}/%{_datadir}/doc/ZendFramework/${lang}
done

# API manual
mkdir -p %{buildroot}/%{_datadir}/doc/ZendFramework/api
cp -pr documentation/api/core/* %{buildroot}/%{_datadir}/doc/ZendFramework/api

# Zend_Tool
mkdir -p %{buildroot}%{_bindir}
cp -pr bin/zf.{php,sh} %{buildroot}%{_bindir}
ln -s -f %{_bindir}/zf.sh %{buildroot}%{_bindir}/zf

# create softlinks
%if 0%{?suse_version} >= 1140
%fdupes -s %{buildroot}
%endif

# remove APC for newer PHP versions
%if %apc_compatible == 0
rm %{buildroot}%{_phpdir}/Zend/Cache/Backend/Apc.php
%endif

%check
# test can not be run as there are missing php-unit-test packages
#cd tests
#./runtests.sh

%files
%defattr(-,root,root,-)
%dir %{_phpdir}/
%{_phpdir}/Zend
%exclude %{_phpdir}/Zend/demos
%exclude %{_phpdir}/Zend/Dojo
%exclude %{_phpdir}/Zend/tests
%exclude %{_phpdir}/Zend/Cache/Backend/Apc.php
%exclude %{_phpdir}/Zend/Cache/Backend/Memcached.php
%exclude %{_phpdir}/Zend/Captcha
%exclude %{_phpdir}/Zend/Pdf.php
%exclude %{_phpdir}/Zend/Pdf
%{_bindir}/zf.sh
%{_bindir}/zf.php
%{_bindir}/zf
%doc LICENSE.txt INSTALL.md README.md

%files demos
%defattr(-,root,root,-)
%{_phpdir}/Zend/demos
%doc LICENSE.txt

%files tests
%defattr(-,root,root,-)
%{_phpdir}/Zend/tests
%doc LICENSE.txt

%files extras
%defattr(-,root,root,-)
%{_phpdir}/ZendX
%exclude %{_phpdir}/ZendX/Db/Adapter/Firebird*
%exclude %{_phpdir}/ZendX/Db/Statement/Firebird*
%doc LICENSE.txt extras/documentation/manual/en/*

%if %apc_compatible
%files cache-backend-apc
%defattr(-,root,root,-)
%{_phpdir}/Zend/Cache/Backend/Apc.php
%doc LICENSE.txt
%endif

%files cache-backend-memcached
%defattr(-,root,root,-)
%{_phpdir}/Zend/Cache/Backend/Memcached.php
%doc LICENSE.txt

%files captcha
%defattr(-,root,root,-)
%{_phpdir}/Zend/Captcha
%doc LICENSE.txt

%files dojo
%defattr(-,root,root,-)
%dir %{_phpdir}/Zend/Dojo
%{_phpdir}/Zend/Dojo
%doc LICENSE.txt

%files Db-Adapter-Firebird
%defattr(-,root,root,-)
%{_phpdir}/ZendX/Db/Adapter/Firebird/
%{_phpdir}/ZendX/Db/Adapter/Firebird.php
%{_phpdir}/ZendX/Db/Statement/Firebird/
%{_phpdir}/ZendX/Db/Statement/Firebird.php
%doc LICENSE.txt

%files pdf
%defattr(-,root,root,-)
%{_phpdir}/Zend/Pdf.php
%{_phpdir}/Zend/Pdf
%doc LICENSE.txt

%files manual-de
%defattr(-,root,root,-)
%dir %{_datadir}/doc/ZendFramework/
%dir %{_datadir}/doc/ZendFramework/de/
%{_datadir}/doc/ZendFramework/de/*
%doc LICENSE.txt

%files manual-en
%defattr(-,root,root,-)
%dir %{_datadir}/doc/ZendFramework/
%dir %{_datadir}/doc/ZendFramework/en/
%{_datadir}/doc/ZendFramework/en/*
%doc LICENSE.txt

%files manual-fr
%defattr(-,root,root,-)
%dir %{_datadir}/doc/ZendFramework/
%dir %{_datadir}/doc/ZendFramework/fr/
%{_datadir}/doc/ZendFramework/fr/*
%doc LICENSE.txt

%files manual-ja
%defattr(-,root,root,-)
%dir %{_datadir}/doc/ZendFramework/
%dir %{_datadir}/doc/ZendFramework/ja/
%{_datadir}/doc/ZendFramework/ja/*
%doc LICENSE.txt

%files manual-ru
%defattr(-,root,root,-)
%dir %{_datadir}/doc/ZendFramework/
%dir %{_datadir}/doc/ZendFramework/ru/
%{_datadir}/doc/ZendFramework/ru/*
%doc LICENSE.txt

%files manual-zh
%defattr(-,root,root,-)
%dir %{_datadir}/doc/ZendFramework/
%dir %{_datadir}/doc/ZendFramework/zh/
%{_datadir}/doc/ZendFramework/zh/*
%doc LICENSE.txt

%files apidoc
%defattr(-,root,root,-)
%dir %{_datadir}/doc/ZendFramework/
%dir %{_datadir}/doc/ZendFramework/api/
%{_datadir}/doc/ZendFramework/api/*
%doc LICENSE.txt

%changelog