$ su
$ cd ~/wdmc-build/64k-jessie
$ chroot build
$ mount -t proc none /proc
$ mount -t devtmpfs none /dev
$ mount -t devpts none /dev/pts
$ export DEBIAN_FRONTEND=noninteractive
$ export DEBCONF_NONINTERACTIVE_SEEN=true
$ export LC_ALL=C
$ export LANGUAGE=C
$ export LANG=C
$ export DEB_CFLAGS_APPEND='-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE'
$ export DEB_BUILD_OPTIONS=nocheck
$ cd root
$ apt-get update
$ apt-get upgrade
$ apt-get install ca-certificates
$ apt-get install dh-autoreconf
$ apt-get install git
$ apt-get install apache2-dev
$ apt-get install apache2
$ apt-get install systemtap-sdt-dev
$ apt-get install libxml2
$ apt-get install libxml2-dev
$ apt-get install libssl-dev
$ apt-get install libpcre3 libpcre3-dev
$ apt-get install libsqlite3-dev
$ apt-get install libbz2-dev
$ apt-get install libcurl4-openssl-dev
$ apt-get install libqdbm-dev
$ apt-get install libdb-dev
#configure: error: Cannot find enchant
$ apt-get install enchant libenchant-dev
#configure: error: webp/decode.h not found
$ apt-get install libwebp-dev
#configure: error: png.h not found.
$ apt-get install libpng-dev
#configure: error: xpm.h not found.
$ apt-get install libxpm-dev
#configure: error: freetype-config not found.
$ apt-get install libfreetype6-dev
#configure: error: Unable to find gd.h anywhere under /usr
$ apt-get install libgd-dev
#configure: error: Unable to locate gmp.h
$ apt-get install libgmp-dev
#configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.
$ apt-get install libc-client-dev
#configure: error: Kerberos libraries not found.
$ apt-get install libkrb5-dev
#configure: error: libfbclient, libgds or libib_util not found! Check config.log for more information.
$ apt-get install firebird-dev
#configure: error: Unable to detect ICU prefix or no failed. Please verify ICU install prefix and make sure icu-config works.
$ apt-get install libicu-dev
#configure: error: sasl.h not found!
$ apt-get install libsasl2-dev
#configure: error: mcrypt.h not found. Please reinstall libmcrypt.
$ apt-get install libmcrypt-dev
#checking for unixODBC support... configure: error: ODBC header file '/usr/include/sqlext.h' not found!
$ apt-get install unixODBC-dev
#configure: error: Directory /usr is not a FreeTDS installation directory
$ apt-get install FreeTDS-dev
#configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path
$ apt-get install libpq-dev
#configure: error: Cannot find pspell
$ apt-get install libpspell-dev
#configure: error: Please reinstall libedit - I cannot find readline.h
$ apt-get install libedit-dev
#configure: error: Can not find recode.h anywhere under /usr /usr/local /usr /opt.
$ apt-get install librecode-dev
#configure: error: Could not find net-snmp-config binary. Please check your net-snmp installation.
$ apt-get install libsnmp-dev
#configure: error: Cannot find libtidy
$ apt-get install libtidy-dev
#checking for XMLRPC-EPI in default path... not found
$ apt-get install libxmlrpc-epi-dev
#configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution
$ apt-get install libxslt-dev
#configure: error: Please reinstall the libzip distribution
$ apt-get install libzip-dev
$ git clone -b master-7.1 https://gitlab.com/deb.sury.org/php.git php7 --depth=1
$ cd php7
#禁用systemd
$ sed -i "s/CONFIGURE_SYSTEMD *:= *--with-fpm-systemd/CONFIGURE_SYSTEMD := --without-fpm-systemd/g" debian/rules
$ sed -i "s/DH_SYSTEMD *:= *--with systemd/DH_SYSTEMD :=/g" debian/rules
$ dpkg-buildpackage -d -b -uc
#编译依赖包php-common
$ cd ..
$ git clone -b debian/50 git://anonscm.debian.org/pkg-php/php-defaults.git
$ cd php-defaults
#禁用systemd
$ sed -i "s/DH_SYSTEMD *:= *--with *systemd/DH_SYSTEMD :=/g" debian/rules
$ dpkg-buildpackage -d -b -uc
$ exit