feat(tool): implement tool package support with validation and configuration

This commit is contained in:
crazywhalecc
2026-06-27 15:39:30 +08:00
parent b4ed673261
commit a81dd6d5c9
10 changed files with 327 additions and 5 deletions

View File

@@ -120,6 +120,20 @@ abstract class Package
return false;
}
/**
* Get the target directory where this package's artifacts should be placed.
*
* Libraries install to BUILD_ROOT_PATH (static-libs, headers, pkg-configs).
* Tools install to PKG_ROOT_PATH (executables).
* Extensions install to php-src/ext/ (shared objects).
*
* Override in subclasses to change the default.
*/
public function getInstallTarget(): string
{
return BUILD_ROOT_PATH;
}
/**
* Add a stage to the package.
*/