Skip to content

Commit

Permalink
* change build script.
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyidong committed Jan 17, 2017
1 parent 771b9be commit 79a4114
Show file tree
Hide file tree
Showing 2 changed files with 3,900 additions and 6 deletions.
13 changes: 7 additions & 6 deletions buildzbox.php
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ function zexec($command)
{
/* Download apache. */
$apacheVersion = '2.4.17';
if(!file_exists("httpd-{$apacheVersion}.tar.gz")) zexec("wget http://apache.fayea.com//httpd/httpd-{$apacheVersion}.tar.gz");
if(!file_exists("httpd-{$apacheVersion}.tar.gz")) zexec("wget http://archive.apache.org/dist/httpd/httpd-{$apacheVersion}.tar.gz");
if(!file_exists('apr-1.5.2.tar.gz')) zexec('wget http://mirrors.hust.edu.cn/apache/apr/apr-1.5.2.tar.gz');
if(!file_exists('apr-util-1.5.4.tar.gz')) zexec('wget http://mirrors.hust.edu.cn/apache/apr/apr-util-1.5.4.tar.gz');
zexec("rm -rf httpd-{$apacheVersion}; tar zxvf httpd-{$apacheVersion}.tar.gz");

zexec("cp apr-1.5.2.tar.gz apr-util-1.5.4.tar.gz $buildPath/httpd-{$apacheVersion}/srclib");
zexec("cp apr-1.5.2.tar.gz apr-util-1.5.4.tar.gz $buildPath/httpd-$apacheVersion/srclib");
chdir($buildPath . "/httpd-{$apacheVersion}/srclib/");
zexec('tar zxvf apr-1.5.2.tar.gz');
zexec('tar zxvf apr-util-1.5.4.tar.gz');
Expand Down Expand Up @@ -105,8 +105,8 @@ function zexec($command)
--with-apxs2=/opt/zbox/run/apache/apxs \
--with-config-file-path=/opt/zbox/etc/php \
--enable-mbstring --enable-bcmath --enable-sockets --disable-ipv6 \
--with-curl --with-openssl \
--with-gd --with-jpeg-dir --enable-gd-native-ttf --enable-gd-jis-conv \
--with-curl --with-openssl --with-imap --with-kerberos --with-imap-ssl \
--with-gd --with-jpeg-dir --enable-gd-native-ttf --enable-gd-jis-conv \
--with-ldap --with-ldap-sasl \
--enable-zip --with-zlib --with-bz2 \
--with-mysqli --with-pdo-mysql');
Expand Down Expand Up @@ -142,7 +142,7 @@ function zexec($command)
chdir("$basePath/run/mysql");
zexec("scripts/mysql_install_db --basedir=$basePath/run/mysql --datadir=$basePath/data/mysql --defaults-file=$basePath/etc/mysql/my.cnf --user=nobody");
chdir("$basePath/run/mysql/bin");
zexec("cp my_print_defaults mysql mysqld mysqld_safe mysqldump $basePath/run/newmysql");
zexec("cp my_print_defaults mysql mysqld mysqld_safe mysqldump myisamchk $basePath/run/newmysql");
zexec("cp $opath/mysql.server $basePath/run/newmysql;chmod a+x $basePath/run/newmysql/mysql.server");
zexec("mkdir -p $basePath/run/newmysql/share/english");
zexec("cp $basePath/run/mysql/share/english/errmsg.sys $basePath/run/newmysql/share/english");
Expand Down Expand Up @@ -206,7 +206,8 @@ function zexec($command)
$allLib[$so] = $so;
}

zexec("strip --strip-debug $file");
echo("strip --strip-debug $file\n");
system("strip --strip-debug $file");
if($interpreter)
{
$interpreter = trim(substr($interpreter, 0, strpos($interpreter, '(')));
Expand Down
Loading

0 comments on commit 79a4114

Please sign in to comment.