[aa81e76] | 1 | #!/bin/bash
|
---|
| 2 | # Create a Eglibc Tarball
|
---|
| 3 |
|
---|
| 4 | # Get Version #
|
---|
| 5 | #
|
---|
| 6 | VERSION=$1
|
---|
| 7 | SOURCEVERSION=$2
|
---|
| 8 |
|
---|
| 9 | # Check Input
|
---|
| 10 | #
|
---|
| 11 | if [ "${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
|
---|
| 16 | fi
|
---|
| 17 |
|
---|
| 18 | # Get Current Eglibc from SVN
|
---|
| 19 | #
|
---|
| 20 | install -d ~/tmp
|
---|
| 21 | cd ~/tmp
|
---|
| 22 | FIXEDVERSION=$(echo ${VERSION} | sed -e 's/\./_/g')
|
---|
| 23 | echo "Retreiving from SVN eglibc-${SOURCEVERSION}..."
|
---|
| 24 | svn export svn://svn.eglibc.org/branches/eglibc-${FIXEDVERSION} eglibc-${SOURCEVERSION}
|
---|
| 25 |
|
---|
| 26 | # Customize the version string, so we know it's patched
|
---|
| 27 | #
|
---|
| 28 | cd ~/tmp/eglibc-${SOURCEVERSION}
|
---|
| 29 | DATE_STAMP=$(date +%Y%m%d)
|
---|
| 30 | echo "#define DL_DATE \"${DATE_STAMP}\"" >> libc/version.h
|
---|
| 31 | sed -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
|
---|
| 32 | sed -i "s@static const char __libc_release@static const char __libc_dl_date[] = DL_DATE;\nstatic const char __libc_release@" libc/csu/version.c
|
---|
| 33 |
|
---|
| 34 | # Remove Files not needed
|
---|
| 35 | #
|
---|
| 36 | FILE_LIST=".cvsignore"
|
---|
| 37 | for files in ${FILE_LIST}; do
|
---|
| 38 | REMOVE=$(find * -name ${files})
|
---|
| 39 | for file in $REMOVE; do
|
---|
| 40 | rm -f ${file}
|
---|
| 41 | done
|
---|
| 42 | done
|
---|
| 43 |
|
---|
| 44 | # Fix configuration files
|
---|
| 45 | #
|
---|
| 46 | echo "Updating Glibc configure files..."
|
---|
| 47 | find . -name configure -exec touch {} \;
|
---|
| 48 |
|
---|
| 49 | # Compress
|
---|
| 50 | #
|
---|
| 51 | echo "Creating Tarball for Eglibc Ports ${SOURCEVERSION}...."
|
---|
| 52 | tar cjf ~/public_html/eglibc-ports-${SOURCEVERSION}.tar.bz2 ports
|
---|
| 53 | rm -rf ports
|
---|
| 54 | echo "Creating Tarball for Eglibc Linuxthreads ${SOURCEVERSION}...."
|
---|
| 55 | tar cjf ~/public_html/eglibc-linuxthreads-${SOURCEVERSION}.tar.bz2 linuxthreads
|
---|
| 56 | rm -rf linuxthreads
|
---|
| 57 | echo "Creating Tarball for Eglibc LocaleDef ${SOURCEVERSION}...."
|
---|
| 58 | tar cjf ~/public_html/eglibc-localedef-${SOURCEVERSION}.tar.bz2 localedef
|
---|
| 59 | rm -rf localedef
|
---|
| 60 | mv libc eglibc-${SOURCEVERSION}
|
---|
| 61 | echo "Creating Tarball for Eglibc ${SOURCEVERSION}...."
|
---|
| 62 | tar cjf ~/public_html/eglibc-${SOURCEVERSION}.tar.bz2 eglibc-${SOURCEVERSION}
|
---|
| 63 |
|
---|
| 64 | # Clean up Directores
|
---|
| 65 | #
|
---|
| 66 | cd ~/tmp
|
---|
| 67 | rm -rf eglibc-${SOURCEVERSION}
|
---|
| 68 |
|
---|