Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • scripts/patch/gcc-specs-patch.sh

    rd8a9d8b r0804c00  
    1616# Download GCC Source
    1717#
    18 cd ~/tmp
     18cd /usr/src
    1919if ! [ -e gcc-${VERSION}.tar.bz2  ]; then
    2020  wget ftp://gcc.gnu.org/pub/gcc/releases/gcc-${VERSION}/gcc-${VERSION}.tar.bz2
     
    2323# Cleanup Directory
    2424#
    25 cd ~/tmp
    2625rm -rf gcc-${VERSION} gcc-${VERSION}.orig
    2726tar xvf gcc-${VERSION}.tar.bz2
    2827cp -ar gcc-${VERSION} gcc-${VERSION}.orig
     28CURRENTDIR=$(pwd -P)
    2929
    3030# Modify the Data
    3131#
    32 cd ~/tmp/gcc-${VERSION}
     32cd /usr/src/gcc-${VERSION}
    3333for file in $(find gcc/config -name "*.h"); do
    3434  if [ "$(echo ${file} | grep -c bsd)" = "0" ]; then
     
    5353# Create Patch
    5454#
    55 cd ~/tmp
    56 install -d ~/patches
    57 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > ~/patches/gcc-${VERSION}-specs-x.patch
    58 echo "Date: `date +%m-%d-%Y`" >> ~/patches/gcc-${VERSION}-specs-x.patch
    59 echo "Initial Package Version: ${VERSION}" >> ~/patches/gcc-${VERSION}-specs-x.patch
    60 echo "Origin: Idea originally developed by Ryan Oliver and Greg Schafer for" >> ~/patches/gcc-${VERSION}-specs-x.patch
    61 echo "        the Pure LFS project." >> ~/patches/gcc-${VERSION}-specs-x.patch
    62 echo "Upstream Status: Not Applied" >> ~/patches/gcc-${VERSION}-specs-x.patch
    63 echo "Description: This patch modifies the location of the dynamic linker for gcc-${VERSION}." >> ~/patches/gcc-${VERSION}-specs-x.patch
    64 echo "" >> ~/patches/gcc-${VERSION}-specs-x.patch
    65 diff -Naur gcc-${VERSION}.orig gcc-${VERSION} >> ~/patches/gcc-${VERSION}-specs-x.patch
     55cd /usr/src
     56echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > gcc-${VERSION}-specs-x.patch
     57echo "Date: `date +%m-%d-%Y`" >> gcc-${VERSION}-specs-x.patch
     58echo "Initial Package Version: ${VERSION}" >> gcc-${VERSION}-specs-x.patch
     59echo "Origin: Idea originally developed by Ryan Oliver and Greg Schafer for" >> gcc-${VERSION}-specs-x.patch
     60echo "        the Pure LFS project." >> gcc-${VERSION}-specs-x.patch
     61echo "Upstream Status: Not Applied" >> gcc-${VERSION}-specs-x.patch
     62echo "Description: This patch modifies the location of the dynamic linker for gcc-${VERSION}." >> gcc-${VERSION}-specs-x.patch
     63echo "" >> gcc-${VERSION}-specs-x.patch
     64diff -Naur gcc-${VERSION}.orig gcc-${VERSION} >> gcc-${VERSION}-specs-x.patch
    6665
    6766# Cleanup Directory
    6867#
    69 cd ~/tmp
    7068rm -rf gcc-${VERSION} gcc-${VERSION}.orig
    7169tar xvf gcc-${VERSION}.tar.bz2
    7270cp -ar gcc-${VERSION} gcc-${VERSION}.orig
     71CURRENTDIR=$(pwd -P)
    7372
    7473# Modify the Data
    7574#
    76 cd ~/tmp/gcc-${VERSION}
     75cd /usr/src/gcc-${VERSION}
    7776for file in $(find gcc/config -name "*.h"); do
    7877  if [ "$(echo ${file} | grep -c bsd)" = "0" ]; then
     
    9998# Create Patch
    10099#
    101 cd ~/tmp
    102 install -d ~/patches
    103 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > ~/patches/gcc-${VERSION}-pure64_specs-x.patch
    104 echo "Date: `date +%m-%d-%Y`" >> ~/patches/gcc-${VERSION}-pure64_specs-x.patch
    105 echo "Initial Package Version: ${VERSION}" >> ~/patches/gcc-${VERSION}-pure64_specs-x.patch
    106 echo "Origin: Idea originally developed by Ryan Oliver and Greg Schafer for" >> ~/patches/gcc-${VERSION}-pure64_specs-x.patch
    107 echo "        the Pure LFS project." >> ~/patches/gcc-${VERSION}-pure64_specs-x.patch
    108 echo "Upstream Status: Not Applied" >> ~/patches/gcc-${VERSION}-pure64_specs-x.patch
    109 echo "Description: This patch modifies the location of the dynamic linker for gcc-${VERSION}." >> ~/patches/gcc-${VERSION}-pure64_specs-x.patch
    110 echo "" >> ~/patches/gcc-${VERSION}-pure64_specs-x.patch
    111 diff -Naur gcc-${VERSION}.orig gcc-${VERSION} >> ~/patches/gcc-${VERSION}-pure64_specs-x.patch
     100cd /usr/src
     101echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > gcc-${VERSION}-pure64_specs-x.patch
     102echo "Date: `date +%m-%d-%Y`" >> gcc-${VERSION}-pure64_specs-x.patch
     103echo "Initial Package Version: ${VERSION}" >> gcc-${VERSION}-pure64_specs-x.patch
     104echo "Origin: Idea originally developed by Ryan Oliver and Greg Schafer for" >> gcc-${VERSION}-pure64_specs-x.patch
     105echo "        the Pure LFS project." >> gcc-${VERSION}-pure64_specs-x.patch
     106echo "Upstream Status: Not Applied" >> gcc-${VERSION}-pure64_specs-x.patch
     107echo "Description: This patch modifies the location of the dynamic linker for gcc-${VERSION}." >> gcc-${VERSION}-pure64_specs-x.patch
     108echo "" >> gcc-${VERSION}-pure64_specs-x.patch
     109diff -Naur gcc-${VERSION}.orig gcc-${VERSION} >> gcc-${VERSION}-pure64_specs-x.patch
    112110
    113111# Cleanup Directory
    114112#
    115 cd ~/tmp
    116113rm -rf gcc-${VERSION} gcc-${VERSION}.orig
    117114tar xvf gcc-${VERSION}.tar.bz2
     
    121118# Modify the Data
    122119#
    123 cd ~/tmp/gcc-${VERSION}
     120cd /usr/src/gcc-${VERSION}
    124121for file in $(find gcc/config -name "*.h"); do
    125122  if [ "$(echo ${file} | grep -c bsd)" = "0" ]; then
     
    154151# Create Patch
    155152#
    156 cd ~/tmp
    157 install -d ~/patches
    158 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > ~/patches/gcc-${VERSION}-pure64-x.patch
    159 echo "Date: `date +%m-%d-%Y`" >> ~/patches/gcc-${VERSION}-pure64-x.patch
    160 echo "Initial Package Version: ${VERSION}" >> ~/patches/gcc-${VERSION}-pure64-x.patch
    161 echo "Origin: Idea originally developed by Ryan Oliver and Greg Schafer for" >> ~/patches/gcc-${VERSION}-pure64-x.patch
    162 echo "        the Pure LFS project." >> ~/patches/gcc-${VERSION}-pure64-x.patch
    163 echo "Upstream Status: Not Applied" >> ~/patches/gcc-${VERSION}-pure64-x.patch
    164 echo "Description: This patch modifies the location of the dynamic linker for gcc-${VERSION}." >> ~/patches/gcc-${VERSION}-pure64-x.patch
    165 echo "" >> ~/patches/gcc-${VERSION}-pure64-x.patch
    166 diff -Naur gcc-${VERSION}.orig gcc-${VERSION} >> ~/patches/gcc-${VERSION}-pure64-x.patch
     153cd /usr/src
     154echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > gcc-${VERSION}-pure64-x.patch
     155echo "Date: `date +%m-%d-%Y`" >> gcc-${VERSION}-pure64-x.patch
     156echo "Initial Package Version: ${VERSION}" >> gcc-${VERSION}-pure64-x.patch
     157echo "Origin: Idea originally developed by Ryan Oliver and Greg Schafer for" >> gcc-${VERSION}-pure64-x.patch
     158echo "        the Pure LFS project." >> gcc-${VERSION}-pure64-x.patch
     159echo "Upstream Status: Not Applied" >> gcc-${VERSION}-pure64-x.patch
     160echo "Description: This patch modifies the location of the dynamic linker for gcc-${VERSION}." >> gcc-${VERSION}-pure64-x.patch
     161echo "" >> gcc-${VERSION}-pure64-x.patch
     162diff -Naur gcc-${VERSION}.orig gcc-${VERSION} >> gcc-${VERSION}-pure64-x.patch
    167163
    168 echo "Created ~/patches/gcc-${VERSION}-specs-x.patch."
    169 echo "Created ~/patches/gcc-${VERSION}-pure64_specs-x.patch."
    170 echo "Created ~/patches/gcc-${VERSION}-pure64-x.patch."
    171 
    172 # Cleanup Directory
    173 #
    174 cd ~/tmp
    175 rm -rf gcc-${VERSION} gcc-${VERSION}.orig
     164echo "Created /usr/src/gcc-${VERSION}-specs-x.patch."
     165echo "Created /usr/src/gcc-${VERSION}-pure64_specs-x.patch."
     166echo "Created /usr/src/gcc-${VERSION}-pure64-x.patch."
Note: See TracChangeset for help on using the changeset viewer.