| # Copyright 2018 The Chromium OS Authors. All rights reserved. |
| # Distributed under the terms of the GNU General Public License v2 |
| |
| # @ECLASS: cros-camera.eclass |
| # @MAINTAINER: |
| # Chromium OS Camera Team |
| # @BUGREPORTS: |
| # Please report bugs via http://crbug.com/new (with label Build) |
| # @VCSURL: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/master/eclass/@ECLASS@ |
| # @BLURB: helper eclass for building Chromium package in src/platform2/camera |
| # @DESCRIPTION: |
| # Packages in src/platform2/camera are in active development. We want builds |
| # to be incremental and fast. This centralized the logic needed for this. |
| |
| inherit multilib |
| |
| # @FUNCTION: cros-camera_dohal |
| # @USAGE: <source HAL file> <destination HAL file> |
| # @DESCRIPTION: |
| # Install the given camera HAL library to /usr/lib/camera_hal or |
| # /usr/lib64/camera_hal, depending on the architecture and/or platform. |
| cros-camera_dohal() { |
| [[ $# -eq 2 ]] || die "Usage: ${FUNCNAME} <src> <dst>" |
| |
| local src=$1 |
| local dst=$2 |
| ( |
| insinto "/usr/$(get_libdir)/camera_hal" |
| newins "${src}" "${dst}" |
| ) |
| } |