Thomas Vachuska | 13433eb | 2019-12-02 11:11:13 -0800 | [diff] [blame] | 1 | # Prefix string to remove from proto import statements |
| 2 | IMPORT_PREFIX = "github.com/onosproject/onos-topo/api/" |
| 3 | |
| 4 | proto_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 | |
| 15 | genrule( |
| 16 | name = "topo_device_proto_sed", |
| 17 | srcs = [":device/device.proto"], |
| 18 | outs = ["new/device/device.proto"], |
pierventre | 5489c2f | 2022-05-06 19:01:27 +0200 | [diff] [blame] | 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) >> \"$@\"" |
Thomas Vachuska | 13433eb | 2019-12-02 11:11:13 -0800 | [diff] [blame] | 20 | % IMPORT_PREFIX, |
| 21 | ) |