[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: clean way to package 3rd party software



On 07/17/2008 01:35 AM, Carsten Aulbert wrote:
Hi all,


Hello Carsten.

in our scientific collaboration we are currently using a big pile of
software which comes bundled with its own installer (pacman). Since
doing a full repackage,  of all subcomponents is currently out of the
question I would like to package this into a binary only .deb. I somehow
succeeded, but would like to receive a hint from experts.

I usually use a clean pbuilder/cowbuilder environment to install this
huge package under /opt/mypackage. Most of its files are living there so
no big problem, albeit one variant adds some changes to /etc. My questions:


I'm not familiar with pbuilder/cowbuilder, and I suspect that I'm out of my depth, but I'll try to help anyway.

(1) Is there a standard way to detect which files have been added to the
system? Right now I'm doing a full find of the whole "system" before and
after and extract the changed files.


Many programs support a DESTDIR variable for installation. So you might do something like this:

./configure --prefix=/opt
make
make install DESTDIR=/tmp/buildir

The third command would install all files under /tmp/buildir rather than the normal /opt. The directory structure would be maintained.

(2) Right now I then manually move all the changed files into a
temporary directory, create a DEBIAN directory along with the necessary
files (md5sum, control, ..) and call dpkg -b and go for a coffee.


This is the correct way to create a .deb, but by using DESTDIR, you would not have to manually move files.

However, especially this second step is rather tedious when it has to be
done multiple times. Is there a better way of doing it?


I think you're looking for DESTDIR.

Thanks for a new insight

Cheers

Carsten


HTH


Reply to: