summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlookshe <github@lookshe.org>2020-11-22 15:26:19 +0100
committerlookshe <github@lookshe.org>2020-11-22 15:26:19 +0100
commitbbad38e1aee13b314c112ba00fd2fb1739be8020 (patch)
tree9d50044d835bb5aa4a0d310082c332b847501d22
initial commit
-rw-r--r--php-7.4-opt/README.md18
-rw-r--r--php-7.4-opt/TODO.md14
-rw-r--r--php-7.4-opt/build.Dockerfile134
-rw-r--r--php-7.4-opt/copy.Dockerfile11
-rw-r--r--php-7.4-opt/out/.gitignore2
5 files changed, 179 insertions, 0 deletions
diff --git a/php-7.4-opt/README.md b/php-7.4-opt/README.md
new file mode 100644
index 0000000..4b08d41
--- /dev/null
+++ b/php-7.4-opt/README.md
@@ -0,0 +1,18 @@
+## PHP 7.4 for Debian Wheezy
+
+PHP 7.4 as .deb file for installation in /opt and all dependencies as .deb files.
+
+### Build
+
+Build is done inside Debian Wheezy docker with
+```
+DOCKER_BUILDKIT=1 docker build --file build.Dockerfile --tag lookshe/php-7.4-opt-build .
+```
+
+### Get installation files
+
+To copy the .deb files out of build container run
+```
+DOCKER_BUILDKIT=1 docker build --file copy.Dockerfile --output out .
+```
+
diff --git a/php-7.4-opt/TODO.md b/php-7.4-opt/TODO.md
new file mode 100644
index 0000000..e5069cd
--- /dev/null
+++ b/php-7.4-opt/TODO.md
@@ -0,0 +1,14 @@
+## ToDo
+
+- add imap to configure flags
+- add modules
+ - imagick
+ - apcu
+- add config files
+ - php.ini
+ - modules
+ - checkinstall --include ?
+- correct depencies in .deb files
+ - checkinstall --provides
+ - checkinstall --requires
+
diff --git a/php-7.4-opt/build.Dockerfile b/php-7.4-opt/build.Dockerfile
new file mode 100644
index 0000000..c5af73b
--- /dev/null
+++ b/php-7.4-opt/build.Dockerfile
@@ -0,0 +1,134 @@
+FROM debian/eol:wheezy
+
+ENV MAIN_PREFIX /opt/php-7.4
+ENV DEP_PREFIX $MAIN_PREFIX/dependencies
+ENV PACKAGE_NAME php-7.4.12-opt
+
+RUN apt-get update \
+ && apt-get install -y \
+ curl \
+ build-essential \
+ net-tools \
+ autoconf \
+ pkg-config \
+ wget \
+ libxml2-dev \
+ libkrb5-dev \
+ libssl-dev \
+ libsqlite3-dev \
+ libbz2-dev \
+ libcurl4-openssl-dev \
+ libpng12-dev libjpeg8-dev \
+ libfreetype6-dev \
+ libc-client-dev \
+ libpq-dev \
+ libxslt1-dev \
+ checkinstall \
+ zlib1g-dev \
+ libtool \
+ bison \
+ libgmp-dev \
+ libtidy-dev \
+ libgd2-xpm-dev
+RUN wget https://cmake.org/files/v2.8/cmake-2.8.12.1.tar.gz
+RUN tar xzf cmake-2.8.12.1.tar.gz
+RUN cd cmake-2.8.12.1 \
+ && ./bootstrap \
+ && make \
+ && make install
+RUN wget https://github.com/libjpeg-turbo/libjpeg-turbo/archive/2.0.6.tar.gz -O libjpeg-turbo-2.0.6.tar.gz
+RUN tar xzf libjpeg-turbo-2.0.6.tar.gz
+RUN cd libjpeg-turbo-2.0.6 \
+ && mkdir build \
+ && cd build \
+ && cmake -DCMAKE_INSTALL_PREFIX=$DEP_PREFIX -DCMAKE_BUILD_TYPE=RELEASE -DENABLE_STATIC=FALSE -DCMAKE_INSTALL_DEFAULT_LIBDIR=lib .. \
+ && make \
+ && checkinstall -y --pkgname $PACKAGE_NAME-libjpeg-turbo --pkgversion 1
+RUN ln -s /usr/lib/libc-client.a /usr/lib/x86_64-linux-gnu/libc-client.a
+RUN wget https://web.mit.edu/kerberos/dist/krb5/1.17/krb5-1.17.2.tar.gz
+RUN tar xzf krb5-1.17.2.tar.gz
+RUN cd krb5-1.17.2/src \
+ && ./configure --prefix=$DEP_PREFIX \
+ && make \
+ && checkinstall -y --pkgname $PACKAGE_NAME-krb5 --pkgversion 1
+RUN wget https://github.com/unicode-org/icu/releases/download/release-50-2/icu4c-50_2-src.tgz
+RUN tar xzf icu4c-50_2-src.tgz
+RUN cd icu/source/ \
+ && ./configure --prefix=$DEP_PREFIX \
+ && make \
+ && checkinstall -y --pkgname $PACKAGE_NAME-icu --pkgversion 1
+RUN wget https://github.com/kkos/oniguruma/archive/v6.9.6.tar.gz
+RUN tar xzf v6.9.6.tar.gz
+RUN cd oniguruma-6.9.6 \
+ && autoreconf -vfi \
+ && ./configure --prefix=$DEP_PREFIX \
+ && make \
+ && checkinstall -y --pkgname $PACKAGE_NAME-oniguruma
+RUN wget https://libzip.org/download/libzip-0.11.2.tar.gz
+RUN tar xzf libzip-0.11.2.tar.gz
+# in this case checkinstall only works after "make install"
+RUN cd libzip-0.11.2 \
+ && ./configure --prefix=$DEP_PREFIX \
+ && make \
+ && make install \
+ && checkinstall -y --pkgname $PACKAGE_NAME-libzip
+RUN wget https://github.com/libgd/libgd/releases/download/gd-2.1.1/libgd-2.1.1.tar.gz
+RUN tar xzf libgd-2.1.1.tar.gz
+RUN cd libgd-2.1.1 \
+ && ./configure --prefix=$DEP_PREFIX \
+ && make \
+ && checkinstall -y --pkgname $PACKAGE_NAME-libgd
+RUN wget https://www.php.net/distributions/php-7.4.12.tar.gz
+RUN tar xzf php-7.4.12.tar.gz
+RUN cd php-7.4.12 \
+ && PKG_CONFIG_PATH=$DEP_PREFIX/lib/pkgconfig ./configure \
+ --prefix=$MAIN_PREFIX \
+ #--with-libdir=/lib/x86_64-linux-gnu \
+ #--disable-rpath \
+ --enable-static \
+ --enable-bcmath \
+ --enable-calendar \
+ --enable-exif \
+ --enable-fpm \
+ --enable-ftp \
+ --enable-gd \
+ --enable-intl \
+ --enable-mbstring \
+ --enable-pcntl \
+ --enable-pdo \
+ --enable-shmop \
+ --enable-soap \
+ --enable-sockets \
+ --enable-sysvsem \
+ --enable-sysvshm \
+ --enable-zip \
+ --with-bz2 \
+ --with-config-file-path=$MAIN_PREFIX/etc \
+ --with-config-file-scan-dir=$MAIN_PREFIX/etc/conf.d \
+ --with-curl \
+ --with-external-gd \
+ --with-freetype \
+ --with-gettext \
+ --with-gmp \
+ #--with-imap=shared \
+ #--with-imap-ssl \
+ --with-jpeg \
+ --with-kerberos \
+ --with-ldap=shared \
+ --with-mhash \
+ --with-mysql-sock=/var/run/mysqld/mysqld.sock \
+ --with-mysqli \
+ --with-openssl \
+ --with-pdo-mysql \
+ --with-pdo-sqlite \
+ --with-pear \
+ --with-sqlite3 \
+ --with-tidy \
+ --with-xmlrpc \
+ --with-xpm \
+ --with-xsl \
+ --with-zip \
+ --with-zlib \
+ && make \
+ && checkinstall -y --pkgname $PACKAGE_NAME
+
diff --git a/php-7.4-opt/copy.Dockerfile b/php-7.4-opt/copy.Dockerfile
new file mode 100644
index 0000000..1931ce5
--- /dev/null
+++ b/php-7.4-opt/copy.Dockerfile
@@ -0,0 +1,11 @@
+FROM lookshe/php-7.4-opt-build AS build-stage
+
+FROM scratch AS export-stage
+COPY --from=build-stage /php-7.4.12/php-7.4.12-opt_7.4.12-1_amd64.deb .
+COPY --from=build-stage /libzip-0.11.2/php-7.4.12-opt-libzip_0.11.2-1_amd64.deb .
+COPY --from=build-stage /icu/source/php-7.4.12-opt-icu_1-1_amd64.deb .
+COPY --from=build-stage /oniguruma-6.9.6/php-7.4.12-opt-oniguruma_6.9.6-1_amd64.deb .
+COPY --from=build-stage /libgd-2.1.1/php-7.4.12-opt-libgd_2.1.1-1_amd64.deb .
+COPY --from=build-stage /libjpeg-turbo-2.0.6/build/php-7.4.12-opt-libjpeg-turbo_1-1_amd64.deb .
+COPY --from=build-stage /krb5-1.17.2/src/php-7.4.12-opt-krb5_1-1_amd64.deb .
+
diff --git a/php-7.4-opt/out/.gitignore b/php-7.4-opt/out/.gitignore
new file mode 100644
index 0000000..d6b7ef3
--- /dev/null
+++ b/php-7.4-opt/out/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore