How to build partimage 0.6.7 on Ubuntu 9.04

1. Download source code

$sudo mkdir partimage
$sudo cd partimage/
$sudo wget http://sourceforge.net/projects/partimage/files/stable/0.6.7/partimage-0.6.7.tar.bz2/download
$sudo tar xvf partimage-0.6.7.tar.bz2
$sudo cd partimage-0.6.7/

2. Required packages to compile

$sudo apt-get update
$sudo apt-get upgrade
$sudo apt-get install libbz2*
$sudo apt-get install libnewt*
$sudo apt-get install build-essential
$sudo apt-get install openssl
$sudo apt-get install libssl-dev

3. Modify source code

My impression from various searches online is that these changes are needed:
#include "iostream.h"

Should change to these two lines:
#include "iostream"
using namespace std;

Example site that describes this:
http://www.ishiboo.com/~nirva/c++/stl-ref/iostrea2.html

These files seem to reference iostream.h, and need to be changed:
src/server/partimaged.cpp
src/server/partimaged-main.cpp
src/shared/net.h

4. Configure & Make

$mkdir setup
$./configure --prefix=/home/gary/partimage/partimage-0.6.7/setup
$make
$make install

5. Copy this files to target path

$cp -a ./setup/sbin/partimage /target_path/usr/sbin/
$cp -a /lib/libbz2.so.1.0 /target_path/usr/lib/
$cp -a /lib/libbz2.so.1.0.4 /target_path/usr/lib/
$cp -a /usr/lib/libnewt.so.0.52 /target_path/usr/lib/














虹光大成就-密教灌頂(一)