source: scripts/patch/binutils-patch.sh@ 0d9eda9

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 0d9eda9 was c94176e, checked in by Jim Gifford <clfs@…>, 16 years ago

Changed email address

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