diff options
| author | ruki <[email protected]> | 2023-12-18 23:51:29 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-12-18 23:51:29 +0800 |
| commit | 6e4ca7085141b94d030d963129f6f74873f72867 (patch) | |
| tree | 1a7669784ebd578b5f8c0a65cb0ef23ed5c74eaa /xmake/plugins/pack/srpm/main.lua | |
| parent | e620e5eb4d95832db3133140f4177bd24fc63c24 (diff) | |
fix files path
Diffstat (limited to 'xmake/plugins/pack/srpm/main.lua')
| -rw-r--r-- | xmake/plugins/pack/srpm/main.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/xmake/plugins/pack/srpm/main.lua b/xmake/plugins/pack/srpm/main.lua index 60712a0f3..2b67ce40c 100644 --- a/xmake/plugins/pack/srpm/main.lua +++ b/xmake/plugins/pack/srpm/main.lua @@ -60,7 +60,7 @@ end -- translate the file path function _translate_filepath(package, filepath) - return filepath:replace(package:install_rootdir(), "%{buildroot}", {plain = true}) + return filepath:replace(package:install_rootdir(), "%{buildroot}/%{_exec_prefix}", {plain = true}) end -- get install command @@ -120,6 +120,8 @@ function _get_specvars(package) specvars.PACKAGE_PREFIXDIR = package:prefixdir() or "" specvars.PACKAGE_DATE = datestr or "" specvars.PACKAGE_INSTALLCMDS = function () + local prefixdir = package:get("prefixdir") + package:set("prefixdir", nil) local installcmds = {} _get_installcmds(package, installcmds, batchcmds.get_installcmds(package):cmds()) for _, component in table.orderpairs(package:components()) do @@ -127,6 +129,7 @@ function _get_specvars(package) _get_installcmds(package, installcmds, batchcmds.get_installcmds(component):cmds()) end end + package:set("prefixdir", prefixdir) return table.concat(installcmds, "\n") end return specvars |
