buildsys: clean up checkdeps

This commit is contained in:
Stefan Saraev 2015-09-30 15:49:57 +03:00 committed by Stephan Raue
parent d690ffa4de
commit fd31d5d958
3 changed files with 24 additions and 42 deletions

View File

@ -20,31 +20,29 @@
. config/options $1 . config/options $1
deps= if [ -f /etc/lsb-release ]; then
deps_pkg= DISTRO=$(grep DISTRIB_ID /etc/lsb-release | cut -d "=" -f 2 | tr A-Z a-z)
files= fi
files_pkg=
if [ -f /etc/os-release ]; then
DISTRO=$(grep ^ID= /etc/os-release | cut -d "=" -f 2 | tr A-Z a-z)
fi
deps="wget bash bc gcc sed patch tar bzip2 gzip perl gawk md5deep gperf zip unzip diff makeinfo"
deps_pkg="wget bash bc gcc sed patch tar bzip2 gzip perl gawk md5deep gperf zip unzip diffutils texinfo"
case $1 in
get)
deps="wget"
deps_pkg="wget"
;;
build)
deps="bash bc gcc g++ sed patch touch tar bzip2 gzip perl cp gawk makeinfo gperf zip unzip mkfontscale mkfontdir bdftopcf diff xsltproc java md5deep"
deps_pkg="bash bc gcc g++ sed patch fileutils tar bzip2 gzip perl coreutils gawk texinfo gperf zip unzip xfonts-utils xfonts-utils xfonts-utils diff xsltproc default-jre md5deep"
files="/usr/include/stdio.h /usr/include/ncurses.h" files="/usr/include/stdio.h /usr/include/ncurses.h"
files_pkg="libc6-dev libncurses5-dev" files_pkg="libc6-dev libncurses5-dev"
if [ -f /etc/redhat-release ]; then
deps_pkg="bash bc gcc gcc-c++ sed patch fileutils tar bzip2 gzip perl coreutils gawk texinfo gperf zip unzip xorg-x11-font-utils xorg-x11-font-utils diffutils libxslt java-1.7.0-openjdk" case "$DISTRO" in
fedora|centos|rhel)
deps="$deps g++ mkfontscale mkfontdir bdftopcf xsltproc java"
deps_pkg="$deps_pkg gcc-c++ xorg-x11-font-utils xorg-x11-font-utils xorg-x11-font-utils libxslt java-1.7.0-openjdk"
files_pkg="glibc-headers ncurses-devel" files_pkg="glibc-headers ncurses-devel"
fi
;; ;;
qemu) *)
if [ ! `which qemu` ]; then deps="$deps g++ mkfontscale mkfontdir bdftopcf xsltproc java"
echo "Your system doesn't seem to have QEMU installed" deps_pkg="$deps_pkg g++ xfonts-utils xfonts-utils xfonts-utils xsltproc default-jre"
exit 1
fi
;; ;;
esac esac
@ -75,26 +73,12 @@ done
if [ -n "$need" ]; then if [ -n "$need" ]; then
echo "**** Your system lacks the following tools needed to $1 $DISTRONAME ****" echo "**** Your system lacks the following tools needed to $1 $DISTRONAME ****"
echo $need echo $need
if [ -f /etc/lsb-release ]; then
DISTRO=$(grep DISTRIB_ID /etc/lsb-release | cut -d "=" -f 2 | tr A-Z a-z)
fi
if [ -f /etc/os-release ]; then
DISTRO=$(grep ^ID= /etc/os-release | cut -d "=" -f 2 | tr A-Z a-z)
fi
echo "**** You seem to use a $DISTRO system ****" echo "**** You seem to use a $DISTRO system ****"
case "$DISTRO" in case "$DISTRO" in
ubuntu|debian) ubuntu|debian)
read -p "would you like to install the needed tools ? (y/n) " ans read -p "would you like to install the needed tools ? (y/n) " ans
if [ "$ans" = "y" ]; then [ "$ans" = "y" ] && sudo apt-get install $need_pkg
sudo apt-get install $need_pkg
else
echo "********"
exit 1
fi
;; ;;
fedora|centos|rhel) fedora|centos|rhel)
read -p "would you like to install the needed tools ? (y/n) " ans read -p "would you like to install the needed tools ? (y/n) " ans

View File

@ -47,8 +47,6 @@ if [ -n "$PKG_URL" ]; then
fi fi
DL="yes" DL="yes"
$SCRIPTS/checkdeps get
rm -f $STAMP rm -f $STAMP
printf "%${BUILD_INDENT}c ${boldcyan}GET${endcolor} $1\n" ' '>&$SILENT_OUT printf "%${BUILD_INDENT}c ${boldcyan}GET${endcolor} $1\n" ' '>&$SILENT_OUT

View File

@ -22,7 +22,7 @@
show_config show_config
$SCRIPTS/checkdeps build $SCRIPTS/checkdeps
$SCRIPTS/build toolchain $SCRIPTS/build toolchain
$SCRIPTS/build squashfs:host $SCRIPTS/build squashfs:host
$SCRIPTS/build fakeroot:host $SCRIPTS/build fakeroot:host