File php5.spec of Package php5

#
# spec file for package php5
#
# Copyright (c) 2011 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/
#

# norootforbuild
# Fairlight Build


Name:           php5
%global apiver      20100412
%global zendver     20100525
%define suhosin_version 0.9.34dev
#%define suhosin_patch_version 0.9.10
%define with_suhosin_patch 0
%define pkg_name php5
%define with_spell 1

BuildRequires:  autoconf automake 
BuildRequires:  libtool >= 2.4.2
BuildRequires:  bison curl-devel freetype2-devel gcc-c++ libpng-devel xorg-x11-devel
BuildRequires:  db-devel enchant-devel gmp-devel imap-devel libicu-devel libtidy-devel
BuildRequires:  libtiff-devel libxslt-devel mm-devel net-snmp-devel openldap2-devel
BuildRequires:  pam-devel pkgconfig postfix postgresql-devel unixODBC-devel update-alternatives
BuildRequires:  libjpeg-devel 
%if 0%{suse_version} == 1140
%ifarch x86_64
BuildRequires: perl-Term-ReadKey
Requires: perl-Term-ReadKey
%endif
%endif
Requires: libedit libedit-devel libjpeg-devel ncurses ncurses-devel
BuildRequires:  krb5-devel libmcrypt-devel
%if 0%{suse_version} <= 1100
BuildRequires: libevent
Requires: libevent
%else
BuildRequires: libevent-devel
Requires: libevent-devel
%endif
%if 0%{suse_version} >= 1210
BuildRequires:  systemd
%endif
%if %{?suse_version:1}0
%define httpduser wwwrun
%define httpdgroup www
%else
%define httpduser apache
%define httpdgroup apache
%endif
BuildRequires: libexpat1
BuildRequires: apache2-devel >= 2.4.27
BuildRequires: libopenssl-devel >= 1.0.1i
BuildRequires: openssl >= 1.0.1i

#BuildRequires:  mysql-devel
%if %{with_spell}
BuildRequires:  aspell-devel
%endif
%if 0%{?suse_version} > 1000
# I would like this to become a hard dependency, as PHP is
# documented to have this modules by default (no addtional libs are needed)
Recommends:     php-ctype php-dom php-iconv php-sqlite php-tokenizer
Recommends:     php-xmlreader php-xmlwriter php-json php-hash
# other highly reccommended extensions
Suggests:       php-mbstring php-gd php-pear php-gettext php-mysql php-suhosin
%else
BuildRequires:  libgcrypt-devel rpm-devel
%endif
BuildRequires:  libedit libedit-devel ncurses ncurses-devel
%if 0%{suse_version} == 1100
BuildRequires:  lzma-alpha-devel
%endif
# use system PCRE and sqlite  on 10.2 an up only, previous versions will not work.
%if 0%{?suse_version} > 1010
BuildRequires:  pcre-devel sqlite-devel sqlite2-devel
%endif
#support t1lib in gd in 10.3 or later
%if 0%{?suse_version} > 1020
BuildRequires:  re2c t1lib-devel
#10.3 does not install sendmail binary with the minimal system
Requires:       smtp_daemon
%endif
%define extension_dir     %{_libdir}/%{pkg_name}/extensions
%define peardir           %{_datadir}/%{pkg_name}/PEAR
%define php_sysconf       %{_sysconfdir}/%{pkg_name}
%define _x11prefix %(pkg-config --variable=prefix xft)
########################################
# apache macros
########################################
%define apxs2              %{_sbindir}/apxs2
%define apache2_mmn        %(MMN=$(%{apxs2} -q LIBEXECDIR)_MMN; test -x $MMN && $MMN)
%define apache2_libexecdir %(%{apxs2} -q LIBEXECDIR)
%define apache2_sysconfdir %(%{apxs2} -q SYSCONFDIR)
%define apache2_includedir %(%{apxs2} -q INCLUDEDIR)
%define apache2_serverroot %(%{apxs2} -q PREFIX)
%define need_libxml2_hack  %(if grep -q XML_PARSE_OLDSAX %{_includedir}/libxml/parser.h;then echo 1; else echo 0; fi)
#unfortunately at this stage we dont have a working PHP binary..
#define builtin_tz_ver 	2007.9
###
###
Version:        5.4.45
Release:        1
License:        The PHP License, version 3.01
Group:          Development/Languages/Other
Provides:       php zend php-xml php-spl php-simplexml php-session php-pcre php-date php-reflection php-filter
Provides:       php-api = %{apiver}, php-zend-abi = %{zendver}
Provides:       php(api) = %{apiver}, php(zend-abi) = %{zendver}
AutoReqProv:    on
PreReq:         update-alternatives
#extensions that are no longer here
Obsoletes:      php5-dbx php5-dio php5-fam php5-filepro php5-yp php5-dbase php5-ncurses
Source0:        php-%{version}.tar.bz2
Source1:        php5-suse-addons.tar.bz2
Source2:        suhosin-%{suhosin_version}.tgz
Source4:        README.SUSE-pear
Source5:        README.macros
Source6:        macros.php
Source7:        install-pear-nozlib.phar
Source8:        php-fpm.init
Source9:        php5-rpmlintrc
Patch3:         php5-apache_sapi_install.patch
Patch4:         php5-php-config.patch
Patch5:         php5-apache2_sapi_5.4.11_fltpatch.patch
Patch6:         php5-nonvoidreturnfix_flt.patch
Patch7:         php5-nonvoidreturnfix_flt2.patch
#currently disabled, on purpose !
#%if %{with_suhosin_patch}
#Patch6:         suhosin-patch-5.3.3-%{suhosin_patch_version}.patch.gz
#%endif
#Patch7:         php-5.3.1-systzdata-v7.patch
#bugs
#Patch13:        php-5.2.9-BNC-457056.patch
#Patch14:        php-5.3.0-ldap-checks.patch
#Patch15:        php-5.3.0-fix-rpmlint-errors.patch
#Patch19:        php-5.3.0-bnc513080.patch
#Patch20:        php-5.3.2-ini.patch
# PATCH-FIX-UPSTREAM php5-autoconf-2.65.patch http://bugs.php.ney/bug.php?id=50291 dimstar@opensuse.org -- Build fails with autoconf > 2.63
#Patch22:        php-5.3.2-aconf26x.patch
#Patch23:        php-5.3-session.patch
#Patch24:        php-5.3.2-no-build-date.patch
#Patch25:        php-cloexec.patch
#Patch26:        php-5.3.4-pts.patch
#Patch27:        php-5.3.4-format-string-issues.patch
#Patch28:        php-5.3.5-fopen_https_proxy_auth_fix.patch
#Patch29:        php-5.3.5-CVE-2011-0420.patch
#Patch30:        php-5.3.5-CVE-2011-0708.patch
Url:            http://www.php.net
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Summary:        PHP5 Core Files
Requires:       timezone

%description
This package contains the PHP5 core files, including PHP binary (CLI)
and PHP configuration (php.ini). This package must be installed in
order to use PHP. Additionally, extension modules and server modules
(e.g. for Apache) may be installed.

Additional documentation is available in package php-doc.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package devel
License:        The PHP License, version 3.01
Provides:       php-devel pecl
Summary:        Include files of PHP5
Group:          Development/Languages/C and C++
#this is required by the installed  development headers
Requires:       %{name} = %{version} glibc-devel libxml2-devel
#this is needed for "pecl" functionality
Requires:       autoconf automake
# 5.2.2 or later installs php_pcre.h that requires pcre-devel
%if 0%{?suse_version} > 1010
Requires:       pcre-devel
%endif
Conflicts:      php4-devel
PreReq:         update-alternatives
Provides:       php-macros = 2.0
Obsoletes:      php-macros < 2.0

%description devel
PHP is a server-side, cross-platform, HTML embedded scripting language.
If you are completely new to PHP and want to get some idea of how it
works, have a look at the Introductory Tutorial.  Once you get beyond
that have a look at the example archive sites and some of the other
resources available in the Links section. PHP5 is the latest version.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package pear
License:        The PHP License, version 3.01
Provides:       php-pear
Summary:        PHP Extension and Application Repository
Group:          Development/Libraries/PHP
Requires:       %{name}-zlib = %{version}
PreReq:         update-alternatives
%if 0%{?suse_version} > 1110
BuildArch:      noarch
%endif

%description pear
PEAR is a code repository for PHP extensions and PHP library code
similar to TeX's CTAN and Perl's CPAN. This package provides an access
to the repository.

See http://pear.php.net/manual/ for more datails.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package -n apache2-mod_php5
License:        The PHP License, version 3.01
Summary:        PHP5 Module for Apache 2.0
Group:          Productivity/Networking/Web/Servers
Requires:       apache2-prefork %{apache2_mmn} %{name} = %{version}
PreReq:         apache2
Conflicts:      apache2-mod_php4
Provides:       mod_php_any php-xml php-spl php-simplexml php-session php-pcre php-date php-reflection php-filter

%description -n apache2-mod_php5
PHP is a server-side, cross-platform HTML embedded scripting language.
If you are completely new to PHP and want to get some idea of how it
works, have a look at the Introductory tutorial. Once you get beyond
that, have a look at the example archive sites and some of the other
resources available in the links section.

Please refer to /usr/share/doc/packages/php5/README.SUSE for
information on how to load the module into the Apache webserver.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package fastcgi
License:        The PHP License, version 3.01
Summary:        FastCGI PHP5 Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}
PreReq:         update-alternatives
Provides:       php-xml php-fastcgi php-cgi php-spl php-simplexml php-session php-pcre php-date php-reflection php-filter

%description fastcgi
PHP is a server-side, cross-platform HTML embedded scripting language.
If you are completely new to PHP and want to get some idea of how it
works, have a look at the Introductory tutorial. Once you get beyond
that have a look at the example archive sites and some of the other
resources available in the links section.

Please refer to /usr/share/doc/packages/php5/README.FastCGI for
information on how to use this module.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package fpm
License:        The PHP License, version 3.01
Summary:        FastCGI Process Manager PHP5 Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}
PreReq:         update-alternatives %insserv_prereq
Provides:       php-fpm php-xml php-spl php-simplexml php-session php-pcre php-date php-reflection php-filter

%description fpm
  PHP is a server-side, cross-platform HTML embedded scripting language.
  If you are completely new to PHP and want to get some idea of how it
  works, have a look at the Introductory tutorial. Once you get beyond
  that have a look at the example archive sites and some of the other
  resources available in the links section.

  Please refer to /usr/share/doc/packages/php5/README.FastCGI for
  information on how to use this module.


{>
(>Authors:
  --------
      The PHP Group
      See http://www.php.net/credits.php for more details

%package bcmath
License:        The PHP License, version 3.01
Provides:       php-bcmath
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description bcmath
Binary Calculator which supports numbers of any size and precision,
represented as strings.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package bz2
License:        The PHP License, version 3.01
Provides:       php-bz2
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description bz2
PHP functions to read and write bzip2 (.bz2) compressed files.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package calendar
License:        The PHP License, version 3.01
Provides:       php-calendar
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description calendar
PHP functions for converting between different calendar formats.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package ctype
License:        The PHP License, version 3.01
Provides:       php-ctype
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description ctype
PHP functions for checking whether a character or string falls into a
certain character class according to the current locale.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package curl
License:        The PHP License, version 3.01
Provides:       php-curl
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description curl
PHP interface to libcurl that allows you to connect to and communicate
with servers of many different types, using protocols of many different
types.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package dba
License:        The PHP License, version 3.01
Provides:       php-dba
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description dba
This is a general abstraction layer for several file-based databases.
As such, functionality is limited to a common subset of features
supported by modern databases such as Sleepycat Software's DB2. (This
is not to be confused with IBM's DB2 software, which is supported
through the ODBC functions.)



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package dom
License:        The PHP License, version 3.01
Provides:       php-dom
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description dom
This module adds DOM support.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package enchant
License:        The PHP License, version 3.01
Provides:       php-enchant
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description enchant
Enchant is the PHP binding for the » Enchant library. Enchant steps in to provide uniformity and conformity on top of all spelling libraries, and implement certain features that may be lacking in any individual provider library. Everything should "just work" for any and every definition of "just working."


Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package exif
License:        The PHP License, version 3.01
Provides:       php-exif
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version} %{name}-mbstring = %{version}

%description exif
PHP functions for extracting EXIF (metadata from images) information
stored in headers of JPEG and TIFF images.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package fileinfo
License:        The PHP License, version 3.01
Provides:       php-fileinfo
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description fileinfo
The functions in this module try to guess the content type and encoding of a file by looking for certain magic byte sequences at specific positions within the file. While this is not a bullet proof approach the heuristics used do a very good job.


Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package ftp
License:        The PHP License, version 3.01
Provides:       php-ftp
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version} %{name}-openssl = %{version}

%description ftp
PHP functions for access to file servers speaking the File Transfer
Protocol (FTP) as defined in rfc959.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package gd
License:        The PHP License, version 3.01
Provides:       php-gd
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description gd
PHP functions to create and manipulate image files in a variety of
different image formats, including GIF, PNG, JPEG, WBMP, and XPM. Even
more convenient: PHP can output image streams directly to a browser.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package gettext
License:        The PHP License, version 3.01
Provides:       php-gettext
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description gettext
PHP functions that implement an NLS (Native Language Support) API which
can be used to internationalize your PHP applications.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package gmp
License:        The PHP License, version 3.01
Provides:       php-gmp
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description gmp
PHP functions for work with arbitrary-length integers using the GNU MP
library.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package hash
License:        The PHP License, version 3.01
Provides:       php-hash php-mhash %{name}-mhash = %{version}
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}
Obsoletes:      %{name}-mhash < %{version}

%description hash
Message Digest (hash) engine. Allows direct or incremental processing
of arbitrary length messages using a variety of hashing algorithms.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package iconv
License:        The PHP License, version 3.01
Provides:       php-iconv
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description iconv
PHP interface to iconv character set conversion facility.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package imap
License:        The PHP License, version 3.01
Provides:       php-imap
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description imap
PHP functions in this extension are not limited to the IMAP protocol,
despite their name. The underlying c-client library also supports NNTP,
POP3 and local mailbox access methods.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details


%package intl
License:        The PHP License, version 3.01
Provides:       php-intl
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description intl
Internationalization extension (further is referred as Intl) is a wrapper for » ICU  library, enabling PHP programmers to perform UCA-conformant collation and date/time/number/currency formatting in their scripts.


Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details



%package json
License:        The PHP License, version 3.01
Provides:       php-json
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description json
Support for JSON (JavaScript Object Notation) serialization.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package ldap
License:        The PHP License, version 3.01
Provides:       php-ldap
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version} %{name}-openssl = %{version}

%description ldap
PHP interface to Lightweight Directory Access Protocol (LDAP).



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package mbstring
License:        The PHP License, version 3.01
Provides:       php-mbstring
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description mbstring
This extension provides multi-byte character safe string functions and
other utility functions such as conversion functions.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package mcrypt
License:        The PHP License, version 3.01
Provides:       php-mcrypt
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description mcrypt
PHP interface to the mcrypt library, which supports a wide variety of
block algorithms.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package mysql
License:        The PHP License, version 3.01
Provides:       php-mysql php5-mysqli = %{version} php5-pdo_mysql = %{version}
Provides:       php_any_db
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version} %{name}-pdo = %{version}
Obsoletes:      php5-mysqli =< %{version} php5-pdo_mysql =< %{version}

%description mysql
PHP functions for access to MySQL database servers.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package odbc
License:        The PHP License, version 3.01
Provides:       php-odbc php-pdo_odbc
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version} %{name}-pdo = %{version}

%description odbc
This module adds ODBC support.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package openssl
License:        The PHP License, version 3.01
Provides:       php-openssl
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description openssl
This module adds OpenSSL support.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package pcntl
License:        The PHP License, version 3.01
Provides:       php-pcntl
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description pcntl
This module will attempt to implement all features related to process
spawning and control (fork(), waitpid(), signal(), WIF's, etc). This is
extremley experimental, with hope to become stable on most UNIX's. I
greatly appreciate any feedback, fixes, and or suggestions on how to
improve/better implement this functionality.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package phar
License:        The PHP License, version 3.01
Provides:       php-phar
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version} %{name}-hash = %{version}

%description phar
The phar extension provides a way to put entire PHP applications into a
single file called a "phar" (PHP Archive) for easy distribution and installation

Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package pdo
License:        The PHP License, version 3.01
Provides:       php-pdo
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description pdo
PHP Data Objects - Data Access Abstraction

- light-weight

- provides common API for common database operations

- keeps majority of PHP specific stuff in the PDO core (such as
persistent resource management); drivers should only have to worry
about getting the data and not about PHP internals.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package pgsql
License:        The PHP License, version 3.01
Provides:       php-pgsql php5-pdo_pgsql = %{version} php_any_db
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version} %{name}-pdo = %{version}
Obsoletes:      php5-pdo_pgsql <= %{version}

%description pgsql
PHP functions for access to PostgreSQL database servers. It includes
both traditional pgsql and pdo_pgsql drivers.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package posix
License:        The PHP License, version 3.01
Provides:       php-posix
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description posix
This module allows to use POSIX-like functions in PHP.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%if %{with_spell}

%package pspell
License:        Other uncritical OpenSource License ; The PHP License, version 3.1.
Provides:       php-pspell
Summary:        PHP5 pspell extension
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version} aspell-en

%description pspell
PHP interface to the aspell, which provides spell checking
functionality.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%endif

%package readline
License:        The PHP License, version 3.01
Provides:       php-readline
Summary:        PHP5 readline extension
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description readline
PHP interface to libedit, which provides editable command line as well
as PHP interactive mode (php -a)



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package shmop
License:        The PHP License, version 3.01
Provides:       php-shmop
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description shmop
PHP functions to read, write, create and delete UNIX shared memory
segments.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package snmp
License:        The PHP License, version 3.01
Provides:       php-snmp
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description snmp
PHP functions for SNMP.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package soap
License:        The PHP License, version 3.01
Provides:       php-soap
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description soap
This module provides SOAP support.

SOAP extension can be used to write SOAP Servers and Clients. It
supports subsets of SOAP 1.1, SOAP 1.2 and WSDL 1.1 specifications.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package sockets
License:        The PHP License, version 3.01
Provides:       php-sockets
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description sockets
A low-level interface to the socket communication functions based on
the popular BSD sockets, providing the possibility to act as a socket
server as well as a client. This extension is experimental!



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package sqlite
License:        The PHP License, version 3.01
Provides:       php-sqlite3 = %{version} php-sqlite = %{version} php5-pdo_sqlite = %{version}
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version} %{name}-pdo = %{version}
Obsoletes:      php5-pdo_sqlite <= %{version}

%description sqlite
This is an extension for the SQLite Embeddable SQL Database Engine.
http://www.sqlite.org/

SQLite is a C library that implements an embeddable SQL database
engine. Programs that link with the SQLite library can have SQL
database access without running a separate RDBMS process.

SQLite is not a client library used to connect to a big database
server. SQLite is the server. The SQLite library reads and writes
directly to and from the database files on disk.

This package includes sqlite and pdo_sqlite modules for sqlite version
2 and 3 respectively.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details


%package suhosin
License:        The PHP License, version 3.01
Provides:       php-suhosin
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description suhosin
Suhosin is an advanced protection system for PHP installations. It was
designed to protect servers and users from known and unknown flaws in
PHP applications and the PHP core.

Suhosin is binary compatible to normal PHP installation, which means it
is compatible to 3rd party binary extension like ZendOptimizer.



Authors:
--------
    Stefan Esser <stefan.esser@hardened-php.net>
    Peter Prochaska <peter.prochaska@hardened-php.net>
    Christopher Kunz <christopher.kunz@hardened-php.net>

%package sysvmsg
License:        The PHP License, version 3.01
Provides:       php-sysvmsg
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description sysvmsg
This module provides System V IPC support.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package sysvsem
License:        The PHP License, version 3.01
Provides:       php-sysvsem
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description sysvsem
PHP interface for System V semaphores.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package sysvshm
License:        The PHP License, version 3.01
Provides:       php-sysvshm
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description sysvshm
PHP interface for System V shared memory.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package tidy
License:        The PHP License, version 3.01
Provides:       php-tidy
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description tidy
Tidy is an extension based on Libtidy (http://tidy.sf.net/) and allows
a PHP dev eloper to clean, repair, and traverse HTML, XHTML, and XML
documents -- including ones with embedded scripting languages such as
PHP or ASP within them using OO constructs.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package tokenizer
License:        The PHP License, version 3.01
Provides:       php-tokenizer
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description tokenizer
The tokenizer functions provide an interface to the PHP tokenizer
embedded in the Zend Engine. Using these functions you may write your
own PHP source analyzing or modification tools without having to deal
with the language specification at the lexical level.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package wddx
License:        The PHP License, version 3.01
Provides:       php-wddx
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description wddx
PHP functions for Web Distributed Data Exchange.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package xmlrpc
License:        The PHP License, version 3.01
Provides:       php-xmlrpc
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description xmlrpc
This module adds XMLRPC-EPI support.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package xsl
License:        The PHP License, version 3.01
Provides:       php-xsl
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version} %{name}-dom = %{version}

%description xsl
This module adds new XSL support to PHP.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package xmlreader
License:        The PHP License, version 3.01
Provides:       php-xmlreader
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version} %{name}-dom = %{version}

%description xmlreader
XMLReader represents a reader that provides non-cached, forward-only
access to XML data. It is based upon the xmlTextReader api from libxml.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package xmlwriter
License:        The PHP License, version 3.01
Provides:       php-xmlwriter
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description xmlwriter
XMLWriter wraps the libxml xmlWriter API. Represents a writer that
provides a non-cached, forward-only means of generating streams or
files containing XML data.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package zip
License:        The PHP License, version 3.01
Provides:       php-zip
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description zip
Zip is an extension to create, modify and read zip files.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%package zlib
License:        The PHP License, version 3.01
Provides:       php-zlib
Summary:        PHP5 Extension Module
Group:          Development/Libraries/PHP
Requires:       %{name} = %{version}

%description zlib
PHP functions to read and write gzip (.gz) compressed files.



Authors:
--------
    The PHP Group
    See http://www.php.net/credits.php for more details

%prep
%setup -q -n php-%{version} -a 1
%{__tar} xf %{S:2} -C ext
%{__mv} ext/suhosin-%{suhosin_version} ext/suhosin
%{__cp} %{S:4} pear/README.SUSE
%{__cp} %{S:5} .
%{__cp} %{S:7} pear/
%patch3
%patch4
%patch5
%patch6
%patch7
%if %{with_suhosin_patch}
%patch6
%endif
%if %{need_libxml2_hack}
echo "***APPLY LIBXML2.7 FIX***"
#%patch13
%else
echo "***SKIPPING LIBMXL2.7 FIX ***"
%endif

# we build three SAPI
%{__mkdir_p} build-apache2 build-fpm
%{__mkdir_p} build-fastcgi/sapi/cgi/libfcgi
%{__mkdir_p} build-cli/ext/sqlite/libsqlite/src/

# THis happends only with bison 1.875
%if 0%{?suse_version} < 1010
# our bison seems to generate wrong parser, so use the pregenerated ones...
for sapi in apache2 fastcgi cli ; do
    %{__mkdir} build-$sapi/Zend
    %{__cp} \
        Zend/zend_language_scanner.c \
        Zend/zend_language_parser.h \
        Zend/zend_language_parser.c \
        Zend/zend_ini_parser.h \
        Zend/zend_ini_parser.c \
        build-$sapi/Zend
done
%endif

%if 0%{?suse_version} > 1100 
for parser in `find -name "*.re"`;do
	re2c --no-generation-date -gi "$parser" > ${parser%.*}.c
done
%endif

# Safety check for API version change.
vapi=`sed -n '/#define PHP_API_VERSION/{s/.* //;p}' main/php.h`
if test "x${vapi}" != "x%{apiver}"; then
   : Error: Upstream API version is now ${vapi}, expecting %{apiver}.
   : Update the apiver macro and rebuild.
   exit 1
fi
vzend=`sed -n '/#define ZEND_MODULE_API_NO/{s/^[^0-9]*//;p;}' Zend/zend_modules.h`
if test "x${vzend}" != "x%{zendver}"; then
   : Error: Upstream Zend ABI version is now ${vzend}, expecting %{zendver}.
   : Update the zendver macro and rebuild.
   exit 1
fi

