summaryrefslogtreecommitdiff
path: root/core/xpack.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2023-12-21 23:55:12 +0800
committerruki <[email protected]>2023-12-21 23:55:12 +0800
commit17733b58e60dbc2729de94c17aedf48d6495136c (patch)
tree9302fe426a0aa2dcb7ec2473b7fe666b826b9be2 /core/xpack.lua
parentb9bcacc934f10e034e7429a53921814c16d994ec (diff)
add srpm
Diffstat (limited to 'core/xpack.lua')
-rw-r--r--core/xpack.lua24
1 files changed, 22 insertions, 2 deletions
diff --git a/core/xpack.lua b/core/xpack.lua
index a56eaceb8..f8a1726cc 100644
--- a/core/xpack.lua
+++ b/core/xpack.lua
@@ -3,6 +3,7 @@ xpack("xmake")
set_title("Xmake build utility ($(arch))")
set_description("A cross-platform build utility based on Lua.")
set_copyright("Copyright (C) 2015-present, TBOOX Open Source Group")
+ set_author("[email protected]")
set_licensefile("../LICENSE.md")
set_formats("nsis", "zip")
add_targets("demo")
@@ -77,9 +78,15 @@ xpack_component("LongPath")
end)
xpack("xmakesrc")
- set_formats("srczip", "srctargz", "runself")
+ set_homepage("https://xmake.io")
+ set_title("Xmake build utility ($(arch))")
+ set_description("A cross-platform build utility based on Lua.")
+ set_copyright("Copyright (C) 2015-present, TBOOX Open Source Group")
+ set_author("[email protected]")
+ set_formats("srczip", "srctargz", "runself", "srpm")
set_basename("xmake-v$(version)")
set_prefixdir("xmake-$(version)")
+ set_license("Apache-2.0")
before_package(function (package)
import("devel.git")
@@ -107,6 +114,19 @@ xpack("xmakesrc")
package:add("sourcefiles", path.join(rootdir, "scripts/msys/**"), extraconf)
end)
+ on_buildcmd(function (package, batchcmds)
+ local format = package:format()
+ if format == "srpm" then
+ batchcmds:runv("./configure")
+ batchcmds:runv("make")
+ end
+ end)
+
on_installcmd(function (package, batchcmds)
- batchcmds:runv("./scripts/get.sh", {"__local__"})
+ local format = package:format()
+ if format == "runself" then
+ batchcmds:runv("./scripts/get.sh", {"__local__"})
+ elseif format == "srpm" then
+ batchcmds:runv("make", {"install", "PREFIX=%{buildroot}"})
+ end
end)