FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 04-13-2008, 03:50 PM
 
Default elegant ways to build a package two times

The inn2 packages is not as useful as it should be, since it does not
support LFS which is mandatory for large servers. I cannot just enable
LFS support since there is no transition path for some classes of users,
so we need both inn2 and inn2-lfs packages.

I am looking for *elegant* ways to build both packages from the same
source with the least possible duplication of the code in debian/rules
and of the debian/ debhelper files (the package is complex and needs
much work before and after make install).
Please let me know if you know about packages which solved similar
issues.

INN uses autoconf but not automake, so mkdir bin && ./configure does
not generate working makefiles.

--
ciao,
Marco


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 04-13-2008, 08:29 PM
Guus Sliepen
 
Default elegant ways to build a package two times

On Sun, Apr 13, 2008 at 05:50:39PM +0200, Marco d'Itri wrote:

> I am looking for *elegant* ways to build both packages from the same
> source with the least possible duplication of the code in debian/rules
> and of the debian/ debhelper files (the package is complex and needs
> much work before and after make install).
> Please let me know if you know about packages which solved similar
> issues.

I maintain celestia, which comes with three front-ends, GLUT, GNOME and
KDE. Unfortunately, upstreams build system only allows you to build for
one specific front-end at a time. In celestia's debian/rules, the source
is copied three times to separate build directories. Then it is compiled
three times, each time with different options to ./configure. I have
taken care that the makefile rules in debian/rules are such that
repeated builds work fine, and that if you interrupt the build you can
resume it, without the need for the build system to start over again.
Also, I recently made it so that the build directory copies are made
with cp -l, to speed up the process and to prevent disk space from being
consumed unnecessarily.

--
Met vriendelijke groet / with kind regards,
Guus Sliepen <guus@debian.org>
 
Old 04-15-2008, 03:40 PM
Josselin Mouette
 
Default elegant ways to build a package two times

Le dimanche 13 avril 2008 * 17:50 +0200, Marco d'Itri a écrit :
> INN uses autoconf but not automake, so mkdir bin && ./configure does
> not generate working makefiles.

(I suppose you mean ../configure)

You don’t need automake for this to work, it’s just that automake does
things right by default. Fixing the package to get out-of-tree builds to
work using VPATH should be feasible.

Otherwise, the least inelegant way is probably, as already suggested, to
copy the full sources in a subdirectory.

--
.'`.
: :' : We are debian.org. Lower your prices, surrender your code.
`. `' We will add your hardware and software distinctiveness to
`- our own. Resistance is futile.
 
Old 04-21-2008, 05:22 PM
 
Default elegant ways to build a package two times

On Apr 15, Josselin Mouette <joss@debian.org> wrote:

> You don???t need automake for this to work, it???s just that automake does
> things right by default. Fixing the package to get out-of-tree builds to
> work using VPATH should be feasible.
Can you point me to a good example of a package using VPATH?

> Otherwise, the least inelegant way is probably, as already suggested, to
> copy the full sources in a subdirectory.
Actually both ways share the same problem: a lot of code will have to be
duplicated in debian/rules (maybe I should try using "define" to create
macros).

--
ciao,
Marco
 
Old 04-22-2008, 12:05 PM
Josselin Mouette
 
Default elegant ways to build a package two times

Le lundi 21 avril 2008 19:22 +0200, Marco d'Itri a crit :
> On Apr 15, Josselin Mouette <joss@debian.org> wrote:
> > You don???t need automake for this to work, it???s just that automake does
> > things right by default. Fixing the package to get out-of-tree builds to
> > work using VPATH should be feasible.
> Can you point me to a good example of a package using VPATH?

You can have a look at mpb; the upstream version uses autoconf without
automake and doesn't support out-of-tree builds. The Debian package has
a patch to make it work using VPATH.

> Actually both ways share the same problem: a lot of code will have to be
> duplicated in debian/rules (maybe I should try using "define" to create
> macros).

Not necessarily:

FLAVORS := foo bar

common_configure_flags = --prefix=/usr
foo_configure_flags = $(common_configure_flags) --with-foo
bar_configure_flags = $(common_configure_flags) --with-bar

STAMP_DIR=debian/stamp
BUILD_DIR=debian/build
builddir = $(BUILD_DIR)/$*

configure: $(addprefix $(STAMP_DIR)/configure-stamp-, $(FLAVORS))
$(STAMP_DIR)/configure-stamp-%:
dh_testdir
mkdir -p $(builddir)
cd $(builddir) &&
CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
$(CURDIR)/configure $($*_configure_flags)
touch $@

build: $(addprefix $(STAMP_DIR)/build-stamp-, $(FLAVORS))
$(STAMP_DIR)/build-stamp-%: $(STAMP_DIR)/configure-stamp-%
dh_testdir
$(MAKE) -C $(builddir)
touch $@

--
.'`.
: :' : We are debian.org. Lower your prices, surrender your code.
`. `' We will add your hardware and software distinctiveness to
`- our own. Resistance is futile.
 

Thread Tools




All times are GMT. The time now is 05:49 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org