%build
# Force use of system libtool(when newer than the included)
#get rid of bundled libraries which are not used in 10.2 and later
%if 0%{?suse_version} > 1010
%{__rm} -rf ext/pcre/pcrelib ext/pdo_sqlite/sqlite
%endif
# regenerate configure etc.
# workaround: suhosin-patch updates timestamp of configure, confusing buildconf
%{__rm} -f configure
./buildconf --force
# export flags
CFLAGS="$RPM_OPT_FLAGS -Wmissing-format-attribute -D_GNU_SOURCE -fno-strict-aliasing -pipe"
CXXFLAGS="$RPM_OPT_FLAGS -Wmissing-format-attribute -D_GNU_SOURCE -fno-strict-aliasing -pipe"
%if 0%{?suse_version} > 1000
CFLAGS="$CFLAGS -fstack-protector"
CXXFLAGS="$CXXFLAGS -fstack-protector"
%endif
export CFLAGS
export CXXFLAGS
export NO_INTERACTION=true
# where to install extensions
EXTENSION_DIR=%{extension_dir}
export EXTENSION_DIR
export PHP_MYSQLND_ENABLED=yes
# build function
Build()
{
    sapi=$1
    pushd build-$1
    shift
    ../configure \
        --prefix=%{_prefix} \
        --datadir=%{_datadir}/%{pkg_name} \
        --mandir=%{_mandir} \
        --bindir=%{_bindir} \
        --with-libdir=%{_lib} \
        --includedir=%{_includedir} \
        --sysconfdir=%{php_sysconf}/$sapi \
        --with-config-file-path=%{php_sysconf}/$sapi \
        --with-config-file-scan-dir=%{php_sysconf}/conf.d \
        --enable-libxml \
        --enable-session=shared \
%if 0%{?suse_version} > 1010
        --with-pcre-regex=%{_usr} \
%else
        --with-pcre-regex \
%endif
        --enable-xml \
        --enable-simplexml \
        --enable-spl \
        --enable-filter \
        --disable-debug \
        --enable-inline-optimization \
        --disable-rpath \
		--disable-static \
		--enable-shared \
		--program-suffix=5 \
		--with-pic \
		--with-gnu-ld \
		--enable-re2c-cgoto \
		--with-system-tzdata=/usr/share/zoneinfo \
        "$@" || cat config.log
# Some modules are builtin, reasons:
#  - libxml can not be shared (and is needed by PEAR)
#  - spl doesn't build shared
#  - simplexml is needed by spl
#  - session need to be builtin, otherwise sqlite and other session engines fail
#  - pcre is needed for PEAR
#  - filter is builtin due security reasons
#We have still have harcoded RPATH in some modules
#%{__sed} -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
#%{__sed} -i 's|^runpath_var=LD_RUN_PATH|runpath_var=LIBTOOL_IS_BROKED|g' libtool
    %{__make} %{?jobs:-j%jobs PHP_PEAR_PHP_BIN=%{_bindir}/%{pkg_name}}
    popd
}
# perform all builds
# apache2 sapi
Build apache2 \
    --with-mm \
    --with-apxs2=%{apxs2} \
    --disable-all \
    --disable-cli \
# fast-cgi sapi
Build fastcgi \
    --with-mm \
    --enable-force-cgi-redirect \
    --disable-discard-path \
    --enable-fastcgi \
    --bindir=%{_bindir} \
    --disable-cli \
    --disable-all \

Build fpm \
	--with-mm \
	--enable-fpm \
	--bindir=%{_bindir} \
	--disable-cli \
	--disable-all\

# cli sapi with all shared modules
# Hack the built configure to also link ncurses together with libedit.
# this is reported upstream bug http://bugs.php.net/bug.php?id=21153
sed -i "s/-ledit/-ledit -lncurses/g" configure
Build cli \
    --enable-cli \
    --with-pear=%{peardir} \
    --enable-bcmath=shared \
    --enable-calendar=shared \
    --enable-ctype=shared \
    --enable-dom=shared \
    --enable-exif=shared \
    --enable-ftp=shared \
    --enable-mbstring=shared \
    	--enable-mbregex \
    --enable-pcntl=shared \
    --enable-posix=shared \
    --enable-shmop=shared \
    --enable-soap=shared \
    --enable-sockets=shared \
    --enable-sysvmsg=shared \
    --enable-sysvsem=shared \
    --enable-sysvshm=shared \
    --enable-tokenizer=shared \
    --enable-wddx=shared \
	--enable-fileinfo=shared \
    --with-zlib=shared \
    --with-bz2=shared \
    --with-curl=shared \
    --with-gd=shared \
        --enable-gd-native-ttf \
        --with-xpm-dir=%{_x11prefix} \
        --with-freetype-dir=%{_usr} \
        --with-png-dir=%{_usr} \
        --with-jpeg-dir=%{_usr} \
        --with-zlib-dir=%{_usr} \
%if 0%{?suse_version} > 1020
        --with-t1lib=%{_usr} \
%endif
    --with-gettext=shared \
    --with-gmp=shared \
    --enable-hash=shared \
		--with-mhash \
    --with-iconv=shared \
    --with-imap=shared \
        --with-kerberos \
        --with-imap-ssl \
    --enable-json=shared \
    --with-ldap=shared \
    	--with-ldap-sasl=%{_usr} \
	--with-libedit=shared,%{_usr} \
    --with-mcrypt=shared \
    --with-mysql=shared,mysqlnd \
%if 0%{?suse_version} > 1110
	--with-mysql-sock=/var/run/mysql/mysql.sock \
%else
	 --with-mysql-sock=/var/lib/mysql/mysql.sock \
%endif
    --with-mysqli=shared,mysqlnd \
    --with-unixODBC=shared,%{_usr} \
    --with-openssl=shared \
    --with-pgsql=shared,%{_usr} \
    --enable-phar=shared \
%if %{with_spell}
    --with-pspell=shared \
    --with-enchant=shared,%{_usr} \
%endif
    --with-snmp=shared \
    --with-xmlrpc=shared \
    --enable-xmlreader=shared \
    --enable-xmlwriter=shared \
    --with-xsl=shared \
    --with-tidy=shared,%{_usr} \
    --enable-dba=shared \
	   --with-db4=%{_usr} \
       --without-gdbm \
       --with-cdb \
       --with-inifile \
       --with-flatfile \
    --enable-pdo=shared \
%if 0%{?suse_version} > 1010
    --with-pdo_sqlite=shared,%{_usr} \
    --with-sqlite3=shared,%{_usr} \
%else
    --with-pdo_sqlite=shared \
	--with-sqlite3=shared \
%endif
    --with-pdo-mysql=shared,mysqlnd \
    --with-pdo-pgsql=shared,%{_usr} \
	--with-pdo-odbc=shared,unixODBC,%{_usr} \
%if 0%{?suse_version} > 1010
    --with-sqlite=shared,%{_usr}  \
%else
   	--with-sqlite=shared \
%endif
        --enable-sqlite-utf8 \
    --enable-zip=shared \
    --enable-suhosin=shared \
    --enable-intl=shared,%{_usr} \
    --disable-cgi
# things that currently do not compile:
# extensions:
#    --with-recode=shared \ error: recode extension can not be configured together with: imap mysql yaz
#disabled extensions
#    --enable-embedded-mysqli \

%check
cd build-cli
# Run tests, using the CLI SAPI
export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 LANG=POSIX LC_ALL=POSIX
unset TZ
#%{__make} test
set +x
for f in `find .. -name "*.diff" -type f -print`; do
	echo "TEST FAILURE: $f --"
	cat "$f"
	echo "-- $f result ends."
done
set -x
unset NO_INTERACTION REPORT_EXIT_STATUS 

%install
# install function
Install()
{
    pushd build-$1
    %{__make} install INSTALL_ROOT=%{buildroot} PHP_PEAR_PHP_BIN=%{_bindir}/%{pkg_name}
    popd
}
# do the actual installation
Install apache2
#need it for yast module
%{__mv} %{buildroot}%{apache2_libexecdir}/libphp5.so %{buildroot}%{apache2_libexecdir}/mod_php5.so
Install fastcgi
Install cli
Install fpm
# generate php.ini from php.ini-production:
%{__install} -d -m 755 %{buildroot}/%{php_sysconf}/conf.d
%{__install} -d -m 755 %{buildroot}/%{php_sysconf}/apache2
%{__install} -d -m 755 %{buildroot}/%{php_sysconf}/cli
%{__install} -d -m 755 %{buildroot}/%{php_sysconf}/fastcgi
%{__install} -d -m 755 %{buildroot}/%{php_sysconf}/fpm
%{__sed} "s=@extdir@=%{extension_dir}=" php.ini-production \
    > %{buildroot}/%{php_sysconf}/apache2/php.ini
%{__sed} "s=@extdir@=%{extension_dir}=" php.ini-production \
    | %{__sed} -r 's/^(html_errors|implicit_flush|max_execution_time|register_argc_argv)/;\1/' \
    > %{buildroot}/%{php_sysconf}/cli/php.ini
%{__sed} "s=@extdir@=%{extension_dir}=" php.ini-production \
    > %{buildroot}/%{php_sysconf}/fastcgi/php.ini
# prepare configuration files for each extension
extern_modules=""
for f in %{buildroot}%{extension_dir}/*; do
    if test ${f##*.} = a; then
        %{__rm} $f
        continue
    fi
    if test ${f##*.} = so; then
        f=${f%.so}
    fi
    ext=${f##*/}
    extern_modules="$extern_modules $ext"
    echo "; comment out next line to disable $ext extension in php" > %{buildroot}/%{php_sysconf}/conf.d/$ext.ini
    echo "extension=$ext.so" >> %{buildroot}/%{php_sysconf}/conf.d/$ext.ini
