blob: 9a42836a575642f7c82248f487a7cb14a00d4d5c [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"],
19 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) >> \"$@\""
20 % IMPORT_PREFIX,
21)