Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7333a383 authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

Move AOSP deps to script

parent 36fda07b
Loading
Loading
Loading
Loading
+1 −32
Original line number Diff line number Diff line
@@ -183,40 +183,9 @@ RUN mkdir -p $USERSCRIPTS_DIR

# Install build dependencies
############################
RUN apt-get -qq update
RUN apt-get -qqy upgrade

RUN apt-get install -y android-sdk-libsparse-utils bc bison bsdmainutils build-essential cgpt clang cron \
      curl flex g++-multilib gcc-multilib git git-crypt git-lfs gnupg gperf imagemagick kmod jq \
      lib32readline-dev lib32z1-dev liblz4-tool \
      libsdl1.2-dev libssl-dev libxml2 \
      libxml2-utils lsof lzop maven pngcrush \
      procps python3 python-is-python3 rsync schedtool squashfs-tools software-properties-common wget xdelta3 xsltproc xxd yasm \
      zip zlib1g-dev

RUN apt-get install -y \
    cmake \
    pkg-config \
    libzstd-dev \
    libhiredis-dev

RUN /root/install-deps.sh
RUN /root/install-latest-ccache.sh

# Install Python 2.7 for legacy device support
RUN wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python2.7/python2.7_2.7.18-13ubuntu1_amd64.deb && \
    wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python2.7/libpython2.7-stdlib_2.7.18-13ubuntu1_amd64.deb && \
    wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python2.7/python2.7-minimal_2.7.18-13ubuntu1_amd64.deb && \
    wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python2.7/libpython2.7-minimal_2.7.18-13ubuntu1_amd64.deb && \
    dpkg -i *.deb || apt-get install -f -y && \
    rm -f *.deb && \
    ln -sf /usr/bin/python2.7 /usr/bin/python2

RUN curl https://storage.googleapis.com/git-repo-downloads/repo > /usr/local/bin/repo
RUN chmod a+x /usr/local/bin/repo

RUN wget https://archive.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2_amd64.deb && dpkg -i libtinfo5_6.3-2_amd64.deb && rm -f libtinfo5_6.3-2_amd64.deb
RUN wget https://archive.ubuntu.com/ubuntu/pool/universe/n/ncurses/libncurses5_6.3-2_amd64.deb && dpkg -i libncurses5_6.3-2_amd64.deb && rm -f libncurses5_6.3-2_amd64.deb

# Set the work directory
########################
WORKDIR $SRC_DIR
+1 −32
Original line number Diff line number Diff line
@@ -166,40 +166,9 @@ RUN mkdir -p $USERSCRIPTS_DIR

# Install build dependencies
############################
RUN apt-get -qq update
RUN apt-get -qqy upgrade

RUN apt-get install -y android-sdk-libsparse-utils bc bison bsdmainutils build-essential cgpt clang cron \
      curl flex g++-multilib gcc-multilib git git-lfs gnupg gperf imagemagick kmod jq \
      lib32readline-dev lib32z1-dev liblz4-tool \
      libsdl1.2-dev libssl-dev libxml2 \
      libxml2-utils lsof lzop maven pngcrush \
      procps python3 python-is-python3 rsync schedtool squashfs-tools software-properties-common wget xdelta3 xsltproc xxd yasm \
      zip zlib1g-dev

RUN apt-get install -y \
    cmake \
    pkg-config \
    libzstd-dev \
    libhiredis-dev

RUN /root/install-deps.sh
RUN /root/install-latest-ccache.sh

# Install Python 2.7 for legacy device support
RUN wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python2.7/python2.7_2.7.18-13ubuntu1_amd64.deb && \
    wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python2.7/libpython2.7-stdlib_2.7.18-13ubuntu1_amd64.deb && \
    wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python2.7/python2.7-minimal_2.7.18-13ubuntu1_amd64.deb && \
    wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python2.7/libpython2.7-minimal_2.7.18-13ubuntu1_amd64.deb && \
    dpkg -i *.deb || apt-get install -f -y && \
    rm -f *.deb && \
    ln -sf /usr/bin/python2.7 /usr/bin/python2

RUN curl https://storage.googleapis.com/git-repo-downloads/repo > /usr/local/bin/repo
RUN chmod a+x /usr/local/bin/repo

RUN wget https://archive.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2_amd64.deb && dpkg -i libtinfo5_6.3-2_amd64.deb && rm -f libtinfo5_6.3-2_amd64.deb
RUN wget https://archive.ubuntu.com/ubuntu/pool/universe/n/ncurses/libncurses5_6.3-2_amd64.deb && dpkg -i libncurses5_6.3-2_amd64.deb && rm -f libncurses5_6.3-2_amd64.deb

# Set the work directory
########################
WORKDIR $SRC_DIR
+0 −5
Original line number Diff line number Diff line
@@ -343,8 +343,6 @@ for branch in ${BRANCH_NAME//,/ }; do
        echo ">> [$(date)] Starting build for $codename, $branch branch" | tee -a "$DEBUG_LOG"
        build_successful=false
        echo ">> [$(date)] ANDROID_JACK_VM_ARGS=${ANDROID_JACK_VM_ARGS}"
        echo ">> [$(date)] Switch to Python2"
        ln -fs /usr/bin/python2 /usr/bin/python

        if [[ "${BRANCH_NAME}" = *"rc"* ]] || [[ "${BRANCH_NAME}" = *"alpha"* ]] || [[ "${BRANCH_NAME}" == *"beta"* ]]; then
          PRODUCT_PRERELEASE=$(echo ${BRANCH_NAME} | sed -E 's/v[0-9]*\.[0-9]*(\.[0-9]*)?-(beta|alpha|rc).*/\2/')
@@ -496,9 +494,6 @@ for branch in ${BRANCH_NAME//,/ }; do
            mka clean &>>"$DEBUG_LOG"
          fi
        fi

        echo ">> [$(date)] Switch back to Python3"
        ln -fs /usr/bin/python3 /usr/bin/python
      fi
    done
  fi

src/install-deps.sh

0 → 100755
+42 −0
Original line number Diff line number Diff line
#!/usr/bin/env bash
set -euxo pipefail

export DEBIAN_FRONTEND=noninteractive

apt-get update

apt-get install -y \
  android-sdk-libsparse-utils bc bison bsdmainutils \
  build-essential cgpt clang cron \
  curl flex g++-multilib gcc-multilib \
  git git-crypt git-lfs gnupg \
  gperf imagemagick kmod jq \
  lib32readline-dev lib32z1-dev liblz4-tool \
  libsdl1.2-dev libssl-dev libxml2 libxml2-utils \
  lsof lzop maven pngcrush \
  procps python3 python-is-python3 rsync \
  schedtool squashfs-tools software-properties-common \
  wget xdelta3 xsltproc xxd \
  yasm zip zlib1g-dev libnsl2 \
  cmake pkg-config libzstd-dev libhiredis-dev

cd /tmp

wget https://archive.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2_amd64.deb
wget https://archive.ubuntu.com/ubuntu/pool/universe/n/ncurses/libncurses5_6.3-2_amd64.deb

wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python2.7/python2.7_2.7.18-13ubuntu1_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python2.7/libpython2.7-stdlib_2.7.18-13ubuntu1_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python2.7/python2.7-minimal_2.7.18-13ubuntu1_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python2.7/libpython2.7-minimal_2.7.18-13ubuntu1_amd64.deb

apt-get install -y ./*.deb

rm -f *.deb
apt-get clean
rm -rf /var/lib/apt/lists/*

ln -sf /usr/bin/python2.7 /usr/bin/python2

curl -fsSL https://storage.googleapis.com/git-repo-downloads/repo -o /usr/local/bin/repo
chmod +x /usr/local/bin/repo