source: scripts/fetch/eglibc.sh@ b39617b

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

Updated eglibc fetch script

  • Property mode set to 100755
File size: 2.7 KB
RevLine 
[aa81e76]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
[167f981]18# Clear out old Directory
19#
20rm -rf ~/tmp
21
[aa81e76]22# Get Current Eglibc from SVN
23#
24install -d ~/tmp
25cd ~/tmp
26FIXEDVERSION=$(echo ${VERSION} | sed -e 's/\./_/g')
[a689767]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}
[aa81e76]30
31# Customize the version string, so we know it's patched
32#
33cd ~/tmp/eglibc-${SOURCEVERSION}
[a689767]34DL_DATE=$(date +%Y%m%d)
35echo "#define DL_DATE \"${DL_DATE}\"" >> libc/version.h
36echo "#define DL_REVISION \"${DL_REVISION}\"" >> libc/version.h
[aa81e76]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
[a689767]38sed -i "s@Compiled by GNU CC version@Revision # \"DL_REVISION\".\\\\n\\\\\\nCompiled by GNU CC version@" libc/csu/version.c
[aa81e76]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
[a689767]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
[aa81e76]41
42# Remove Files not needed
43#
[167f981]44cd ~/tmp/eglibc-${SOURCEVERSION}
[aa81e76]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#
[167f981]55cd ~/tmp/eglibc-${SOURCEVERSION}
[aa81e76]56echo "Updating Glibc configure files..."
57find . -name configure -exec touch {} \;
58
59# Compress
60#
[167f981]61cd ~/tmp/eglibc-${SOURCEVERSION}
[aa81e76]62echo "Creating Tarball for Eglibc Ports ${SOURCEVERSION}...."
[a689767]63tar cjf ~/public_html/eglibc-ports-${SOURCEVERSION}-${DL_DATE}-r${DL_REVISION}.tar.bz2 ports
[aa81e76]64rm -rf ports
65echo "Creating Tarball for Eglibc Linuxthreads ${SOURCEVERSION}...."
[a689767]66tar cjf ~/public_html/eglibc-linuxthreads-${SOURCEVERSION}-${DL_DATE}-r${DL_REVISION}.tar.bz2 linuxthreads
[aa81e76]67rm -rf linuxthreads
68echo "Creating Tarball for Eglibc LocaleDef ${SOURCEVERSION}...."
[a689767]69tar cjf ~/public_html/eglibc-localedef-${SOURCEVERSION}-${DL_DATE}-r${DL_REVISION}.tar.bz2 localedef
[aa81e76]70rm -rf localedef
71mv libc eglibc-${SOURCEVERSION}
72echo "Creating Tarball for Eglibc ${SOURCEVERSION}...."
[a689767]73tar cjf ~/public_html/eglibc-${SOURCEVERSION}-${DL_DATE}-r${DL_REVISION}.tar.bz2 eglibc-${SOURCEVERSION}
[aa81e76]74
75# Clean up Directores
76#
77cd ~/tmp
78rm -rf eglibc-${SOURCEVERSION}
79
Note: See TracBrowser for help on using the repository browser.