From 28e9694515de86824fc147af7aae14c58f8c29b1 Mon Sep 17 00:00:00 2001
From: Robert Nelson <robertcnelson@gmail.com>
Date: Thu, 31 May 2018 10:49:16 -0500
Subject: [PATCH] chroot: targets cleanup python building

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
---
 target/chroot/beagleboard.org-jessie-2gb.sh  | 12 ++------
 target/chroot/beagleboard.org-jessie.sh      | 32 ++++++++------------
 target/chroot/beagleboard.org-stretch-2gb.sh | 28 ++---------------
 target/chroot/beagleboard.org-stretch.sh     | 28 ++---------------
 target/chroot/machinekit-stretch.sh          | 16 ----------
 5 files changed, 18 insertions(+), 98 deletions(-)

diff --git a/target/chroot/beagleboard.org-jessie-2gb.sh b/target/chroot/beagleboard.org-jessie-2gb.sh
index 6fc53a239..f6d3a0abb 100755
--- a/target/chroot/beagleboard.org-jessie-2gb.sh
+++ b/target/chroot/beagleboard.org-jessie-2gb.sh
@@ -1,6 +1,6 @@
 #!/bin/sh -e
 #
-# Copyright (c) 2014-2016 Robert Nelson <robertcnelson@gmail.com>
+# Copyright (c) 2014-2018 Robert Nelson <robertcnelson@gmail.com>
 #
 # Permission is hereby granted, free of charge, to any person obtaining a copy
 # of this software and associated documentation files (the "Software"), to deal
@@ -292,19 +292,11 @@ install_git_repos () {
 	git_repo="https://github.com/ungureanuvladvictor/BBBlfs"
 	git_target_dir="/opt/source/BBBlfs"
 #	git_clone
-	if [ -f ${git_target_dir}/.git/config ] ; then
-		cd ${git_target_dir}/
-		if [ -f /usr/bin/make ] ; then
-			./autogen.sh
-			./configure
-			make
-		fi
-	fi
 
 	git_repo="https://github.com/StrawsonDesign/Robotics_Cape_Installer"
 	git_target_dir="/opt/source/Robotics_Cape_Installer"
 	git_branch="v0.3.4"
-	#git_clone_branch
+#	git_clone_branch
 
 	#beagle-tester
 	git_repo="https://github.com/jadonk/beagle-tester"
diff --git a/target/chroot/beagleboard.org-jessie.sh b/target/chroot/beagleboard.org-jessie.sh
index cfe2d2046..41de81fb1 100755
--- a/target/chroot/beagleboard.org-jessie.sh
+++ b/target/chroot/beagleboard.org-jessie.sh
@@ -292,14 +292,6 @@ install_git_repos () {
 	git_repo="https://github.com/ungureanuvladvictor/BBBlfs"
 	git_target_dir="/opt/source/BBBlfs"
 	git_clone
-	if [ -f ${git_target_dir}/.git/config ] ; then
-		cd ${git_target_dir}/
-		if [ -f /usr/bin/make ] ; then
-			./autogen.sh
-			./configure
-			make
-		fi
-	fi
 
 	git_repo="https://github.com/StrawsonDesign/Robotics_Cape_Installer"
 	git_target_dir="/opt/source/Robotics_Cape_Installer"
@@ -309,22 +301,22 @@ install_git_repos () {
 	git_repo="https://github.com/mcdeoliveira/rcpy"
 	git_target_dir="/opt/source/rcpy"
 	git_clone
-#	if [ -f ${git_target_dir}/.git/config ] ; then
-#		cd ${git_target_dir}/
-#		if [ -f /usr/bin/python3 ] && [ -f /usr/bin/easy_install ] ; then
-#			/usr/bin/python3 setup.py install
-#		fi
-#	fi
+	if [ -f ${git_target_dir}/.git/config ] ; then
+		cd ${git_target_dir}/
+		if [ -f /usr/bin/python3 ] ; then
+			/usr/bin/python3 setup.py install
+		fi
+	fi
 
 	git_repo="https://github.com/mcdeoliveira/pyctrl"
 	git_target_dir="/opt/source/pyctrl"
 	git_clone
-#	if [ -f ${git_target_dir}/.git/config ] ; then
-#		cd ${git_target_dir}/
-#		if [ -f /usr/bin/python3 ] && [ -f /usr/bin/easy_install ] ; then
-#			/usr/bin/python3 setup.py install
-#		fi
-#	fi
+	if [ -f ${git_target_dir}/.git/config ] ; then
+		cd ${git_target_dir}/
+		if [ -f /usr/bin/python3 ] ; then
+			/usr/bin/python3 setup.py install
+		fi
+	fi
 
 	git_repo="https://github.com/mvduin/py-uio"
 	git_target_dir="/opt/source/py-uio"
diff --git a/target/chroot/beagleboard.org-stretch-2gb.sh b/target/chroot/beagleboard.org-stretch-2gb.sh
index fade45908..501e007f7 100755
--- a/target/chroot/beagleboard.org-stretch-2gb.sh
+++ b/target/chroot/beagleboard.org-stretch-2gb.sh
@@ -287,34 +287,10 @@ install_git_repos () {
 	git_repo="https://github.com/beagleboard/bb.org-overlays"
 	git_target_dir="/opt/source/bb.org-overlays"
 #	git_clone
-	if [ -f ${git_target_dir}/.git/config ] ; then
-		cd ${git_target_dir}/
-		if [ ! "x${repo_rcnee_pkg_version}" = "x" ] ; then
-			is_kernel=$(echo ${repo_rcnee_pkg_version} | grep 3.8.13 || true)
-			if [ "x${is_kernel}" = "x" ] ; then
-				if [ -f /usr/bin/make ] ; then
-					if [ ! -f /lib/firmware/BB-ADC-00A0.dtbo ] ; then
-						make
-						make install
-						make clean
-					fi
-					update-initramfs -u -k ${repo_rcnee_pkg_version}
-				fi
-			fi
-		fi
-	fi
 
 	git_repo="https://github.com/ungureanuvladvictor/BBBlfs"
 	git_target_dir="/opt/source/BBBlfs"
 #	git_clone
-	if [ -f ${git_target_dir}/.git/config ] ; then
-		cd ${git_target_dir}/
-		if [ -f /usr/bin/make ] ; then
-			./autogen.sh
-			./configure
-			make
-		fi
-	fi
 
 	git_repo="https://github.com/StrawsonDesign/Robotics_Cape_Installer"
 	git_target_dir="/opt/source/Robotics_Cape_Installer"
@@ -325,7 +301,7 @@ install_git_repos () {
 #	git_clone
 	if [ -f ${git_target_dir}/.git/config ] ; then
 		cd ${git_target_dir}/
-		if [ -f /usr/bin/python3 ] && [ -f /usr/bin/easy_install ] ; then
+		if [ -f /usr/bin/python3 ] ; then
 			/usr/bin/python3 setup.py install
 		fi
 	fi
@@ -335,7 +311,7 @@ install_git_repos () {
 #	git_clone
 	if [ -f ${git_target_dir}/.git/config ] ; then
 		cd ${git_target_dir}/
-		if [ -f /usr/bin/python3 ] && [ -f /usr/bin/easy_install ] ; then
+		if [ -f /usr/bin/python3 ] ; then
 			/usr/bin/python3 setup.py install
 		fi
 	fi
diff --git a/target/chroot/beagleboard.org-stretch.sh b/target/chroot/beagleboard.org-stretch.sh
index d4747b07e..d7836ed13 100755
--- a/target/chroot/beagleboard.org-stretch.sh
+++ b/target/chroot/beagleboard.org-stretch.sh
@@ -287,34 +287,10 @@ install_git_repos () {
 	git_repo="https://github.com/beagleboard/bb.org-overlays"
 	git_target_dir="/opt/source/bb.org-overlays"
 	git_clone
-	if [ -f ${git_target_dir}/.git/config ] ; then
-		cd ${git_target_dir}/
-		if [ ! "x${repo_rcnee_pkg_version}" = "x" ] ; then
-			is_kernel=$(echo ${repo_rcnee_pkg_version} | grep 3.8.13 || true)
-			if [ "x${is_kernel}" = "x" ] ; then
-				if [ -f /usr/bin/make ] ; then
-					if [ ! -f /lib/firmware/BB-ADC-00A0.dtbo ] ; then
-						make
-						make install
-						make clean
-					fi
-					update-initramfs -u -k ${repo_rcnee_pkg_version}
-				fi
-			fi
-		fi
-	fi
 
 	git_repo="https://github.com/ungureanuvladvictor/BBBlfs"
 	git_target_dir="/opt/source/BBBlfs"
 	git_clone
-	if [ -f ${git_target_dir}/.git/config ] ; then
-		cd ${git_target_dir}/
-		if [ -f /usr/bin/make ] ; then
-			./autogen.sh
-			./configure
-			make
-		fi
-	fi
 
 	git_repo="https://github.com/StrawsonDesign/Robotics_Cape_Installer"
 	git_target_dir="/opt/source/Robotics_Cape_Installer"
@@ -325,7 +301,7 @@ install_git_repos () {
 	git_clone
 	if [ -f ${git_target_dir}/.git/config ] ; then
 		cd ${git_target_dir}/
-		if [ -f /usr/bin/python3 ] && [ -f /usr/bin/easy_install ] ; then
+		if [ -f /usr/bin/python3 ] ; then
 			/usr/bin/python3 setup.py install
 		fi
 	fi
@@ -335,7 +311,7 @@ install_git_repos () {
 	git_clone
 	if [ -f ${git_target_dir}/.git/config ] ; then
 		cd ${git_target_dir}/
-		if [ -f /usr/bin/python3 ] && [ -f /usr/bin/easy_install ] ; then
+		if [ -f /usr/bin/python3 ] ; then
 			/usr/bin/python3 setup.py install
 		fi
 	fi
diff --git a/target/chroot/machinekit-stretch.sh b/target/chroot/machinekit-stretch.sh
index d1c57c1c7..a88301188 100755
--- a/target/chroot/machinekit-stretch.sh
+++ b/target/chroot/machinekit-stretch.sh
@@ -305,22 +305,6 @@ install_git_repos () {
 	git_repo="https://github.com/beagleboard/bb.org-overlays"
 	git_target_dir="/opt/source/bb.org-overlays"
 	git_clone
-	if [ -f ${git_target_dir}/.git/config ] ; then
-		cd ${git_target_dir}/
-		if [ ! "x${repo_rcnee_pkg_version}" = "x" ] ; then
-			is_kernel=$(echo ${repo_rcnee_pkg_version} | grep 3.8.13 || true)
-			if [ "x${is_kernel}" = "x" ] ; then
-				if [ -f /usr/bin/make ] ; then
-					if [ ! -f /lib/firmware/BB-ADC-00A0.dtbo ] ; then
-						make
-						make install
-						make clean
-					fi
-					update-initramfs -u -k ${repo_rcnee_pkg_version}
-				fi
-			fi
-		fi
-	fi
 
 	git_repo="https://github.com/StrawsonDesign/Robotics_Cape_Installer"
 	git_target_dir="/opt/source/Robotics_Cape_Installer"
-- 
GitLab