Merge pull request #175 from danelsan/master
This change for Python and Vim
This commit is contained in:
		
						commit
						e132ed6f17
					
				
							
								
								
									
										5
									
								
								src/minimal_overlay/bundles/python/.config
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								src/minimal_overlay/bundles/python/.config
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,5 @@
 | 
				
			|||||||
 | 
					# You can find the latest python archives here:
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					#   https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					PYTHON_SOURCE_URL=https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz
 | 
				
			||||||
							
								
								
									
										38
									
								
								src/minimal_overlay/bundles/python/01_get.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										38
									
								
								src/minimal_overlay/bundles/python/01_get.sh
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,38 @@
 | 
				
			|||||||
 | 
					#!/bin/sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					set -e
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					. ../../common.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Read the common configuration properties.
 | 
				
			||||||
 | 
					DOWNLOAD_URL=`read_property PYTHON_SOURCE_URL`
 | 
				
			||||||
 | 
					USE_LOCAL_SOURCE=`read_property USE_LOCAL_SOURCE`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Grab everything after the last '/' character.
 | 
				
			||||||
 | 
					ARCHIVE_FILE=${DOWNLOAD_URL##*/}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [ "$USE_LOCAL_SOURCE" = "true" -a ! -f $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE  ] ; then
 | 
				
			||||||
 | 
					  echo "Source bundle $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE is missing and will be downloaded."
 | 
				
			||||||
 | 
					  USE_LOCAL_SOURCE="false"
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cd $MAIN_SRC_DIR/source/overlay
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [ ! "$USE_LOCAL_SOURCE" = "true" ] ; then
 | 
				
			||||||
 | 
					  # Downloading vim source bundle file. The '-c' option allows the download to resume.
 | 
				
			||||||
 | 
					  echo "Downloading PYTHON source bundle from $DOWNLOAD_URL"
 | 
				
			||||||
 | 
					  wget -c $DOWNLOAD_URL
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
 | 
					  echo "Using local PYTHON source bundle $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE"
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Delete folder with previously extracted vim.
 | 
				
			||||||
 | 
					echo "Removing PYTHON work area. This may take a while."
 | 
				
			||||||
 | 
					rm -rf $WORK_DIR/overlay/$BUNDLE_NAME
 | 
				
			||||||
 | 
					mkdir $WORK_DIR/overlay/$BUNDLE_NAME
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Extract vim to folder 'work/overlay/vim'.
 | 
				
			||||||
 | 
					# Full path will be something like 'work/overlay/vim/vim-8.0.1298'.
 | 
				
			||||||
 | 
					tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/$BUNDLE_NAME
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cd $SRC_DIR
 | 
				
			||||||
							
								
								
									
										45
									
								
								src/minimal_overlay/bundles/python/02_build.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										45
									
								
								src/minimal_overlay/bundles/python/02_build.sh
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,45 @@
 | 
				
			|||||||
 | 
					#!/bin/sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					set -e
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					. ../../common.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cd $WORK_DIR/overlay/$BUNDLE_NAME
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Change to the vim source directory which ls finds, e.g. 'Pythno-3.7.0'.
 | 
				
			||||||
 | 
					cd $(ls -d Python-*)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [ -f Makefile ] ; then
 | 
				
			||||||
 | 
					  echo "Preparing '$BUNDLE_NAME' work area. This may take a while."
 | 
				
			||||||
 | 
					  make -j $NUM_JOBS clean
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
 | 
					  echo "The clean phase for '$BUNDLE_NAME' has been skipped."
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					rm -rf $DEST_DIR
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					echo "Configuring '$BUNDLE_NAME'."
 | 
				
			||||||
 | 
					CFLAGS="$CFLAGS" ./configure \
 | 
				
			||||||
 | 
					  --prefix=/usr CXX="/usr/bin/g++" --enable-optimizations
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					echo "Building '$BUNDLE_NAME'."
 | 
				
			||||||
 | 
					make -j $NUM_JOBS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					echo "Installing '$BUNDLE_NAME'."
 | 
				
			||||||
 | 
					make -j $NUM_JOBS install DESTDIR=$DEST_DIR
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					echo "Generating '$BUNDLE_NAME'."
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#echo "Reducing '$BUNDLE_NAME' size."
 | 
				
			||||||
 | 
					#set +e
 | 
				
			||||||
 | 
					#strip -g $DEST_DIR/usr/bin/*
 | 
				
			||||||
 | 
					#set -e
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# With '--remove-destination' all possibly existing soft links in
 | 
				
			||||||
 | 
					# '$OVERLAY_ROOTFS' will be overwritten correctly.
 | 
				
			||||||
 | 
					cp -r --remove-destination $DEST_DIR/* \
 | 
				
			||||||
 | 
					  $OVERLAY_ROOTFS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					echo "Bundle '$BUNDLE_NAME' has been installed."
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cd $SRC_DIR
 | 
				
			||||||
							
								
								
									
										10
									
								
								src/minimal_overlay/bundles/python/bundle.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										10
									
								
								src/minimal_overlay/bundles/python/bundle.sh
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,10 @@
 | 
				
			|||||||
 | 
					#!/bin/sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					set -e
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					. ../../common.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					./01_get.sh
 | 
				
			||||||
 | 
					./02_build.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cd $SRC_DIR
 | 
				
			||||||
							
								
								
									
										2
									
								
								src/minimal_overlay/bundles/python/bundle_deps
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								src/minimal_overlay/bundles/python/bundle_deps
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,2 @@
 | 
				
			|||||||
 | 
					glibc_libpthread
 | 
				
			||||||
 | 
					glibc_libutil
 | 
				
			||||||
@ -42,7 +42,6 @@ export CONF_OPT_CSCOPE='--enable-cscope'
 | 
				
			|||||||
export CONF_OPT_MULTIBYTE='--enable-multibyte'
 | 
					export CONF_OPT_MULTIBYTE='--enable-multibyte'
 | 
				
			||||||
export CONF_OPT_FEAT='--with-features=huge'
 | 
					export CONF_OPT_FEAT='--with-features=huge'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
echo "Building '$BUNDLE_NAME'."
 | 
					echo "Building '$BUNDLE_NAME'."
 | 
				
			||||||
make -j $NUM_JOBS
 | 
					make -j $NUM_JOBS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user