From patchwork Thu Feb 23 17:17:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: sfilbertf X-Patchwork-Id: 18304 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 024FEBE080 for ; Thu, 23 Feb 2023 17:17:31 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5C5A76261A; Thu, 23 Feb 2023 18:17:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1677172651; bh=abmBn65/spT3rSL3EtfqECch3jYrDJVI1QXwsOuZumw=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=RIAfi9YDkWDpWiUyQMz+AUkZeZeUrr3V5Hslk27ZygaY8SZjc92CH1DoTUaHMSZUR 3A1vuEyQaS86CjlbjmqRvIBtExsmcVzCnoqGiec8o4UqUwC8RpqMNOcTQ4WEQ72qPc zGdmc24SSdT2N55Rk4oUTzrsX1R5/6QelqroUfcp6Gvuql3fhQIiULjtMouf3DGD7L 6ttMFdGg0xvoBw4U25i/kBORgeVG0Z4o2OdhZTF68b7+p3hmN6FYfT8d0VhiQuYY/b QXUFeSgCtGo5XBCHrfliH2nlcR2r7Vasub0t7V6SmcIYCWuucgZzPPjsmLmERq0roq tDnqJj4LSVfMA== Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D4F7B603B4 for ; Thu, 23 Feb 2023 18:17:29 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="nT8H232H"; dkim-atps=neutral Received: by mail-ed1-x534.google.com with SMTP id d30so3527458eda.4 for ; Thu, 23 Feb 2023 09:17:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=/ZlcxG4WCtNiZIIuSYOdnyyooaRiXwA+++TrA5ftAro=; b=nT8H232H0tRRPs23be6z1OJKu/zlrUNVzd6V2A/yNKNgaT5+LfuR1aLs2zez4KjGFO 3T9EZDqs3CNK5A8z0AdZZ+y1BukbDMCcPeLkF98Bj+Ht1lr2ksiek7pkKwprPgIJrtbB VJ5iUWWl12k//CLEIP0yqiDRegjQ94Ip0ked6pOpxKV51MPPTTIReb1wRAeG0orXKQaN Mkss/4M3C+rTBnJIHbZxIU4+uBDD3omE0VMRPBL1Ff6pFijrmw2FNrOSqoSvqLQdxlm5 Dx7i5TmIR+aOeFgiI+Me63/TQSvCtEPQzcc3elrUPItoqaAtJ1laMfnFXrg5gCD9SCxa GqlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/ZlcxG4WCtNiZIIuSYOdnyyooaRiXwA+++TrA5ftAro=; b=5wHuxBRQPOaS7AaZRWylA9guGjtIewz607mXPHE+vmCM1cRl4efvMC0CW3WagMN/cm MlR69npoLfmAioU1oCeOi7JlWLF+ezUkysCExmUttcd4mNRcGyani2N4rYAFU10xLm4V S7C+Xi3cQBdbrlaC2gGR84rxAghGWy6gaL9SYwYkZAb3qIWfEIyKgrye2RiRqHgH5WXI qdMzCgjRPukigCV2x4QNhA+QWuV68c856UbyS7E9eAuBbhEXD9lQo5di0thFJHcRWIrU E+KVqpRCVJlnp0BjuISfLVUC9MWTFzIkvRuplJxJ1lzG/NmYrEsmgC8Z7GSECtc5vA+J hXeg== X-Gm-Message-State: AO0yUKVklci6hohfmM2cOg1ii1Y0UqkDlyP+0hmeyF2tE5IoaGBSWe/h S1dztHhw3AsJ1XNbUAm5+03RNcUyGLGk0A== X-Google-Smtp-Source: AK7set+y3JyUY66jOJHKPqKeZ8BR64zY1Ko2PaXptl5xItqJiTWR4P5x1aCW1JOUtEuQ3zxUlqoSqQ== X-Received: by 2002:a17:907:971a:b0:8de:920d:a4bb with SMTP id jg26-20020a170907971a00b008de920da4bbmr14346783ejc.26.1677172648908; Thu, 23 Feb 2023 09:17:28 -0800 (PST) Received: from workstation.. ([134.101.0.201]) by smtp.gmail.com with ESMTPSA id q22-20020a50cc96000000b004acbdf23cd2sm5471466edi.29.2023.02.23.09.17.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Feb 2023 09:17:28 -0800 (PST) To: libcamera-devel@lists.libcamera.org Date: Thu, 23 Feb 2023 18:17:08 +0100 Message-Id: <20230223171708.83117-1-filbertfebrianto14@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] utils: Added a helper script to manage dependencies X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: sfilbertf via libcamera-devel From: sfilbertf Reply-To: sfilbertf Cc: sfilbertf Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" --- utils/bootstrap-deps.sh | 102 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100755 utils/bootstrap-deps.sh diff --git a/utils/bootstrap-deps.sh b/utils/bootstrap-deps.sh new file mode 100755 index 00000000..95e7e66c --- /dev/null +++ b/utils/bootstrap-deps.sh @@ -0,0 +1,102 @@ +#!/usr/bin/env bash + +# Currently only for ubuntu and debian based distros +apt_get_ext=$(command -v apt-get) +if [ -z ${apt_get_ext} ]; then + exit +fi + +# Help message +function help { + echo "Usage:" + echo "./bootstrap-deps.sh [arg1] [arg2] . . ." + echo "" + echo "Where argi can be:" + echo "-all for all dependencies" + echo "-cam for cam" + echo "-qcam for qcam" + echo "-tracing for tracing with lttng" + echo "-gstreamer for gstreamer" + echo "-hotplug for device hotplug enumeration" + echo "-docs for documentation" + echo "-ipams for IPA module signing" + echo "-debug for improved debugging" + echo "-android for android" + echo "-lcc for lc-compliance" +} + +if [ $# == 1 ] && [ $1 == "-h" ] || [ $1 == "-help" ]; then + help + exit +fi + +# Dependencies +CORE="libyaml-dev python3-yaml python3-ply python3-jinja2" +IPAMS="libgnutls28-dev" +DEBUG="libdw-dev libunwind-dev" +HOTPLUG="libudev-dev" +DOCS="python3-sphinx doxygen graphviz texlive-latex-extra" +GSTREAMER="libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev" +CAM="libevent-dev libdrm-dev libjpeg-dev libsdl2-dev" +QCAM="qtbase5-dev libqt5core5a libqt5gui5 libqt5widgets5 qttools5-dev-tools libtiff-dev" +TRACING="liblttng-ust-dev python3-jinja2 lttng-tools" +ANDROID="libexif-dev libjpeg-dev" +LCCOMP="libevent-dev" + +# Meson build system +pip3 install --user meson +pip3 install --user --upgrade meson + +# libcamera core +sudo apt-get install -y ${CORE} + +# Optional dependencies +for arg in "$@" +do + case ${arg} in + # For all dependencies + "-all") + sudo apt-get install -y ${IPAMS} ${DEBUG} ${HOTPLUG} ${DOCS} ${GSTREAMER} ${CAM} ${QCAM} ${TRACING} ${ANDROID} ${LCCOMP} + ;; + # For cam + "-cam") + sudo apt-get install -y ${CAM} + ;; + # For qcam + "-qcam") + sudo apt-get install -y ${QCAM} + ;; + # For tracing + "-tracing") + sudo apt-get install -y ${TRACING} + ;; + # For gstreamer + "-gstreamer") + sudo apt-get install -y ${GSTREAMER} + ;; + # For hotplug + "-hotplug") + sudo apt-get install -y ${HOTPLUG} + ;; + # For documentation + "-docs") + sudo apt-get install -y ${DOCS} + ;; + # For IPA module signing + "-ipams") + sudo apt-get install -y ${IPAMS} + ;; + # For improved debugging + "-debug") + sudo apt-get install -y ${DEBUG} + ;; + # For android + "-android") + sudo apt-get install -y ${ANDROID} + ;; + # For lc-compliance + "-lcc") + sudo apt-get install -y ${LCCOMP} + ;; + esac +done