Commit 6a127559 authored by Noud Kerver's avatar Noud Kerver

initial commit

parents
Pipeline #248 failed with stage
in 38 seconds
image: noud02/replicant-build-base:latest
stages:
- build
i9300:
stage: build
script: bash ./build.sh i9300
cache:
paths:
- /home/yui/replicant/
artifacts:
paths:
- /home/yui/replicant/out/target/product/
FROM debian:stretch
MAINTAINER Noud Kerver <noud.kerver@protonmail.com>
RUN useradd -g users -G sudo -m -p uwu -s /bin/bash yui && \
dpkg --add-architecture i386 && \
echo "deb http://deb.debian.org/debian stretch contrib" >> /etc/apt/sources.list && \
echo "deb-src http://deb.debian.org/debian stretch main contrib" >> /etc/apt/sources.list && \
apt-get update
COPY build.sh /
COPY LICENSE /
CMD ["bash"]
This diff is collapsed.
# owo
what's this?
#!/usr/bin/env bash
#
# Build script for Replicant
# Copyright (C) 2018 Noud Kerver
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
set -e
DEVICE="$1"
if [ -z "$DEVICE" ]; then
echo "No device specified"
exit 1
fi
if [ "$USER" != "root" ]; then
echo "User must be root"
exit 1
fi
#####################################
apt-get build-dep -y gcc binutils llvm-defaults
apt-get install -y \
gcc-arm-none-eabi \
cmake \
python-dev \
swig \
ant \
bc \
proguard \
maven-debian-helper \
libemma-java \
libasm4-java \
libguava-java \
libnb-platform18-java \
libnb-org-openide-util-java \
libandroidsdk-ddmlib-java \
libmaven-source-plugin-java \
libfreemarker-java \
libmaven-javadoc-plugin-java \
ca-cacert \
curl \
gawk \
libgmp3-dev \
libmpfr-dev \
libmpc-dev \
git-core \
gperf \
libncurses-dev \
squashfs-tools \
pngcrush \
zip \
zlib1g-dev \
lzma \
libc6-dev-i386 \
g++-multilib \
lib32z1-dev \
lib32readline-dev \
lib32ncurses5-dev \
zlib1g-dev:i386 \
xsltproc \
python-mako \
schedtool \
gradle \
dirmngr \
libandroidsdk-sdklib-java \
eclipse-jdt \
libgradle-android-plugin-java \
android-sdk-build-tools \
android-sdk-platform-23 \
aapt \
lzop \
repo \
gpg
su - yui
if [ "$USER" != "yui" ]; then
echo "User must be yui"
exit 1
fi
mkdir ~/replicant
cd ~/replicant
echo "* Building for $DEVICE *"
#####################################
echo "################"
echo "# Repositories #"
echo "################"
echo "Initialize repositories"
if [ -z "$(stat .repo 2>/dev/null)" ]; then
repo init -u https://git.replicant.us/replicant/manifest.git --depth 1 -b replicant-6.0
curl https://owo.codes/noud02/android-manifest/raw/replicant-6.0/roomservice.xml > .repo/local_manifests/roomservice.xml
fi
echo "Sync repositories"
repo sync -j$(nproc)
#####################################
echo "#############"
echo "# Prebuilts #"
echo "#############"
echo "Add F-Droid GPG Key"
gpg --recv-key 7A029E54DD5DCE7A
echo "Download prebuilts"
bash vendor/replicant/get-prebuilts
#####################################
echo "#############"
echo "# Toolchain #"
echo "#############"
echo "Build toolchain"
bash vendor/replicant/build-toolchain
#####################################
echo "#########"
echo "# Setup #"
echo "#########"
echo "Setup environment"
bash build/envsetup.sh
echo "Lunch"
lunch replicant_$DEVICE-userdebug
#####################################
echo "###########"
echo "# Android #"
echo "###########"
echo "Build recovery"
mka -j$(nproc) recoveryimage
echo "Build boot image"
mka -j$(nproc) bootimage
echo "Build system image"
mka -j$(nproc) systemimage
#####################################
echo "###########"
echo "# Package #"
echo "###########"
echo "Create flashable zip"
make -j$(nproc) bacon
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment