|
|
0049f9b |
#!/bin/bash
|
|
|
0049f9b |
# Author: Carlos O'Donell <carlos@redhat.com>
|
|
|
0049f9b |
#
|
|
|
0049f9b |
# Create a temporary directory into which we build the glibc32 source rpm.
|
|
|
0049f9b |
# The source rpm is nothing more than the binary rpms for the 32-bit
|
|
|
0049f9b |
# packages, along with the source rpm, but repackaged as a 64-bit package.
|
|
|
0049f9b |
#
|
|
|
0049f9b |
set -e
|
|
|
0049f9b |
set -x
|
|
|
0049f9b |
# Fail if the user is using local tmp for something else.
|
|
|
0049f9b |
# Please delete your local tmp directory and re-runt the script.
|
|
|
0049f9b |
mkdir tmp
|
|
|
0049f9b |
mv *.rpm tmp
|
|
|
0049f9b |
pushd tmp
|
|
|
0049f9b |
# Compute the version to use from the filename.
|
|
|
0049f9b |
version=`ls *.i686.rpm | head -1 | sed -e 's,^.*[[:alpha:]]-,,g' -e 's,\.i686\.rpm,,g'`
|
|
|
0049f9b |
# Move the rpms into the right directories.
|
|
|
0049f9b |
mkdir glibc32-${version}
|
|
|
0049f9b |
mkdir glibc32-${version}/x86_64
|
|
|
0049f9b |
mv glibc-*${version}.i686* glibc32-${version}/x86_64/
|
|
|
0049f9b |
mv glibc-${version}.src.rpm glibc32-${version}/
|
|
|
0049f9b |
# Package up the new source file.
|
|
|
0049f9b |
tar cjvf glibc32-${version}.tar.bz2 glibc32-${version}
|
|
|
0049f9b |
popd
|
|
|
0049f9b |
mv tmp/glibc32-${version}.tar.bz2 .
|
|
|
0049f9b |
rm -rf tmp
|
|
|
0049f9b |
echo "New source file is glibc32-${version}.tar.bz2"
|
|
|
0049f9b |
echo "Follow README.txt for next steps."
|
|
|
0049f9b |
exit 0
|