summaryrefslogtreecommitdiff
path: root/xmake/plugins/pack/deb/main.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2024-06-12 23:43:28 +0800
committerruki <[email protected]>2024-06-12 23:24:25 +0800
commit2a1d36cd43e3719b34843316e4afd823eb9761d5 (patch)
tree7978017d3a9f29431bf2a7e459e15bd4a3827653 /xmake/plugins/pack/deb/main.lua
parent48c0ae382d6a424f5f538d9180e913f903356325 (diff)
add deb pack stub
Diffstat (limited to 'xmake/plugins/pack/deb/main.lua')
-rw-r--r--xmake/plugins/pack/deb/main.lua53
1 files changed, 53 insertions, 0 deletions
diff --git a/xmake/plugins/pack/deb/main.lua b/xmake/plugins/pack/deb/main.lua
new file mode 100644
index 000000000..b2629ef04
--- /dev/null
+++ b/xmake/plugins/pack/deb/main.lua
@@ -0,0 +1,53 @@
+--!A cross-platform build utility based on Lua
+--
+-- Licensed under the Apache License, Version 2.0 (the "License");
+-- you may not use this file except in compliance with the License.
+-- You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+-- Copyright (C) 2015-present, TBOOX Open Source Group.
+--
+-- @author ruki
+-- @file main.lua
+--
+
+-- imports
+import("core.base.option")
+import("core.base.semver")
+import("core.base.hashset")
+import("lib.detect.find_tool")
+import("lib.detect.find_file")
+import("utils.archive")
+import(".batchcmds")
+
+-- get the debuild
+function _get_debuild()
+ local debuild = find_tool("debuild", {force = true})
+ assert(debuild, "debuild not found!")
+ return debuild
+end
+
+-- pack deb package
+function _pack_deb(debuild, package)
+end
+
+function main(package)
+ if not is_host("linux") then
+ return
+ end
+
+ cprint("packing %s", package:outputfile())
+
+ -- get debuild
+ local debuild = _get_debuild()
+
+ -- pack deb package
+ _pack_deb(debuild.program, package)
+end