Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
if [ $UID != "0" ]; then
echo "ERROR: You must run this script as root!"
exit 1
fi
dnf install \
@development-tools \
android-tools \
automake \
bison \
bzip2 \
bzip2-libs \
ccache \
curl \
dpkg-dev \
gcc \
gcc-c++ \
gperf \
libstdc++.i686 \
libxml2-devel \
lz4-libs \
lzop \
make \
maven \
ncurses-compat-libs \
openssl-devel \
pngcrush \
python \
python3 \
python3-mako \
python-mako \
python-networkx \
schedtool \
squashfs-tools \
syslinux-devel \
zip \
zlib-devel \
zlib-devel.i686
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > /usr/bin/repo && chmod +x /usr/bin/repo
@danpawlik

This comment has been minimized.

Copy link

@danpawlik danpawlik commented Dec 8, 2017

I suggest to add ImageMagick-devel.x86_64 ImageMagick-c++-devel.x86_64

@axxx007xxxz

This comment has been minimized.

Copy link
Owner Author

@axxx007xxxz axxx007xxxz commented Dec 28, 2017

@dduuch: Thanks for the tip!
ImageMagick isn't strictly necessary for building, so I prefer not to add it; I may also remove 'optipng' and 'pngcrush'.

@leleobhz

This comment has been minimized.

Copy link

@leleobhz leleobhz commented Jul 24, 2019

For F30:

python3-networkx.noarch : Creates and Manipulates Graphs and Networks

@axxx007xxxz

This comment has been minimized.

Copy link
Owner Author

@axxx007xxxz axxx007xxxz commented Jun 9, 2020

I removed Java as it comes prebuilt with Android 10 source.
GCC can also be removed for the same reason but I'm keeping it for now.

@tdrkDev

This comment has been minimized.

Copy link

@tdrkDev tdrkDev commented Jun 21, 2020

Suggest to add ability to chose download Java or not, some people like me are building old Android versions, where Java wasn't prebuilt.

Add this to the top of the script (after root check) (first variant):

echo "Install Java 8 for Android versions lower than Q? (y/N)"
echo -n "$0> "
read installJava
case "$installJava" in
y|Y) echo "Java 8 will be installed."
installJava="\
	java-1.8.0-openjdk"
;;
*) installJava=""
;;
esac

Add this to the top of the script (after root check) (second variant):

if [ -z "$1" ]; then
	echo "If you need Java to be installed (for lower than Android Q verisons), you can execute $0 with -java argument."
	installJava=""
elif [ "$1" = "-java" ]; then
	installJava="\
	java-1.8.0-openjdk"
	echo "Java 8 will be installed."
fi

Add this to the end of packages to install:
$installJava

Full dnf command will be:

dnf install \
	@development-tools \
	android-tools \
	automake \
	bison \
	bzip2 \
	bzip2-libs \
	ccache \
	curl \
	dpkg-dev \
	gcc \
	gcc-c++ \
	gperf \
	libstdc++.i686 \
	libxml2-devel \
	lz4-libs \
	lzop \
	make \
	maven \
	ncurses-compat-libs \
	openssl-devel \
	pngcrush \
	python \
	python3 \
	python3-mako \
	python-mako \
	python-networkx \
	schedtool \
	squashfs-tools \
	syslinux-devel \
	zip \
	zlib-devel \
	zlib-devel.i686 $installJava
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment