diff options
| author | ruki <[email protected]> | 2023-11-22 00:48:56 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-11-22 00:48:56 +0800 |
| commit | 8c8f130f69343bbb50dafa718a8fe6df63497974 (patch) | |
| tree | 0c5831419ce91e09f934ec1390a31c59091f2305 /xmake/plugins/pack/xpack.lua | |
| parent | 574d9bca0e5d7a01fdf2500ac83c75f5927bb69d (diff) | |
add title
Diffstat (limited to 'xmake/plugins/pack/xpack.lua')
| -rw-r--r-- | xmake/plugins/pack/xpack.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/xmake/plugins/pack/xpack.lua b/xmake/plugins/pack/xpack.lua index 79acbb16a..bd687d39c 100644 --- a/xmake/plugins/pack/xpack.lua +++ b/xmake/plugins/pack/xpack.lua @@ -69,6 +69,15 @@ function xpack:license() return self:get("license") end +-- get the package title +function xpack:title() + local title = self:get("title") + if title == nil then + title = self:name() + end + return filter.handle(title, self) +end + -- get the package description function xpack:description() return self:get("description") @@ -251,6 +260,7 @@ function xpack:specvars() PACKAGE_ARCH = self:arch(), PACKAGE_PLAT = self:plat(), PACKAGE_NAME = self:name(), + PACKAGE_TITLE = self:title() or "", PACKAGE_DESCRIPTION = self:description() or "", PACKAGE_FILENAME = self:filename(), PACKAGE_HOMEPAGE = self:get("homepage") or "", |
