new package: add package 'php'

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2011-04-12 21:36:22 +02:00
parent c5f1db43f1
commit f493283b60
3 changed files with 149 additions and 0 deletions

76
packages/web/php/build Executable file
View File

@ -0,0 +1,76 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. config/options $1
strip_lto
cd $PKG_BUILD
./configure --host=$TARGET_NAME \
--build=$HOST_NAME \
--prefix=/usr \
--disable-static \
--enable-shared \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--disable-all \
--without-pear \
--with-config-file-path=/etc \
--localstatedir=/var \
--disable-cli \
--enable-cgi \
--enable-fastcgi \
--disable-sockets \
--disable-posix \
--disable-spl \
--disable-session \
--without-openssl \
--disable-libxml \
--disable-xml \
--disable-xmlreader \
--disable-xmlwriter \
--disable-simplexml \
--with-zlib=$SYSROOT_PREFIX/usr \
--disable-exif \
--disable-ftp \
--without-gettext \
--without-gmp \
--disable-json \
--without-readline \
--without-ncurses \
--disable-pcntl \
--disable-sysvmsg \
--disable-sysvsem \
--disable-sysvshm \
--disable-zip \
--disable-filter \
--disable-calendar \
--with-curl=$SYSROOT_PREFIX/usr \
--with-pcre-regex \
--without-sqlite \
--with-sqlite3=$SYSROOT_PREFIX/usr \
--enable-sqlite-utf8 \
--disable-pdo \
--without-pdo-sqlite \
--without-pdo-mysql \
make

37
packages/web/php/install Executable file
View File

@ -0,0 +1,37 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. config/options $1
mkdir -p $INSTALL/usr/bin
cp $PKG_BUILD/sapi/cgi/php-cgi $INSTALL/usr/bin
mkdir -p $INSTALL/etc
cp $PKG_BUILD/php.ini-production $INSTALL/etc/php.ini
sed -e "s|^doc_root[[:space:]]*=.*$|doc_root = /usr/www|" \
-e "s|^.cgi.force_redirect[[:space:]]*=.*$|cgi.force_redirect = 0|" \
-i $INSTALL/etc/php.ini
mkdir -p $INSTALL/usr/www
echo "<?php" > $INSTALL/usr/www/test.php
echo "phpinfo();" >> $INSTALL/usr/www/test.php
echo "?>" >> $INSTALL/usr/www/test.php

36
packages/web/php/meta Normal file
View File

@ -0,0 +1,36 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
PKG_NAME="php"
PKG_VERSION="5.3.6"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="OpenSource"
PKG_SITE="http://www.php.net"
PKG_URL="http://www.php.net/distributions/$PKG_NAME-$PKG_VERSION.tar.bz2"
PKG_DEPENDS="zlib pcre sqlite curl"
PKG_BUILD_DEPENDS="toolchain zlib pcre sqlite curl"
PKG_PRIORITY="optional"
PKG_SECTION="web"
PKG_SHORTDESC="php: Scripting language especially suited for Web development"
PKG_LONGDESC="PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML."
PKG_IS_ADDON="no"
PKG_AUTORECONF="no"