summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-11-25 00:51:19 +0800
committerruki <[email protected]>2023-11-25 00:51:19 +0800
commit43ac546cbd551bf06ae37a8211c8a65d9eadbb0b (patch)
tree51f19b4dd5179a29cbcc6acb033e0eb6f8ef4467
parent103bbe833dc6c1e8203cab0e842e49cfa426d0a4 (diff)
add set_author and set_maintainer
-rw-r--r--scripts/makeself/header8
-rw-r--r--scripts/makeself/lsm15
-rw-r--r--tests/plugins/pack/xmake.lua1
-rw-r--r--xmake/includes/xpack/xmake.lua4
-rw-r--r--xmake/plugins/pack/xpack.lua2
-rw-r--r--xmake/scripts/xpack/runself/makeself.lsm6
6 files changed, 10 insertions, 26 deletions
diff --git a/scripts/makeself/header b/scripts/makeself/header
deleted file mode 100644
index f247ee7bd..000000000
--- a/scripts/makeself/header
+++ /dev/null
@@ -1,8 +0,0 @@
-xmake v#xmake-version#, A cross-platform build utility based on Lua
-Copyright (C) 2015-present Ruki Wang, tboox.org, xmake.io
- _
- __ ___ __ __ __ _| | ______
- \ \/ / | \/ |/ _ | |/ / __ \
- > < | \__/ | /_| | < ___/
- /_/\_\_|_| |_|\__ \|_|\_\____|
- by ruki, xmake.io
diff --git a/scripts/makeself/lsm b/scripts/makeself/lsm
deleted file mode 100644
index 012efa4a1..000000000
--- a/scripts/makeself/lsm
+++ /dev/null
@@ -1,15 +0,0 @@
-Begin3
-Title: xmake
-Version: #xmake-version#
-Description: xmake is a cross-platform build utility based on lua.
- The project focuses on making development and building easier and
- provides many features (e.g package, install, plugin, macro, action, option, task ...),
- so that any developer can quickly pick it up and
- enjoy a productivity boost when developing and building projects.
-Keywords: make build
-Author: ruki ([email protected])
-Maintained-by: ruki ([email protected])
-Original-site: https://xmake.io/
-Platform: Unix; Windows
-Copying-policy: Apache-2.0
-End
diff --git a/tests/plugins/pack/xmake.lua b/tests/plugins/pack/xmake.lua
index 5f4be60a3..33d50b3d2 100644
--- a/tests/plugins/pack/xmake.lua
+++ b/tests/plugins/pack/xmake.lua
@@ -21,6 +21,7 @@ target("foo")
xpack("test")
set_formats("nsis", "zip", "targz", "srczip", "srctargz", "runself")
set_title("hello")
+ set_author("ruki")
set_description("A test installer.")
set_homepage("https://xmake.io")
set_licensefile("LICENSE.md")
diff --git a/xmake/includes/xpack/xmake.lua b/xmake/includes/xpack/xmake.lua
index 8572b2a87..c6ed04201 100644
--- a/xmake/includes/xpack/xmake.lua
+++ b/xmake/includes/xpack/xmake.lua
@@ -34,6 +34,10 @@ local apis = {
"xpack.set_homepage",
-- set package title
"xpack.set_title",
+ -- set author
+ "xpack.set_author",
+ -- set maintainer,
+ "xpack.set_maintainer",
-- set package description
"xpack.set_description",
-- set input kind, e.g. binary, source
diff --git a/xmake/plugins/pack/xpack.lua b/xmake/plugins/pack/xpack.lua
index 4bea5fb86..64e9d77dc 100644
--- a/xmake/plugins/pack/xpack.lua
+++ b/xmake/plugins/pack/xpack.lua
@@ -296,6 +296,8 @@ function xpack:specvars()
PACKAGE_TITLE = self:title() or "",
PACKAGE_DESCRIPTION = self:description() or "",
PACKAGE_FILENAME = self:filename(),
+ PACKAGE_AUTHOR = self:get("author") or "",
+ PACKAGE_MAINTAINER = self:get("maintainer") or self:get("author") or "",
PACKAGE_HOMEPAGE = self:get("homepage") or "",
PACKAGE_COPYRIGHT = self:get("copyright") or "",
PACKAGE_COMPANY = self:get("company") or "",
diff --git a/xmake/scripts/xpack/runself/makeself.lsm b/xmake/scripts/xpack/runself/makeself.lsm
index f71ea98c7..206c302c5 100644
--- a/xmake/scripts/xpack/runself/makeself.lsm
+++ b/xmake/scripts/xpack/runself/makeself.lsm
@@ -2,9 +2,9 @@ Begin3
Title: ${PACKAGE_TITLE}
Version: ${PACKAGE_VERSION}
Description: ${PACKAGE_DESCRIPTION}
-Keywords: make build
-Author: ruki ([email protected])
-Maintained-by: ruki ([email protected])
+Keywords: ${PACKAGE_NAME}
+Author: $(PACKAGE_AUTHOR)
+Maintained-by: $(PACKAGE_MAINTAINER)
Original-site: ${PACKAGE_HOMEPAGE}
Platform: Unix; Windows
Copying-policy: ${PACKAGE_COPYRIGHT}