summaryrefslogtreecommitdiff
path: root/xmake/plugins/pack/srpm/main.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2024-06-13 22:43:51 +0800
committerruki <[email protected]>2024-06-13 22:43:51 +0800
commiteaa2d3484fe75d1c7ca228fa94091936dddaffd6 (patch)
tree22ee60f398550a774ee913d06790c58f94adb4ac /xmake/plugins/pack/srpm/main.lua
parent598d43eaadf88c5813454e3e79c8e1d56117360a (diff)
improve specfile for pack
Diffstat (limited to 'xmake/plugins/pack/srpm/main.lua')
-rw-r--r--xmake/plugins/pack/srpm/main.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/plugins/pack/srpm/main.lua b/xmake/plugins/pack/srpm/main.lua
index b6b5467c8..e8630ba58 100644
--- a/xmake/plugins/pack/srpm/main.lua
+++ b/xmake/plugins/pack/srpm/main.lua
@@ -202,9 +202,9 @@ function _pack_srpm(rpmbuild, package)
end
-- install the initial specfile
- local specfile = package:specfile()
+ local specfile = path.join(package:buildir(), package:basename() .. ".spec")
if not os.isfile(specfile) then
- local specfile_template = path.join(os.programdir(), "scripts", "xpack", "srpm", "srpm.spec")
+ local specfile_template = package:get("specfile") or path.join(os.programdir(), "scripts", "xpack", "srpm", "srpm.spec")
os.cp(specfile_template, specfile)
end