summaryrefslogtreecommitdiff
path: root/xmake/plugins/pack/xpack_component.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2023-11-24 22:34:15 +0800
committerruki <[email protected]>2023-11-24 22:34:15 +0800
commitafbbacc9085b29e39cc13e00d5673202a70f7645 (patch)
tree6c5bbad30be4b526500989de84c617f0a0af1f40 /xmake/plugins/pack/xpack_component.lua
parent9217b528138fe4384403c0b573e8617bdcc18358 (diff)
add sourcefiles for xpack
Diffstat (limited to 'xmake/plugins/pack/xpack_component.lua')
-rw-r--r--xmake/plugins/pack/xpack_component.lua21
1 files changed, 18 insertions, 3 deletions
diff --git a/xmake/plugins/pack/xpack_component.lua b/xmake/plugins/pack/xpack_component.lua
index 59d2fae8f..bb0f5f454 100644
--- a/xmake/plugins/pack/xpack_component.lua
+++ b/xmake/plugins/pack/xpack_component.lua
@@ -240,10 +240,10 @@ function xpack_component:installfiles()
return self:_copiedfiles("installfiles", self:package():installdir())
end
--- get the root directory, this is just a temporary sandbox installation path,
+-- get the installed root directory, this is just a temporary sandbox installation path,
-- we may replace it with the actual installation path in the specfile
-function xpack_component:rootdir()
- return self:package():rootdir()
+function xpack_component:install_rootdir()
+ return self:package():install_rootdir()
end
-- get the installed directory
@@ -251,6 +251,21 @@ function xpack_component:installdir(...)
return self:package():installdir(...)
end
+-- get the source files
+function xpack_component:sourcefiles()
+ return self:_copiedfiles("sourcefiles", self:package():sourcedir())
+end
+
+-- get the source root directory
+function xpack_component:source_rootdir()
+ return self:package():souece_rootdir()
+end
+
+-- get the source directory
+function xpack_component:sourcedir(...)
+ return self:package():sourcedir(...)
+end
+
-- get the binary directory
function xpack_component:bindir()
return self:package():bindir()