Skip to content
Snippets Groups Projects
Select Git revision
  • d80aab9399ec37b09e45161c8105971b410d957a
  • master default
  • windows_ci_static
  • c_link
  • cpack
  • windows_ci
  • cert_pk_id
  • proxy_push_result
  • cnode_put_id
  • update-windows-build
  • proxy
  • resubscribe_on_token_change
  • actions
  • client_mode
  • llhttp
  • search_node_add
  • crypto_aes_gcm_argon2
  • ios_notifications
  • log_fmt
  • v2asio
  • fix-msvc
  • v3.4.0
  • v3.3.1
  • v3.3.1rc1
  • v3.3.1rc2
  • v3.3.0
  • v3.2.0
  • v3.1.11
  • v3.1.10
  • v3.1.9
  • v3.1.8.2
  • v3.1.8.1
  • v3.1.8
  • v3.1.7
  • v3.1.6
  • v3.1.5
  • v3.1.4
  • v3.1.3
  • v3.1.2
  • v3.1
  • v3.0.1
41 results

scanner.py

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    install.sh 1.80 KiB
    #!/usr/bin/env bash
    
    # Build and install to a local prefix under this repository.
    
    # Flags:
    
      # -g: install globally instead for all users
      # -s: link everything statically, no D-Bus communication. More likely to work!
      # -c: client to build
    
    set -ex
    
    global=false
    static=''
    client=''
    while getopts gsc: OPT; do
      case "$OPT" in
        g)
          global='true'
        ;;
        s)
          static='-DENABLE_STATIC=true'
        ;;
        c)
          client="${OPTARG}"
        ;;
        \?)
          exit 1
        ;;
      esac
    done
    
    make_install() {
      if $1; then
        sudo make install
        # Or else the next non-sudo install will fail, because this generates some
        # root owned files like install_manifest.txt under the build directory.
        sudo chown -R "$USER" .
      else
        make install
      fi
    }
    
    TOP="$(pwd)"
    INSTALL="${TOP}/install"
    
    if $global; then
        BUILDDIR="build-global"
    else
        BUILDDIR="build-local"
    fi
    
    cd "${TOP}/daemon"
    DAEMON="$(pwd)"
    cd contrib
    mkdir -p native
    cd native
    ../bootstrap
    make -j$(nproc)
    cd "${DAEMON}"
    ./autogen.sh
    if $global; then
      ./configure $CONFIGURE_FLAGS
    else
      ./configure $CONFIGURE_FLAGS --prefix="${INSTALL}/daemon"
    fi
    make -j$(nproc)
    make_install $global
    
    cd "${TOP}/lrc"
    mkdir -p ${BUILDDIR}
    cd ${BUILDDIR}
    if $global; then
      cmake .. -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH -DCMAKE_BUILD_TYPE=Debug $static
    else
      cmake .. -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="${INSTALL}/lrc" -DRING_BUILD_DIR="${DAEMON}/src" $static
    fi
    make
    make_install $global
    
    cd "${TOP}/${client}"
    mkdir -p ${BUILDDIR}
    cd ${BUILDDIR}
    if $global; then
      cmake .. -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH $static
    else
      cmake .. -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH -DCMAKE_INSTALL_PREFIX="${INSTALL}/${client}" -DLibRingClient_DIR="${INSTALL}/lrc/lib/cmake/LibRingClient" $static
    fi
    make
    make_install $global