blob: a3418b2c6115c6900c57f9ac882a873856e839a5 [file] [log] [blame]
Thomas Vachuska13433eb2019-12-02 11:11:13 -08001# Prefix string to remove from proto import statements
2IMPORT_PREFIX = "github.com/onosproject/onos-topo/api/"
3
4proto_library(
5 name = "topo_device_proto",
6 srcs = [":topo_device_proto_sed"],
7 deps = [
8 "@com_google_protobuf//:descriptor_proto",
9 "@com_google_protobuf//:duration_proto",
10 "@com_google_protobuf//:any_proto",
11 ],
12 visibility = ["//visibility:public"],
13)
14
15genrule(
16 name = "topo_device_proto_sed",
17 srcs = [":device/device.proto"],
18 outs = ["new/device/device.proto"],
pierventre5489c2f2022-05-06 19:01:27 +020019 cmd = "sed -e 's:import \"gogoproto.*;::g;s: ..gogoproto\\..*:;:g;s:import \"%s:import \":g;s:^syntax = \"proto3\";:&\\\n option java_package = \"org.onosproject.uonos\";:g' $(location :device/device.proto) >> \"$@\""
Thomas Vachuska13433eb2019-12-02 11:11:13 -080020 % IMPORT_PREFIX,
21)