[build] Modernize sbase package
Change-Id: Ib45be19467dab8ade355d2c70a29bcf26c73581e
Reviewed-on: https://fuchsia-review.googlesource.com/c/third_party/sbase/+/466857
Reviewed-by: Xyan Bhatnagar <xbhatnag@google.com>
diff --git a/BUILD.gn b/BUILD.gn
index 832d457..eb91ad4 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import("//build/package.gni")
+import("//src/sys/build/components.gni")
# The following binaries are disabled:
# "chgrp",
@@ -24,36 +24,7 @@
# "time",
# "uname",
-# The common binaries are the ones included in many product builds by
-# default.
-common_binaries = [
- "basename",
- "cat",
- "cmp",
- "cut",
- "date",
- "dirname",
- "du",
- "env",
- "expr",
- "find",
- "grep",
- "head",
- "hostname",
- "printf",
- "seq",
- "sleep",
- "sort",
- "tail",
- "tee",
- "touch",
- "tr",
- "uniq",
- "wc",
- "which",
-]
-
-sbase_binaries = [
+binaries = [
"basename",
"cal",
"cat",
@@ -142,8 +113,8 @@
]
}
-foreach(bin, sbase_binaries) {
- executable(bin + "_bin") {
+foreach(bin, binaries) {
+ executable("${bin}_bin") {
output_name = bin
sources = [ "$bin.c" ]
@@ -158,28 +129,7 @@
configs += [ ":sbase_config" ]
}
- package(bin) {
+ fuchsia_shell_package(bin) {
deps = [ ":${bin}_bin" ]
-
- binaries = [
- {
- name = bin
- shell = true
- },
- ]
- }
-}
-
-group("sbase") {
- deps = []
- foreach(pkg, sbase_binaries) {
- deps += [ ":" + pkg ]
- }
-}
-
-group("common") {
- deps = []
- foreach(pkg, common_binaries) {
- deps += [ ":" + pkg ]
}
}