2023-05-12 09:47:43 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace SPC\builder\unix\library;
|
|
|
|
|
|
|
|
|
|
trait libsodium
|
|
|
|
|
{
|
2023-08-20 19:51:45 +08:00
|
|
|
protected function build(): void
|
2023-05-12 09:47:43 +00:00
|
|
|
{
|
2023-05-17 07:36:23 +00:00
|
|
|
$root = BUILD_ROOT_PATH;
|
2023-05-12 09:47:43 +00:00
|
|
|
shell()->cd($this->source_dir)
|
2023-10-23 00:37:28 +08:00
|
|
|
->exec("./configure --enable-static --disable-shared --prefix={$root}")
|
2023-05-12 09:47:43 +00:00
|
|
|
->exec('make clean')
|
|
|
|
|
->exec("make -j{$this->builder->concurrency}")
|
2023-05-17 07:36:23 +00:00
|
|
|
->exec('make install');
|
2023-05-12 09:47:43 +00:00
|
|
|
}
|
|
|
|
|
}
|