summaryrefslogtreecommitdiffstats
path: root/main/php/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'main/php/APKBUILD')
-rw-r--r--main/php/APKBUILD105
1 files changed, 104 insertions, 1 deletions
diff --git a/main/php/APKBUILD b/main/php/APKBUILD
index 3765b4335..bb65a40fb 100644
--- a/main/php/APKBUILD
+++ b/main/php/APKBUILD
@@ -14,8 +14,9 @@ makedepends="pcre-dev libxml2-dev libiconv-dev openssl-dev zlib-dev bzip2-dev
sqlite-dev libtool libltdl postgresql-dev db-dev unixodbc-dev icu-dev
gd-dev gmp-dev gettext-dev imap-dev aspell-dev
net-snmp-dev libxslt-dev cyrus-sasl-dev openldap-dev pkgconfig
- libgcrypt-dev"
+ libgcrypt-dev apache2-dev apr-dev apr-util-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-cli $pkgname-pear
+ $pkgname-apache2
$pkgname-bcmath
$pkgname-bz2
$pkgname-calendar
@@ -147,6 +148,71 @@ build() {
"
# --with-enchant=shared,/usr \
# --with-tidy=shared \
+
+
+ phpextensionsapache2="--enable-bcmath=shared \
+ --enable-calendar=shared \
+ --enable-dba=shared \
+ --enable-exif=shared \
+ --enable-ftp=shared \
+ --enable-gd-native-ttf \
+ --enable-intl=shared \
+ --enable-json=shared \
+ --enable-mbregex \
+ --enable-mbstring \
+ --enable-pdo=shared \
+ --enable-phar=shared \
+ --enable-posix=shared \
+ --enable-session \
+ --enable-shmop=shared \
+ --enable-soap=shared \
+ --enable-sockets=shared \
+ --disable-sqlite \
+ --enable-sysvmsg=shared \
+ --enable-sysvsem=shared \
+ --enable-sysvshm=shared \
+ --enable-xml=shared \
+ --enable-zip=shared \
+ --with-bz2=shared \
+ --with-curl=shared \
+ --with-db4=shared \
+ --with-freetype-dir=shared,/usr \
+ --with-gd=shared,/usr \
+ --with-gettext=shared \
+ --with-gmp=shared \
+ --with-iconv=shared \
+ --with-icu-dir=/usr \
+ --with-imap-ssl=shared \
+ --with-imap=shared \
+ --with-jpeg-dir=shared,/usr \
+ --with-ldap=shared \
+ --with-mcrypt=shared \
+ --with-mysql-sock=/var/run/mysqld/mysqld.sock \
+ --with-mysql=shared,mysqlnd \
+ --with-mysqli=shared,mysqlnd \
+ --with-openssl=shared \
+ --with-pcre-regex=/usr \
+ --with-pdo-mysql=shared,mysqlnd \
+ --with-pdo-odbc=shared,unixODBC,/usr \
+ --with-pdo-pgsql=shared \
+ --without-pdo-sqlite \
+ --with-pgsql=shared \
+ --with-png-dir=shared,/usr \
+ --with-pspell=shared \
+ --with-regex=php \
+ --with-snmp=shared \
+ --without-sqlite3 \
+ --without-sqlite \
+ --with-unixODBC=shared,/usr \
+ --with-xmlrpc=shared \
+ --with-xsl=shared \
+ --with-zlib=shared \
+ --without-db1 \
+ --without-db2 \
+ --without-db3 \
+ --without-qdbm \
+ "
+
./configure --build=${CHOST:-i486-alpine-linux-uclibc} \
--prefix=/usr \
--sysconfdir=/etc/php \
@@ -171,6 +237,35 @@ build() {
sed -i -e '/^BUILD_CGI/s/$(LDFLAGS)/-lpthread $(LDFLAGS)/' Makefile
make || return 1
+
+ # Need seperate configure string for apache subpkg
+ mkdir -p "$srcdir"/php-apache2
+ cp -R "$srcdir"/$pkgname-$pkgver/* "$srcdir"/php-apache2
+ cd "$srcdir"/php-apache2
+ make clean
+ ./configure --build=${CHOST:-i486-alpine-linux-uclibc} \
+ --prefix=/usr \
+ --sysconfdir=/etc/php \
+ --with-layout=GNU \
+ --with-config-file-path=/etc/php \
+ --with-config-file-scan-dir=/etc/php/conf.d \
+ --enable-inline-optimization \
+ --disable-debug \
+ --disable-rpath \
+ --disable-static \
+ --enable-shared \
+ --mandir=/usr/share/man \
+ --enable-fastcgi \
+ --enable-cgi \
+ --disable-cli \
+ --enable-discard-path \
+ --enable-force-cgi-redirect \
+ --with-pic \
+ --with-apxs2 \
+ ${phpextensionsapache2}
+
+
+ make || return 1
}
package() {
@@ -180,6 +275,14 @@ package() {
sed -i -e "s:^; extension_dir = \"./\":extension_dir = \"$_extdir\":" "$pkgdir"/etc/php/php.ini
}
+apache2() {
+ cd "$srcdir"/php-apache2
+ mkdir -p "$subpkgdir"/usr/lib/apache2/
+ mkdir -p "$subpkgdir"/etc/apache2/conf.d/
+ install -D -m755 libs/libphp5.so "$subpkgdir"/usr/lib/apache2/libphp5.so
+ install -D -m644 ../../php5-module.conf "$subpkgdir"/etc/apache2/conf.d/php5-module.conf
+}
+
cli() {
pkgdesc="PHP command line interface"
mkdir -p "$subpkgdir"/usr/bin