done
#suhosin configuration
%{__install} -m 644 ext/suhosin/suhosin.ini %{buildroot}/%{php_sysconf}/conf.d/suhosin.ini
# list of builtin modules
builtin_modules=`./build-cli/sapi/cli/php -m | egrep -v '^(\[.*)?$' | sort | tr '\n' ' '`
# update readme
%{__sed} "s=@EXTERN_MODULES@=$extern_modules=;s=@BUILTIN_MODULES@=$builtin_modules=" php-suse-addons/README.SUSE > README.SUSE
# apache configuration
%{__mkdir_p} %{buildroot}%{apache2_sysconfdir}/conf.d
%{__install} -m 644 php-suse-addons/sysconfig.apache2 %{buildroot}/%{apache2_sysconfdir}/conf.d/%{pkg_name}.conf
pushd %{buildroot}/%{_bindir}
#%{__mv} php php5
%{__mv} pear pear5
%{__mv} pecl pecl5
popd
#pushd %{buildroot}/%{_mandir}/man1
#%{__mv} php.1 php5.1
#popd
# directory for sessions
%{__install} -d %{buildroot}/var/lib/%{pkg_name}
# documentation
%{__mv} sapi/cli/README README.CLI
%{__mv} sapi/cgi/README.FastCGI README.FastCGI
%{__rm} -rf %{buildroot}/{.channels,.depdb*,.filemap,.lock,usr/bin/peardev}
%{__install} -d -m 0755 %{buildroot}/%{peardir}/test
# for pear XML files
%{__install} -d -m 0755 %{buildroot}/var/lib/pear
# provide compat symlink
%{__mkdir_p} %{buildroot}/srv/www/cgi-bin
%{__ln_s} /usr/bin/php-cgi5 %{buildroot}/srv/www/cgi-bin/php5
#fix symlink
sed -i -e "s@$RPM_BUILD_DIR/php-%{version}/build-cli/sapi/cli/php@php@g" %{buildroot}%{_bindir}/phar.phar
rm %{buildroot}%{_bindir}/phar
%{__ln_s} -f %{_bindir}/phar.phar %{buildroot}%{_bindir}/phar
# Install the macros file:
install -d $RPM_BUILD_ROOT%{_sysconfdir}/rpm
sed -e "s/@PHP_APIVER@/%{apiver}/;s/@PHP_ZENDVER@/%{zendver}/" \
    < $RPM_SOURCE_DIR/macros.php > macros.php
install -m 644 -c macros.php \
           $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros.php

#install fpm init script.
install -d %{buildroot}%{_sysconfdir}/init.d
install -m 755 -c %{S:8} %{buildroot}%{_sysconfdir}/init.d/php-fpm

%post
update-alternatives --install  %{_bindir}/php php %{_bindir}/php5 5 \
  --slave %{_mandir}/man1/php.1.gz php.1 %{_mandir}/man1/php5.1.gz
update-alternatives --auto php

%preun
if [ $1 -eq 0 ]; then
  update-alternatives --remove php %{_bindir}/php5
fi

%post fastcgi
update-alternatives --install %{_bindir}/php-cgi php-cgi %{_bindir}/php-cgi5 5
update-alternatives --auto php-cgi

%preun fastcgi
if [ $1 -eq 0 ]; then
  update-alternatives --remove php-cgi %{_bindir}/php-cgi5
fi

%post pear
update-alternatives --install  %{_bindir}/pear pear %{_bindir}/pear5 5
update-alternatives --auto pear

%preun pear
if [ $1 -eq 0 ]; then
  update-alternatives --remove pear %{_bindir}/pear5
fi

%post devel
#phpize
update-alternatives --install  %{_bindir}/phpize phpize %{_bindir}/phpize5 5 \
  --slave %{_mandir}/man1/phpize.1.gz phpize.1 %{_mandir}/man1/phpize5.1.gz
update-alternatives --auto phpize
#php-config
%if 0%{?suse_version} != 1210 && 0%{?suse_version} != 1220
update-alternatives --install  %{_bindir}/php-config php-config %{_bindir}/php-config5 5 \
  --slave %{_mandir}/man1/phpize.1.gz php-config.1 %{_mandir}/man1/php-config5.1.gz
update-alternatives --auto php-config
%endif
#pecl
update-alternatives --install  %{_bindir}/pecl pecl %{_bindir}/pecl5 5
update-alternatives --auto pecl

%preun devel
if [ $1 -eq 0 ]; then
  update-alternatives --remove phpize %{_bindir}/phpize5
  update-alternatives --remove pecl   %{_bindir}/pecl5
  update-alternatives --remove php-config   %{_bindir}/php-config5
fi

%post -n apache2-mod_php5
#some distro versions does not have this tool.
if [ -x /usr/sbin/a2enmod ]
then
	if a2enmod -q php4 && ! a2enmod -q php5; then
  		a2dismod php4
  		a2enmod php5
	fi
fi

%preun -n apache2-mod_php5
if [ "$1" = "0" ]
then
	if [ -x /usr/sbin/a2enmod ]
	then
    	if a2enmod -q php5; then
        	a2dismod php5
    	fi
	fi
fi

%postun -n apache2-mod_php5
%restart_on_update apache2

%postun fpm
%restart_on_update php-fpm
%insserv_cleanup

%preun fpm
%stop_on_removal php-fpm

%post fpm
%{fillup_and_insserv -f php-fpm}

%clean
rm -rf %{buildroot}

