Initial commit of LFS notes and scripts.
This commit is contained in:
32
lfs-scripts/ninja.sh
Normal file
32
lfs-scripts/ninja.sh
Normal file
@@ -0,0 +1,32 @@
|
||||
# Set the package we're building.
|
||||
package="ninja-1.12.1"
|
||||
extension=".tar.gz"
|
||||
|
||||
# Decompress the source.
|
||||
echo "Unpacking ${package}${extension} ..."
|
||||
tar xvf ${package}${extension}
|
||||
|
||||
# Enter the unpacked sources.
|
||||
echo "Entering ${package} directory ..."
|
||||
cd ${package}
|
||||
|
||||
# LFS commands.
|
||||
export NINJAJOBS=4
|
||||
sed -i '/int Guess/a \
|
||||
int j = 0;\
|
||||
char* jobs = getenv( "NINJAJOBS" );\
|
||||
if ( jobs != NULL ) j = atoi( jobs );\
|
||||
if ( j > 0 ) return j;\
|
||||
' src/ninja.cc
|
||||
python3 configure.py --bootstrap
|
||||
install -vm755 ninja /usr/bin/
|
||||
install -vDm644 misc/bash-completion /usr/share/bash-completion/completions/ninja
|
||||
install -vDm644 misc/zsh-completion /usr/share/zsh/site-functions/_ninja
|
||||
|
||||
# Exit sources directory.
|
||||
echo "Exiting ${package} directory ..."
|
||||
cd ..
|
||||
|
||||
# Remove the directory of source files.
|
||||
echo "Removing ${package} directory ..."
|
||||
rm -rf ${package}
|
||||
Reference in New Issue
Block a user