source: scripts/fetch/eglibc.sh @ a689767

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since a689767 was a689767, checked in by Jim Gifford <clfs@…>, 15 years ago

Updated eglibc fetch script

  • Property mode set to 100755
File size: 2.7 KB
Line 
1#!/bin/bash
2# Create a Eglibc Tarball
3
4# Get Version #
5#
6VERSION=$1
7SOURCEVERSION=$2
8
9# Check Input
10#
11if [ "${VERSION}" = "" -o "${SOURCEVERSION}" = "" ]; then
12  echo "$0 - Eglibc_Version"
13  echo "This will Create a Tarball for Eglibc Eglibc_Series Eglibc_Version"
14  echo "Example $0 2.19 2.19.1"
15  exit 255
16fi
17
18# Clear out old Directory
19#
20rm -rf ~/tmp
21
22# Get Current Eglibc from SVN
23#
24install -d ~/tmp
25cd ~/tmp
26FIXEDVERSION=$(echo ${VERSION} | sed -e 's/\./_/g')
27DL_REVISION=$(svn info svn://svn.eglibc.org/branches/eglibc-${FIXEDVERSION} | grep -i "Last Changed Rev" | cut -f2 -d: | sed -e 's/ //g')
28echo "Retreiving Revision #${DL_REVISION} from SVN eglibc-${SOURCEVERSION}..."
29svn export -r ${DL_REVISION} svn://svn.eglibc.org/branches/eglibc-${FIXEDVERSION} eglibc-${SOURCEVERSION}
30
31# Customize the version string, so we know it's patched
32#
33cd ~/tmp/eglibc-${SOURCEVERSION}
34DL_DATE=$(date +%Y%m%d)
35echo "#define DL_DATE \"${DL_DATE}\"" >> libc/version.h
36echo "#define DL_REVISION \"${DL_REVISION}\"" >> libc/version.h
37sed -i "s@Compiled by GNU CC version@Built for Cross-LFS.\\\\n\\\\\nRetrieved on \"DL_DATE\".\\\\n\\\\\\nCompiled by GNU CC version@" libc/csu/version.c
38sed -i "s@Compiled by GNU CC version@Revision # \"DL_REVISION\".\\\\n\\\\\\nCompiled by GNU CC version@" libc/csu/version.c
39sed -i "s@static const char __libc_release@static const char __libc_dl_date[] = DL_DATE;\nstatic const char __libc_release@" libc/csu/version.c
40sed -i "s@static const char __libc_release@static const char __libc_dl_revision[] = DL_REVISION;\nstatic const char __libc_release@" libc/csu/version.c
41
42# Remove Files not needed
43#
44cd ~/tmp/eglibc-${SOURCEVERSION}
45FILE_LIST=".cvsignore"
46for files in ${FILE_LIST}; do
47  REMOVE=$(find * -name ${files})
48  for file in $REMOVE; do
49    rm -f ${file}
50  done
51done
52
53# Fix configuration files
54#
55cd ~/tmp/eglibc-${SOURCEVERSION}
56echo "Updating Glibc configure files..."
57find . -name configure -exec touch {} \;
58
59# Compress
60#
61cd ~/tmp/eglibc-${SOURCEVERSION}
62echo "Creating Tarball for Eglibc Ports ${SOURCEVERSION}...."
63tar cjf ~/public_html/eglibc-ports-${SOURCEVERSION}-${DL_DATE}-r${DL_REVISION}.tar.bz2 ports
64rm -rf ports
65echo "Creating Tarball for Eglibc Linuxthreads ${SOURCEVERSION}...."
66tar cjf ~/public_html/eglibc-linuxthreads-${SOURCEVERSION}-${DL_DATE}-r${DL_REVISION}.tar.bz2 linuxthreads
67rm -rf linuxthreads
68echo "Creating Tarball for Eglibc LocaleDef ${SOURCEVERSION}...."
69tar cjf ~/public_html/eglibc-localedef-${SOURCEVERSION}-${DL_DATE}-r${DL_REVISION}.tar.bz2 localedef
70rm -rf localedef
71mv libc eglibc-${SOURCEVERSION}
72echo "Creating Tarball for Eglibc ${SOURCEVERSION}...."
73tar cjf ~/public_html/eglibc-${SOURCEVERSION}-${DL_DATE}-r${DL_REVISION}.tar.bz2 eglibc-${SOURCEVERSION}
74
75# Clean up Directores
76#
77cd ~/tmp
78rm -rf eglibc-${SOURCEVERSION}
79
Note: See TracBrowser for help on using the repository browser.