source: scripts/patch/binutils-patch.sh@ 630a58e

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 630a58e was 06fb515, checked in by Jim Gifford <clfs@…>, 16 years ago

Updated Linux to 2.6.28.4

  • Property mode set to 100755
File size: 2.6 KB
Line 
1#!/bin/bash
2# Create a Binutils Patch
3
4# Get Version #
5#
6VERSION=$1
7SOURCEVERSION=$2
8
9# Check Input
10#
11if [ "${VERSION}" = "" ]; then
12 echo "$0 - Binutils_Version"
13 echo "This will Create a Patch for Binutils Binutils_Series Binutils_Version"
14 exit 255
15fi
16
17#
18# Download Binutils Source
19#
20cd /usr/src
21if ! [ -e binutils-${SOURCEVERSION}.tar.bz2 ]; then
22 wget ftp://ftp.gnu.org/gnu/binutils/binutils-${SOURCEVERSION}.tar.bz2
23fi
24
25# Cleanup Directory
26#
27rm -rf binutils-${SOURCEVERSION} binutils-${SOURCEVERSION}.orig
28tar xvf binutils-${SOURCEVERSION}.tar.bz2
29mv binutils-${SOURCEVERSION} binutils-${SOURCEVERSION}.orig
30CURRENTDIR=$(pwd -P)
31
32# Get Current Updates from CVS
33#
34cd /usr/src
35FIXEDVERSION=$(echo ${VERSION} | sed -e 's/\./_/g')
36cvs -z 9 -d :pserver:anoncvs@sourceware.org:/cvs/src export -rbinutils-${FIXEDVERSION}-branch binutils
37mv src binutils-${SOURCEVERSION}
38
39# Cleanup
40#
41DIRS="binutils-${SOURCEVERSION} binutils-${SOURCEVERSION}.orig"
42for DIRECTORY in ${DIRS}; do
43 cd /usr/src/${DIRECTORY}
44 FILE_LIST=".cvsignore *.gmo"
45 for files in ${FILE_LIST}; do
46 REMOVE=$(find * -name ${files})
47 for file in $REMOVE; do
48 rm -f ${file}
49 done
50 done
51
52 REMOVE=".cvsignore MAINTAINERS COPYING.LIBGLOSS COPYING.NEWLIB README-maintainer-mode depcomp
53 ChangeLog compile ltgcc.m4 lt~obsolete.m4 etc/ChangeLog etc/add-log.el etc/add-log.vi"
54 for file in $REMOVE; do
55 rm -f ${file}
56 done
57 cd ..
58done
59cd /usr/src/binutils-${SOURCEVERSION}
60rm -f /usr/src/binutils-${SOURCEVERSION}.orig/md5.sum
61
62# Make Binutils a Release
63#
64cd /usr/src/binutils-${SOURCEVERSION}
65sed -i 's/# RELEASE=y/RELEASE=y/g' bfd/Makefile.am
66sed -i 's/# RELEASE=y/RELEASE=y/g' bfd/Makefile.in
67
68# Create Patch
69#
70cd /usr/src
71echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > binutils-${SOURCEVERSION}-branch_update-x.patch
72echo "Date: `date +%m-%d-%Y`" >> binutils-${SOURCEVERSION}-branch_update-x.patch
73echo "Initial Package Version: ${SOURCEVERSION}" >> binutils-${SOURCEVERSION}-branch_update-x.patch
74echo "Origin: Upstream" >> binutils-${SOURCEVERSION}-branch_update-x.patch
75echo "Upstream Status: Applied" >> binutils-${SOURCEVERSION}-branch_update-x.patch
76echo "Description: This is a branch update for binutils-${SOURCEVERSION}, and should be" >> binutils-${SOURCEVERSION}-branch_update-x.patch
77echo " rechecked periodically." >> binutils-${SOURCEVERSION}-branch_update-x.patch
78echo "" >> binutils-${SOURCEVERSION}-branch_update-x.patch
79diff -Naur binutils-${SOURCEVERSION}.orig binutils-${SOURCEVERSION} >> binutils-${SOURCEVERSION}-branch_update-x.patch
80echo "Created /usr/src/binutils-${SOURCEVERSION}-branch_update-x.patch."
Note: See TracBrowser for help on using the repository browser.