diff options
| author | ruki <[email protected]> | 2023-12-18 23:40:08 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-12-18 23:40:08 +0800 |
| commit | e620e5eb4d95832db3133140f4177bd24fc63c24 (patch) | |
| tree | e0d07e1bf16ef23d78b7492a34baa21df0303ca6 /xmake/plugins/pack/srpm/main.lua | |
| parent | cc7b17ab9e0d9fc523b88a2508fb79947d440fef (diff) | |
fix prep
Diffstat (limited to 'xmake/plugins/pack/srpm/main.lua')
| -rw-r--r-- | xmake/plugins/pack/srpm/main.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/xmake/plugins/pack/srpm/main.lua b/xmake/plugins/pack/srpm/main.lua index b30596a96..60712a0f3 100644 --- a/xmake/plugins/pack/srpm/main.lua +++ b/xmake/plugins/pack/srpm/main.lua @@ -117,6 +117,7 @@ function _get_specvars(package) if datestr then datestr = datestr:trim() end + specvars.PACKAGE_PREFIXDIR = package:prefixdir() or "" specvars.PACKAGE_DATE = datestr or "" specvars.PACKAGE_INSTALLCMDS = function () local installcmds = {} @@ -134,6 +135,13 @@ end -- pack srpm package function _pack_srpm(rpmbuild, package) + -- ensure prefixdir + local prefixdir = package:get("prefixdir") + if not prefixdir then + prefixdir = package:name() .. "-" .. package:version() + package:set("prefixdir", prefixdir) + end + -- install the initial specfile local specfile = package:specfile() if not os.isfile(specfile) then |
