# Copyright (c) 2022 Huawei Device Co., Ltd.
# 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("//build/ohos.gni")
import("../../print.gni")

################################################################################

ohos_prebuilt_etc("printservice.rc") {
  source = "printservice.cfg"
  relative_install_dir = "init"
  part_name = "print_fwk"
  subsystem_name = "print"
}

ohos_prebuilt_etc("cups-files.conf") {
  source = "cups-files.conf"
  relative_install_dir = "cups"
  part_name = "print_fwk"
  subsystem_name = "print"
}

ohos_prebuilt_etc("cupsd.conf") {
  source = "cupsd.conf"
  relative_install_dir = "cups"
  part_name = "print_fwk"
  subsystem_name = "print"
}

ohos_prebuilt_etc("cups_service.cfg") {
  source = "cups_service.cfg"
  relative_install_dir = "init"
  part_name = "print_fwk"
  subsystem_name = "print"
}

ohos_prebuilt_etc("scanservice.rc") {
  source = "scanservice.rc"
  relative_install_dir = "init"
  part_name = "print_fwk"
  subsystem_name = "print"
}

ohos_prebuilt_etc("scanservice.cfg") {
  source = "scanservice.cfg"
  relative_install_dir = "init"
  part_name = "print_fwk"
  subsystem_name = "print"
}

ohos_prebuilt_etc("saneservice.cfg") {
  source = "saneservice.cfg"
  relative_install_dir = "init"
  part_name = "print_fwk"
  subsystem_name = "print"
}

ohos_prebuilt_etc("saneservice.rc") {
  source = "saneservice.rc"
  relative_install_dir = "init"
  part_name = "print_fwk"
  subsystem_name = "print"
}

ohos_prebuilt_etc("cups_enterprise-files.conf") {
  source = "cups_enterprise-files.conf"
  relative_install_dir = "cups"
  part_name = "print_fwk"
  subsystem_name = "print"
}

ohos_prebuilt_etc("cups_service_enterprise.cfg") {
  source = "cups_service_enterprise.cfg"
  relative_install_dir = "init"
  part_name = "print_fwk"
  subsystem_name = "print"
}

ohos_prebuilt_etc("cupsd_enterprise.conf") {
  source = "cupsd_enterprise.conf"
  relative_install_dir = "cups"
  part_name = "print_fwk"
  subsystem_name = "print"
}

group("enterprise_cfgs") {
  if (print_fwk_feature_enterprise) {
    deps = [
      ":cups_enterprise-files.conf",
      ":cups_service_enterprise.cfg",
      ":cupsd_enterprise.conf"
    ]
  }
}