%files
%defattr(-, root, root)
%doc README* CODING_STANDARDS CREDITS EXTENSIONS LICENSE NEWS php-suse-addons/test.php5
%doc %{_mandir}/man1/*
%dir %{php_sysconf}
%dir %{php_sysconf}/conf.d
%dir %{php_sysconf}/cli
%config(noreplace) %{php_sysconf}/cli/php.ini
%{_bindir}/%{pkg_name}
%dir %{_libdir}/%{pkg_name}
#%dir %{safemode_dir}
%dir %{extension_dir}
%dir %{_datadir}/%{pkg_name}
%attr(0755, wwwrun, root) %dir /var/lib/%{pkg_name}
%{_libdir}/php5/extensions/session.so
/etc/php5/conf.d/session.ini


%files devel
%defattr(-, root, root)
%doc README.macros
#%{_includedir}/%{pkg_name}
%{_bindir}/phpize5
%{_bindir}/php-config5
%{_bindir}/pecl5
#%{_datadir}/%{pkg_name}/build
%config %{_sysconfdir}/rpm/macros.php
/usr/include/php/TSRM/TSRM.h
/usr/include/php/TSRM/readdir.h
/usr/include/php/TSRM/tsrm_config.h
/usr/include/php/TSRM/tsrm_config.w32.h
/usr/include/php/TSRM/tsrm_config_common.h
/usr/include/php/TSRM/tsrm_nw.h
/usr/include/php/TSRM/tsrm_strtok_r.h
/usr/include/php/TSRM/tsrm_virtual_cwd.h
/usr/include/php/TSRM/tsrm_win32.h
/usr/include/php/Zend/zend.h
/usr/include/php/Zend/zend_API.h
/usr/include/php/Zend/zend_alloc.h
/usr/include/php/Zend/zend_build.h
/usr/include/php/Zend/zend_builtin_functions.h
/usr/include/php/Zend/zend_closures.h
/usr/include/php/Zend/zend_compile.h
/usr/include/php/Zend/zend_config.h
/usr/include/php/Zend/zend_config.nw.h
/usr/include/php/Zend/zend_config.w32.h
/usr/include/php/Zend/zend_constants.h
/usr/include/php/Zend/zend_dtrace.h
/usr/include/php/Zend/zend_dynamic_array.h
/usr/include/php/Zend/zend_errors.h
/usr/include/php/Zend/zend_exceptions.h
/usr/include/php/Zend/zend_execute.h
/usr/include/php/Zend/zend_extensions.h
/usr/include/php/Zend/zend_float.h
/usr/include/php/Zend/zend_gc.h
/usr/include/php/Zend/zend_globals.h
/usr/include/php/Zend/zend_globals_macros.h
/usr/include/php/Zend/zend_hash.h
/usr/include/php/Zend/zend_highlight.h
/usr/include/php/Zend/zend_indent.h
/usr/include/php/Zend/zend_ini.h
/usr/include/php/Zend/zend_ini_parser.h
/usr/include/php/Zend/zend_ini_scanner.h
/usr/include/php/Zend/zend_ini_scanner_defs.h
/usr/include/php/Zend/zend_interfaces.h
/usr/include/php/Zend/zend_istdiostream.h
/usr/include/php/Zend/zend_iterators.h
/usr/include/php/Zend/zend_language_parser.h
/usr/include/php/Zend/zend_language_scanner.h
/usr/include/php/Zend/zend_language_scanner_defs.h
/usr/include/php/Zend/zend_list.h
/usr/include/php/Zend/zend_llist.h
/usr/include/php/Zend/zend_modules.h
/usr/include/php/Zend/zend_multibyte.h
/usr/include/php/Zend/zend_multiply.h
/usr/include/php/Zend/zend_object_handlers.h
/usr/include/php/Zend/zend_objects.h
/usr/include/php/Zend/zend_objects_API.h
/usr/include/php/Zend/zend_operators.h
/usr/include/php/Zend/zend_ptr_stack.h
/usr/include/php/Zend/zend_qsort.h
/usr/include/php/Zend/zend_signal.h
/usr/include/php/Zend/zend_stack.h
/usr/include/php/Zend/zend_static_allocator.h
/usr/include/php/Zend/zend_stream.h
/usr/include/php/Zend/zend_string.h
/usr/include/php/Zend/zend_strtod.h
/usr/include/php/Zend/zend_ts_hash.h
/usr/include/php/Zend/zend_types.h
/usr/include/php/Zend/zend_variables.h
/usr/include/php/Zend/zend_vm.h
/usr/include/php/Zend/zend_vm_def.h
/usr/include/php/Zend/zend_vm_execute.h
/usr/include/php/Zend/zend_vm_opcodes.h
/usr/include/php/ext/date/lib/timelib.h
/usr/include/php/ext/date/lib/timelib_config.h
/usr/include/php/ext/date/lib/timelib_structs.h
/usr/include/php/ext/date/php_date.h
/usr/include/php/ext/dom/xml_common.h
/usr/include/php/ext/ereg/php_ereg.h
/usr/include/php/ext/ereg/php_regex.h
/usr/include/php/ext/ereg/regex/cclass.h
/usr/include/php/ext/ereg/regex/cname.h
/usr/include/php/ext/ereg/regex/regex.h
/usr/include/php/ext/ereg/regex/regex2.h
/usr/include/php/ext/ereg/regex/utils.h
/usr/include/php/ext/filter/php_filter.h
/usr/include/php/ext/gd/gdcache.h
/usr/include/php/ext/gd/libgd/gd.h
/usr/include/php/ext/gd/libgd/gd_compat.h
/usr/include/php/ext/gd/libgd/gd_intern.h
/usr/include/php/ext/gd/libgd/gd_io.h
/usr/include/php/ext/gd/libgd/gdcache.h
/usr/include/php/ext/gd/libgd/gdfontg.h
/usr/include/php/ext/gd/libgd/gdfontl.h
/usr/include/php/ext/gd/libgd/gdfontmb.h
/usr/include/php/ext/gd/libgd/gdfonts.h
/usr/include/php/ext/gd/libgd/gdfontt.h
/usr/include/php/ext/gd/libgd/gdhelpers.h
/usr/include/php/ext/gd/libgd/jisx0208.h
/usr/include/php/ext/gd/libgd/wbmp.h
/usr/include/php/ext/gd/libgd/webpimg.h
/usr/include/php/ext/gd/php_gd.h
/usr/include/php/ext/hash/php_hash.h
/usr/include/php/ext/hash/php_hash_adler32.h
/usr/include/php/ext/hash/php_hash_crc32.h
/usr/include/php/ext/hash/php_hash_fnv.h
/usr/include/php/ext/hash/php_hash_gost.h
/usr/include/php/ext/hash/php_hash_haval.h
/usr/include/php/ext/hash/php_hash_joaat.h
/usr/include/php/ext/hash/php_hash_md.h
/usr/include/php/ext/hash/php_hash_ripemd.h
/usr/include/php/ext/hash/php_hash_sha.h
/usr/include/php/ext/hash/php_hash_snefru.h
/usr/include/php/ext/hash/php_hash_tiger.h
/usr/include/php/ext/hash/php_hash_types.h
/usr/include/php/ext/hash/php_hash_whirlpool.h
/usr/include/php/ext/iconv/php_have_bsd_iconv.h
/usr/include/php/ext/iconv/php_have_glibc_iconv.h
/usr/include/php/ext/iconv/php_have_ibm_iconv.h
/usr/include/php/ext/iconv/php_have_iconv.h
/usr/include/php/ext/iconv/php_have_libiconv.h
/usr/include/php/ext/iconv/php_iconv.h
/usr/include/php/ext/iconv/php_iconv_aliased_libiconv.h
/usr/include/php/ext/iconv/php_iconv_supports_errno.h
/usr/include/php/ext/iconv/php_php_iconv_h_path.h
/usr/include/php/ext/iconv/php_php_iconv_impl.h
/usr/include/php/ext/json/php_json.h
/usr/include/php/ext/libxml/php_libxml.h
/usr/include/php/ext/mbstring/libmbfl/config.h
/usr/include/php/ext/mbstring/libmbfl/mbfl/eaw_table.h
/usr/include/php/ext/mbstring/libmbfl/mbfl/mbfilter.h
/usr/include/php/ext/mbstring/libmbfl/mbfl/mbfilter_8bit.h
/usr/include/php/ext/mbstring/libmbfl/mbfl/mbfilter_pass.h
/usr/include/php/ext/mbstring/libmbfl/mbfl/mbfilter_wchar.h
/usr/include/php/ext/mbstring/libmbfl/mbfl/mbfl_allocators.h
/usr/include/php/ext/mbstring/libmbfl/mbfl/mbfl_consts.h
/usr/include/php/ext/mbstring/libmbfl/mbfl/mbfl_convert.h
/usr/include/php/ext/mbstring/libmbfl/mbfl/mbfl_defs.h
/usr/include/php/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h
/usr/include/php/ext/mbstring/libmbfl/mbfl/mbfl_filter_output.h
/usr/include/php/ext/mbstring/libmbfl/mbfl/mbfl_ident.h
/usr/include/php/ext/mbstring/libmbfl/mbfl/mbfl_language.h
/usr/include/php/ext/mbstring/libmbfl/mbfl/mbfl_memory_device.h
/usr/include/php/ext/mbstring/libmbfl/mbfl/mbfl_string.h
/usr/include/php/ext/mbstring/mbstring.h
/usr/include/php/ext/mbstring/oniguruma/oniguruma.h
/usr/include/php/ext/mbstring/php_mbregex.h
/usr/include/php/ext/mbstring/php_onig_compat.h
/usr/include/php/ext/mysqli/mysqli_mysqlnd.h
/usr/include/php/ext/mysqli/php_mysqli_structs.h
/usr/include/php/ext/mysqlnd/config-win.h
/usr/include/php/ext/mysqlnd/mysqlnd.h
/usr/include/php/ext/mysqlnd/mysqlnd_alloc.h
/usr/include/php/ext/mysqlnd/mysqlnd_block_alloc.h
/usr/include/php/ext/mysqlnd/mysqlnd_charset.h
/usr/include/php/ext/mysqlnd/mysqlnd_debug.h
/usr/include/php/ext/mysqlnd/mysqlnd_enum_n_def.h
/usr/include/php/ext/mysqlnd/mysqlnd_ext_plugin.h
/usr/include/php/ext/mysqlnd/mysqlnd_libmysql_compat.h
/usr/include/php/ext/mysqlnd/mysqlnd_net.h
/usr/include/php/ext/mysqlnd/mysqlnd_portability.h
/usr/include/php/ext/mysqlnd/mysqlnd_priv.h
/usr/include/php/ext/mysqlnd/mysqlnd_result.h
/usr/include/php/ext/mysqlnd/mysqlnd_result_meta.h
/usr/include/php/ext/mysqlnd/mysqlnd_reverse_api.h
/usr/include/php/ext/mysqlnd/mysqlnd_statistics.h
/usr/include/php/ext/mysqlnd/mysqlnd_structs.h
/usr/include/php/ext/mysqlnd/mysqlnd_wireprotocol.h
/usr/include/php/ext/mysqlnd/php_mysqlnd.h
/usr/include/php/ext/mysqlnd/php_mysqlnd_config.h
/usr/include/php/ext/pcre/php_pcre.h
/usr/include/php/ext/pdo/php_pdo.h
/usr/include/php/ext/pdo/php_pdo_driver.h
/usr/include/php/ext/session/mod_files.h
/usr/include/php/ext/session/mod_mm.h
/usr/include/php/ext/session/mod_user.h
/usr/include/php/ext/session/php_session.h
/usr/include/php/ext/sockets/php_sockets.h
/usr/include/php/ext/spl/php_spl.h
/usr/include/php/ext/spl/spl_array.h
/usr/include/php/ext/spl/spl_directory.h
/usr/include/php/ext/spl/spl_dllist.h
/usr/include/php/ext/spl/spl_engine.h
/usr/include/php/ext/spl/spl_exceptions.h
/usr/include/php/ext/spl/spl_fixedarray.h
/usr/include/php/ext/spl/spl_functions.h
/usr/include/php/ext/spl/spl_heap.h
/usr/include/php/ext/spl/spl_iterators.h
/usr/include/php/ext/spl/spl_observer.h
/usr/include/php/ext/standard/base64.h
/usr/include/php/ext/standard/basic_functions.h
/usr/include/php/ext/standard/crc32.h
/usr/include/php/ext/standard/credits.h
/usr/include/php/ext/standard/credits_ext.h
/usr/include/php/ext/standard/credits_sapi.h
/usr/include/php/ext/standard/crypt_blowfish.h
/usr/include/php/ext/standard/crypt_freesec.h
/usr/include/php/ext/standard/css.h
/usr/include/php/ext/standard/cyr_convert.h
/usr/include/php/ext/standard/datetime.h
/usr/include/php/ext/standard/dl.h
/usr/include/php/ext/standard/exec.h
/usr/include/php/ext/standard/file.h
/usr/include/php/ext/standard/flock_compat.h
/usr/include/php/ext/standard/fsock.h
/usr/include/php/ext/standard/head.h
/usr/include/php/ext/standard/html.h
/usr/include/php/ext/standard/html_tables.h
/usr/include/php/ext/standard/info.h
/usr/include/php/ext/standard/md5.h
/usr/include/php/ext/standard/microtime.h
/usr/include/php/ext/standard/pack.h
/usr/include/php/ext/standard/pageinfo.h
/usr/include/php/ext/standard/php_array.h
/usr/include/php/ext/standard/php_assert.h
/usr/include/php/ext/standard/php_browscap.h
/usr/include/php/ext/standard/php_crypt.h
/usr/include/php/ext/standard/php_crypt_r.h
/usr/include/php/ext/standard/php_dir.h
/usr/include/php/ext/standard/php_dns.h
/usr/include/php/ext/standard/php_ext_syslog.h
/usr/include/php/ext/standard/php_filestat.h
/usr/include/php/ext/standard/php_fopen_wrappers.h
/usr/include/php/ext/standard/php_ftok.h
/usr/include/php/ext/standard/php_http.h
/usr/include/php/ext/standard/php_image.h
/usr/include/php/ext/standard/php_incomplete_class.h
/usr/include/php/ext/standard/php_iptc.h
/usr/include/php/ext/standard/php_lcg.h
/usr/include/php/ext/standard/php_link.h
/usr/include/php/ext/standard/php_mail.h
/usr/include/php/ext/standard/php_math.h
/usr/include/php/ext/standard/php_metaphone.h
/usr/include/php/ext/standard/php_rand.h
/usr/include/php/ext/standard/php_smart_str.h
/usr/include/php/ext/standard/php_smart_str_public.h
/usr/include/php/ext/standard/php_standard.h
/usr/include/php/ext/standard/php_string.h
/usr/include/php/ext/standard/php_type.h
/usr/include/php/ext/standard/php_uuencode.h
/usr/include/php/ext/standard/php_var.h
/usr/include/php/ext/standard/php_versioning.h
/usr/include/php/ext/standard/proc_open.h
/usr/include/php/ext/standard/quot_print.h
/usr/include/php/ext/standard/scanf.h
/usr/include/php/ext/standard/sha1.h
/usr/include/php/ext/standard/streamsfuncs.h
/usr/include/php/ext/standard/uniqid.h
/usr/include/php/ext/standard/url.h
/usr/include/php/ext/standard/url_scanner_ex.h
/usr/include/php/ext/standard/winver.h
/usr/include/php/ext/xml/expat_compat.h
/usr/include/php/ext/xml/php_xml.h
/usr/include/php/main/SAPI.h
/usr/include/php/main/build-defs.h
/usr/include/php/main/fopen_wrappers.h
/usr/include/php/main/logos.h
/usr/include/php/main/php.h
/usr/include/php/main/php_compat.h
/usr/include/php/main/php_config.h
/usr/include/php/main/php_content_types.h
/usr/include/php/main/php_getopt.h
/usr/include/php/main/php_globals.h
/usr/include/php/main/php_ini.h
/usr/include/php/main/php_logos.h
/usr/include/php/main/php_main.h
/usr/include/php/main/php_memory_streams.h
/usr/include/php/main/php_network.h
/usr/include/php/main/php_open_temporary_file.h
/usr/include/php/main/php_output.h
/usr/include/php/main/php_reentrancy.h
/usr/include/php/main/php_scandir.h
/usr/include/php/main/php_streams.h
/usr/include/php/main/php_syslog.h
/usr/include/php/main/php_ticks.h
/usr/include/php/main/php_variables.h
/usr/include/php/main/php_version.h
/usr/include/php/main/rfc1867.h
/usr/include/php/main/snprintf.h
/usr/include/php/main/spprintf.h
/usr/include/php/main/streams/php_stream_context.h
/usr/include/php/main/streams/php_stream_filter_api.h
/usr/include/php/main/streams/php_stream_glob_wrapper.h
/usr/include/php/main/streams/php_stream_mmap.h
/usr/include/php/main/streams/php_stream_plain_wrapper.h
/usr/include/php/main/streams/php_stream_transport.h
/usr/include/php/main/streams/php_stream_userspace.h
/usr/include/php/main/streams/php_streams_int.h
/usr/include/php/main/win32_internal_function_disabled.h
/usr/include/php/main/win95nt.h
/usr/include/php/sapi/cli/cli.h
/usr/lib/php/build/Makefile.global
/usr/lib/php/build/acinclude.m4
/usr/lib/php/build/config.guess
/usr/lib/php/build/config.sub
/usr/lib/php/build/libtool.m4
/usr/lib/php/build/ltmain.sh
/usr/lib/php/build/mkdep.awk
/usr/lib/php/build/phpize.m4
/usr/lib/php/build/run-tests.php
/usr/lib/php/build/scan_makefile_in.awk
/usr/lib/php/build/shtool
/usr/share/php5/fpm/status.html
%dir /usr/include/php
%dir /usr/include/php/TSRM
%dir /usr/include/php/Zend
%dir /usr/include/php/ext
%dir /usr/include/php/ext/date
%dir /usr/include/php/ext/date/lib
%dir /usr/include/php/ext/dom
%dir /usr/include/php/ext/ereg
%dir /usr/include/php/ext/ereg/regex
%dir /usr/include/php/ext/filter
%dir /usr/include/php/ext/gd
%dir /usr/include/php/ext/gd/libgd
%dir /usr/include/php/ext/hash
%dir /usr/include/php/ext/iconv
%dir /usr/include/php/ext/json
%dir /usr/include/php/ext/libxml
%dir /usr/include/php/ext/mbstring
%dir /usr/include/php/ext/mbstring/libmbfl
%dir /usr/include/php/ext/mbstring/libmbfl/mbfl
%dir /usr/include/php/ext/mbstring/oniguruma
%dir /usr/include/php/ext/mysqli
%dir /usr/include/php/ext/mysqlnd
%dir /usr/include/php/ext/pcre
%dir /usr/include/php/ext/pdo
%dir /usr/include/php/ext/session
%dir /usr/include/php/ext/sockets
%dir /usr/include/php/ext/spl
%dir /usr/include/php/ext/standard
%dir /usr/include/php/ext/xml
%dir /usr/include/php/main
%dir /usr/include/php/main/streams
%dir /usr/include/php/sapi
%dir /usr/include/php/sapi/cli
%dir /usr/lib/php
%dir /usr/lib/php/build
%dir /usr/share/php5/fpm

%files pear
%defattr(-, root, root)
%doc pear/README.SUSE
%{_bindir}/pear5
%config(noreplace) %{php_sysconf}/cli/pear.conf
%{peardir}
%dir /var/lib/pear

%files fastcgi
%defattr(-, root, root)
%{_bindir}/php-cgi5
/srv/www/cgi-bin/php5
%dir %{php_sysconf}/fastcgi
%config(noreplace) %{php_sysconf}/fastcgi/php.ini

%files fpm
%defattr(-, root, root)
%{_sbindir}/php-fpm5
%dir %{php_sysconf}/fpm
%config %{php_sysconf}/fpm/php-fpm.conf.default
%{_mandir}/man8/php-fpm5.8.gz
%config /etc/init.d/php-fpm

%files -n apache2-mod_php5
%defattr(644,root,root,755)
%{apache2_libexecdir}/mod_php5.so
%dir %{php_sysconf}/apache2
%config(noreplace) %{php_sysconf}/apache2/php.ini
%config(noreplace) %{apache2_sysconfdir}/conf.d/%{pkg_name}.conf

%files bcmath
%defattr(644,root,root,755)
%{extension_dir}/bcmath.so
%config(noreplace) %{php_sysconf}/conf.d/bcmath.ini

%files bz2
%defattr(644,root,root,755)
%{extension_dir}/bz2.so
%config(noreplace) %{php_sysconf}/conf.d/bz2.ini

%files calendar
%defattr(644,root,root,755)
%{extension_dir}/calendar.so
%config(noreplace) %{php_sysconf}/conf.d/calendar.ini

%files ctype
%defattr(644,root,root,755)
%{extension_dir}/ctype.so
%config(noreplace) %{php_sysconf}/conf.d/ctype.ini

%files curl
%defattr(644,root,root,755)
%{extension_dir}/curl.so
%config(noreplace) %{php_sysconf}/conf.d/curl.ini

%files dba
%defattr(644,root,root,755)
%{extension_dir}/dba.so
%config(noreplace) %{php_sysconf}/conf.d/dba.ini

%files dom
%defattr(644,root,root,755)
%{extension_dir}/dom.so
%config(noreplace) %{php_sysconf}/conf.d/dom.ini

%files enchant
%defattr(644,root,root,755)
%{extension_dir}/enchant.so
%config(noreplace) %{php_sysconf}/conf.d/enchant.ini

%files exif
%defattr(644,root,root,755)
%{extension_dir}/exif.so
%config(noreplace) %{php_sysconf}/conf.d/exif.ini

%files fileinfo
%defattr(644,root,root,755)
%{extension_dir}/fileinfo.so
%config(noreplace) %{php_sysconf}/conf.d/fileinfo.ini

%files ftp
%defattr(644,root,root,755)
%{extension_dir}/ftp.so
%config(noreplace) %{php_sysconf}/conf.d/ftp.ini

%files gd
%defattr(644,root,root,755)
%{extension_dir}/gd.so
%config(noreplace) %{php_sysconf}/conf.d/gd.ini

%files gettext
%defattr(644,root,root,755)
%{extension_dir}/gettext.so
%config(noreplace) %{php_sysconf}/conf.d/gettext.ini

%files gmp
%defattr(644,root,root,755)
%{extension_dir}/gmp.so
%config(noreplace) %{php_sysconf}/conf.d/gmp.ini

%files hash
%defattr(644,root,root,755)
%{extension_dir}/hash.so
%config(noreplace) %{php_sysconf}/conf.d/hash.ini

%files iconv
%defattr(644,root,root,755)
%{extension_dir}/iconv.so
%config(noreplace) %{php_sysconf}/conf.d/iconv.ini

%files imap
%defattr(644,root,root,755)
%{extension_dir}/imap.so
%config(noreplace) %{php_sysconf}/conf.d/imap.ini

%files intl
%defattr(644,root,root,755)
%{extension_dir}/intl.so
%config(noreplace) %{php_sysconf}/conf.d/intl.ini

%files json
%defattr(644,root,root,755)
%{extension_dir}/json.so
%config(noreplace) %{php_sysconf}/conf.d/json.ini

%files ldap
%defattr(644,root,root,755)
%{extension_dir}/ldap.so
%config(noreplace) %{php_sysconf}/conf.d/ldap.ini

%files mbstring
%defattr(644,root,root,755)
%{extension_dir}/mbstring.so
%config(noreplace) %{php_sysconf}/conf.d/mbstring.ini

%files mcrypt
%defattr(644,root,root,755)
%{extension_dir}/mcrypt.so
%config(noreplace) %{php_sysconf}/conf.d/mcrypt.ini

%files mysql
%defattr(644,root,root,755)
%{extension_dir}/mysql.so
%config(noreplace) %{php_sysconf}/conf.d/mysql.ini
%{extension_dir}/mysqli.so
%config(noreplace) %{php_sysconf}/conf.d/mysqli.ini
%{extension_dir}/pdo_mysql.so
%config(noreplace) %{php_sysconf}/conf.d/pdo_mysql.ini

%files odbc
%defattr(644,root,root,755)
%{extension_dir}/odbc.so
%config(noreplace) %{php_sysconf}/conf.d/odbc.ini
%{extension_dir}/pdo_odbc.so
%config(noreplace) %{php_sysconf}/conf.d/pdo_odbc.ini

%files openssl
%defattr(644,root,root,755)
%{extension_dir}/openssl.so
%config(noreplace) %{php_sysconf}/conf.d/openssl.ini

%files phar
%defattr(644,root,root,755)
%{extension_dir}/phar.so
%config(noreplace) %{php_sysconf}/conf.d/phar.ini
%{_bindir}/phar
%{_bindir}/phar.phar

%files pcntl
%defattr(644,root,root,755)
%{extension_dir}/pcntl.so
%config(noreplace) %{php_sysconf}/conf.d/pcntl.ini

%files pdo
%defattr(644,root,root,755)
%{extension_dir}/pdo.so
%config(noreplace) %{php_sysconf}/conf.d/pdo.ini

%files pgsql
%defattr(644,root,root,755)
%{extension_dir}/pgsql.so
%config(noreplace) %{php_sysconf}/conf.d/pgsql.ini
%{extension_dir}/pdo_pgsql.so
%config(noreplace) %{php_sysconf}/conf.d/pdo_pgsql.ini

%files posix
%defattr(644,root,root,755)
%{extension_dir}/posix.so
%config(noreplace) %{php_sysconf}/conf.d/posix.ini
%if %{with_spell}

%files pspell
%defattr(644,root,root,755)
%{extension_dir}/pspell.so
%config(noreplace) %{php_sysconf}/conf.d/pspell.ini
%endif

%files readline
%defattr(644,root,root,755)
%{extension_dir}/readline.so
%config(noreplace) %{php_sysconf}/conf.d/readline.ini

%files shmop
%defattr(644,root,root,755)
%{extension_dir}/shmop.so
%config(noreplace) %{php_sysconf}/conf.d/shmop.ini

%files snmp
%defattr(644,root,root,755)
%{extension_dir}/snmp.so
%config(noreplace) %{php_sysconf}/conf.d/snmp.ini

%files soap
%defattr(644,root,root,755)
%{extension_dir}/soap.so
%config(noreplace) %{php_sysconf}/conf.d/soap.ini

%files sockets
%defattr(644,root,root,755)
%{extension_dir}/sockets.so
%config(noreplace) %{php_sysconf}/conf.d/sockets.ini

%files sqlite
%defattr(644,root,root,755)
#%{extension_dir}/sqlite.so
#%config(noreplace) %{php_sysconf}/conf.d/sqlite.ini
%{extension_dir}/pdo_sqlite.so
%config(noreplace) %{php_sysconf}/conf.d/pdo_sqlite.ini
%{extension_dir}/sqlite3.so
%config(noreplace) %{php_sysconf}/conf.d/sqlite3.ini

%files suhosin
%defattr(644,root,root,755)
%{extension_dir}/suhosin.so
%config(noreplace) %{php_sysconf}/conf.d/suhosin.ini

%files sysvmsg
%defattr(644,root,root,755)
%{extension_dir}/sysvmsg.so
%config(noreplace) %{php_sysconf}/conf.d/sysvmsg.ini

%files sysvsem
%defattr(644,root,root,755)
%{extension_dir}/sysvsem.so
%config(noreplace) %{php_sysconf}/conf.d/sysvsem.ini

%files sysvshm
%defattr(644,root,root,755)
%{extension_dir}/sysvshm.so
%config(noreplace) %{php_sysconf}/conf.d/sysvshm.ini

%files tidy
%defattr(644,root,root,755)
%{extension_dir}/tidy.so
%config(noreplace) %{php_sysconf}/conf.d/tidy.ini

%files tokenizer
%defattr(644,root,root,755)
%{extension_dir}/tokenizer.so
%config(noreplace) %{php_sysconf}/conf.d/tokenizer.ini

%files wddx
%defattr(644,root,root,755)
%{extension_dir}/wddx.so
%config(noreplace) %{php_sysconf}/conf.d/wddx.ini

%files xmlrpc
%defattr(644,root,root,755)
%{extension_dir}/xmlrpc.so
%config(noreplace) %{php_sysconf}/conf.d/xmlrpc.ini

%files xmlreader
%defattr(644,root,root,755)
%{extension_dir}/xmlreader.so
%config(noreplace) %{php_sysconf}/conf.d/xmlreader.ini

%files xmlwriter
%defattr(644,root,root,755)
%{extension_dir}/xmlwriter.so
%config(noreplace) %{php_sysconf}/conf.d/xmlwriter.ini

%files xsl
%defattr(644,root,root,755)
%{extension_dir}/xsl.so
%config(noreplace) %{php_sysconf}/conf.d/xsl.ini

%files zip
%defattr(644,root,root,755)
%{extension_dir}/zip.so
%config(noreplace) %{php_sysconf}/conf.d/zip.ini

%files zlib
%defattr(644,root,root,755)
%{extension_dir}/zlib.so
%config(noreplace) %{php_sysconf}/conf.d/zlib.ini

%changelog