mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 21:04:52 +08:00
21 lines
487 B
PHP
21 lines
487 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
declare(strict_types=1);
|
||
|
|
|
||
|
|
namespace SPC\builder\unix\library;
|
||
|
|
|
||
|
|
trait zlib
|
||
|
|
{
|
||
|
|
protected function build()
|
||
|
|
{
|
||
|
|
[,,$destdir] = SEPARATED_PATH;
|
||
|
|
|
||
|
|
shell()->cd($this->source_dir)
|
||
|
|
->exec("{$this->builder->configure_env} ./configure --static --prefix=")
|
||
|
|
->exec('make clean')
|
||
|
|
->exec("make -j{$this->builder->concurrency}")
|
||
|
|
->exec("make install DESTDIR={$destdir}");
|
||
|
|
$this->patchPkgconfPrefix(['zlib.pc']);
|
||
|
|
}
|
||
|
|
}
|