[Build-common-hackers] Using CDBS' flavors mechanism to build packages
Emilio Pozuelo Monfort
pochu at debian.org
Thu Dec 23 22:56:32 UTC 2010
On 21/12/10 22:38, Jonas Smedegaard wrote:
> On Sun, Dec 19, 2010 at 06:38:52PM +0000, Emilio Pozuelo Monfort wrote:
>> I'm now doing
>>
>> DEB_DESTDIR = $(CURDIR)/debian/tmp$(if $(findstring
>> udeb,$(cdbs_make_curflavor)),/udeb)
>>
>> Without setting DEB_MAKE_DESTDIRSKEL. It's working great and the
>> dh_install issue only affects libvte9-udeb.install, so it's not a big
>> deal.
>
> Try this instead:
>
> DEB_DESTDIR_$(udeb) = $(DEB_DESTDIR)udeb
>
>
> Per-flavor is expanded during build, and per-package during install.
>
> They use same "namespace" (string after last slash) so per-flavor cannot
> exist during install too as it is currently implemented.
Hmm, that doesn't make any sense to me. DEB_DESTDIR is the directory to pass to
`make install` in DESTDIR. It is thus per-flavor, and not per package. So I
don't understand how DEB_DESTDIR_$(package) would work. Only
DEB_DESTDIR_$(flavor) makes sense to me.
I've applied this to makefile.mk.in:
-cdbs_make_curdestdir = $(cdbs_curdestdir)
+cdbs_make_curdestdir = $(if
$(DEB_DESTDIR_$(cdbs_make_curflavor)),$(DEB_DESTDIR_$(cdbs_make_curflavor)),$(cdbs_curdestdir))
And have in vte/debian/rules:
DEB_DESTDIR = $(CURDIR)/debian/tmp
DEB_DESTDIR_udeb = $(DEB_DESTDIR)/udeb
And that works fine. All flavors install to debian/tmp except the udeb flavor,
which installs to debian/tmp/udeb.
What do you think about that?
We may also want to support something like
DEB_DESTDIR = $(CURDIR)/debian/tmp/@FLAVOR@
Maybe something like (untested)
cdbs_make_curdestdir = $(subst @FLAVOR@,$(cdbs_make_curflavor),$(if
$(DEB_DESTDIR_$(cdbs_make_curflavor)),$(DEB_DESTDIR_$(cdbs_make_curflavor)),$(cdbs_curdestdir)))
so you don't have to specify it for each flavor if you want all them in
different places (I may want that in e.g. glib2.0, pango1.0, gtk+3.0... I could
specify that by hand but this would be nicer)
Also it would be nice not automatically expand $(CURDIR) if one just specifies
e.g. DEB_DESTDIR = debian/tmp
Not sure if that would break non-autotools packages or anything... Not a big
deal in any case.
> Perhaps you want to apply it yourself: The packaging is maintained in
> the git collab-maint area so you should have write access already.
Sure. I have pushed a few commits and will keep pushing others.
> And please do help summarize what is still left to do here. An awful lot
> of details, and I have lost track of which parts we've solved along the
> way here...
Right now, the DEB_DESTDIR_$(flavor) and CFLAGS_$(flavor) for vte. I'll also
look at other packages to see if we need more stuff for them.
Cheers,
Emilio
More information about the Build-common-hackers
mailing list