update_engine: migrate client package to use GN

TEST=ebuild-$BOARD ~/trunk/src/third_party/chromiumos-overlay/chromeos-base/update_engine-client/update_engine-client-9999.ebuild clean install # BOARD=amd64-generic
TEST=ebuild-$BOARD ~/trunk/src/third_party/chromiumos-overlay/chromeos-base/update_engine/update_engine-9999.ebuild clean install
TEST=emerge-$BOARD update_engine-client # after cros_workon --board=$BOARD start update_engine-client
TEST=emerge-$BOARD dlcservice
BUG=chromium:953642

Cq-Depend: chromium:1634490
Change-Id: I770539960cdfeb2319d6439c8fc53cd21b3fad2f
Reviewed-on: https://chromium-review.googlesource.com/1634669
Commit-Ready: Keigo Oka <oka@chromium.org>
Tested-by: Keigo Oka <oka@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Tatsuhisa Yamaguchi <yamaguchi@chromium.org>
Reviewed-by: Keigo Oka <oka@chromium.org>
diff --git a/client-headers/BUILD.gn b/client-headers/BUILD.gn
new file mode 100644
index 0000000..88f8bb9
--- /dev/null
+++ b/client-headers/BUILD.gn
@@ -0,0 +1,35 @@
+#
+# Copyright (C) 2019 The Android Open Source Project
+#
+# 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.
+#
+
+import("//common-mk/generate-dbus-proxies.gni")
+
+group("all") {
+  deps = [
+    ":libupdate_engine-client-headers",
+  ]
+}
+
+# update_engine client library generated headers. Used by other daemons and
+# by the update_engine_client console program to interact with update_engine.
+generate_dbus_proxies("libupdate_engine-client-headers") {
+  sources = [
+    "../dbus_bindings/org.chromium.UpdateEngineInterface.dbus-xml",
+  ]
+  dbus_service_config = "../dbus_bindings/dbus-service-config.json"
+  mock_output_file = "include/update_engine/dbus-proxy-mocks.h"
+  proxy_output_file = "include/update_engine/dbus-proxies.h"
+  proxy_path_in_mocks = "update_engine/dbus-proxies.h"
+}
diff --git a/libupdate_engine-client-test.pc.in b/client-headers/libupdate_engine-client-test.pc.in
similarity index 100%
rename from libupdate_engine-client-test.pc.in
rename to client-headers/libupdate_engine-client-test.pc.in
diff --git a/libupdate_engine-client.pc.in b/client-headers/libupdate_engine-client.pc.in
similarity index 100%
rename from libupdate_engine-client.pc.in
rename to client-headers/libupdate_engine-client.pc.in
diff --git a/update_engine-client.gyp b/update_engine-client.gyp
deleted file mode 100644
index 588fc63..0000000
--- a/update_engine-client.gyp
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-# Copyright (C) 2015 The Android Open Source Project
-#
-# 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.
-#
-{
-  'targets': [
-    # update_engine client library generated headers. Used by other daemons and
-    # by the update_engine_client console program to interact with
-    # update_engine.
-    {
-      'target_name': 'libupdate_engine-client-headers',
-      'type': 'none',
-      'actions': [
-        {
-          'action_name': 'update_engine_client-dbus-proxies',
-          'variables': {
-            'dbus_service_config': 'dbus_bindings/dbus-service-config.json',
-            'proxy_output_file': 'include/update_engine/dbus-proxies.h',
-            'mock_output_file': 'include/update_engine/dbus-proxy-mocks.h',
-            'proxy_path_in_mocks': 'update_engine/dbus-proxies.h',
-          },
-          'sources': [
-            'dbus_bindings/org.chromium.UpdateEngineInterface.dbus-xml',
-          ],
-          'includes': ['../../../platform2/common-mk/generate-dbus-proxies.gypi'],
-        },
-      ],
-    },
-  ],
-}