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

Okay, this is my 3rd package, now I need help...

On Sep  9, Terry Hancock (hancock@anansispaceworks.com) wrote:
 > My immediate question:
 > I need to build a dual binary (a runtime and a development)
 > package from a single source package, called "wcstools",
 > which I am creating with dh_make and dpkg-buildpackage.
 > I've seen various references to how these should be "built 
 > in debian/wcstools and debian/wcstools-dev" instead of
 > just in "debian/tmp" -- but I *haven't* found out how to 
 > make that happen.  Is there something else I should be 
 > reading, or have I missed the section in what I have read 
 > (which is the Debian Policy, Debian NMG, and Debian 
 > Developer's Reference -- I admit I didn't read them 
 > word-for-word, but I'm fairly certain I would've found this 
 > if it were in there in an easy to find place.  Or maybe it's
 > in front of my nose, I've been wrong before.).

The approach I took with a multi-binary package that I created from scratch
was to do the configure and make, then set DESTDIR to $(CURDIR)/debian/tmp,
export it, and do the make install.  This puts everything into the directory
hierarchy below debian/tmp.  So far, nothing package specific.  Then, I told
the debhelper tools where to put things by creating files <package>.install
for each binary package, then calling dh_install once for each package with
the option -p<package>.  This makes it install the files for each package into
the appropriate subdirectory of debian/ for that package.  See the dh_install
man page for more on this.  Several more of the debhelper commands act on
<package>.<dh_extension> files to do package specific things.  Use whichever
are appropriate for your packages.

My rules file is symmetric with respect to the packages, i.e., none ultimately
build out of debian/tmp, all build out of debian/<package> subdirectories.  On
the other hand, some other multi-binary packages I adopted build one package
out of debian/tmp and the rest from debian/<package>, so I guess that means
it's up to you.

There is one each rules, control and changelog file for the source package,
not one per binary package.

Disclaimer: IANAE, but I think I have a pretty clean build setup for a large
package.  I'm hoping someone else will take that as a challenge and tell me
how to make it (aplus-fsf) even better :-)

Neil Roeth

Reply to: