Last active
August 29, 2015 14:18
-
-
Save kbinani/62c2d448dda5b237d85d to your computer and use it in GitHub Desktop.
build_gcc_rpm_package.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# git clone https://github.com/ngyuki/checkinstall.git | |
# cd checkinstall | |
# make | |
# sudo make install | |
# GCC_VERSION=4.9.2 | |
# wget http://ftp.gnu.org/gnu/gcc/gcc-$GCC_VERSION/gcc-$GCC_VERSION.tar.gz || { echo "Failed downloading tarball" && exit 1; } | |
# tar zxf gcc-$GCC_VERSION.tar.gz | |
# cd gcc-$GCC_VERSION | |
which checkinstall >/dev/null 2>&1 || { echo "cehckinstall is not installed" && exit 1; } | |
sudo mkdir -p /root/rpmbuild/SOURCES | |
./contrib/download_prerequisites || { echo "Failed downloading prerequisites" && exit 1; } | |
./configure --disable-multilib --prefix=/usr/local --libdir=/usr/local/lib64 || { echo "Failed configuring" && exit 1; } | |
make || { echo "Failed 'make'ing" && exit 1; } | |
sudo make install || { echo "Failed 'sudo make install'" && exit 1; } | |
sudo $(which checkinstall) --type=rpm --install=no --default --pkgname=gcc | |
sudo cp $(sudo find /root/rpmbuild/RPMS -name "gcc-$GCC_VERSION*.rpm" | head -1) ./ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment