Author: Jiang Jiang <jznsmail at tom.com>
Recently, my colleague is developing JSR82 library for KVM. The compile of cldc library must use gcc 3.2 version. But the lastest version of ubuntu don't include gcc v3.2. So i only export it from old version of readhat. The below section trace steps.
1. download gcc-3.2-2-i386.rpm from rmp.pbone.net. It's about 37MB large.
2. must install alien tool for abstract binary files from rpm file and rebuild deb file. You can type 'sudo apt-get install alien' on the ubuntu system or debian system.
3. use 'alien -d xxx.rpm' command to create newly deb file as following:
sudo alien -d gcc-3.2-2-i386.rpm ( you must root privilege)
the gcc_3.2-2_i386.deb file is created in the same directory, now.
4. use dpkg-deb command to abstract summary info, binary files and library files. you can as following:
mkdir gcc (the abstracted files will store in gcc directory)
dpkg-deb -e gcc_3.2-2_i386.deb gcc/DEBIAN (abstract control files)
dpkg-deb -x gcc_3.2-2_i386.deb gcc/ (abstract binary files and library files)
The last, i only use gcc-3.2 compiler and don't wanna rebuild deb package. I f you want, you can simple type 'dpkg-deb -b gcc gcc_3.2-2_i386_moidfy.deb' command.
Bibliography:
Debian 维护工具之 Dpkg