Created
April 17, 2011 04:57
-
-
Save aont/923770 to your computer and use it in GitHub Desktop.
convert deb Package for x86_64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dir_prev=$PWD | |
cd `dirname $1` | |
debfile=`pwd`/`basename $1` | |
cd $dir_prev | |
workdir=`mktemp -d --tmpdir deb_to_amd64.XXXXXXXXXX` | |
cd $workdir | |
ar x $debfile control.tar.gz | |
gzip -d control.tar.gz | |
tar -xf control.tar ./control | |
mv control control.old | |
sed -e "s/^Architecture: i386/Architecture: amd64/" -e "s/^Depends: /Depends: ia32-libs, /" control.old > control | |
tar -uf control.tar ./control | |
gzip control.tar | |
ar r $debfile control.tar.gz | |
cd $dir_prev | |
rm -rf $workdir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment