Re: Using dh to build 1 binary package with different configure options
Tony Houghton h...@realh.co.uk writes: I'm pretty sure I once read something about how to get a single source package to build multiple binary packages from the same source with different configure options. Unfortunately I can't remember what I read and it didn't apply to dh anyway. Can anyone recommend a guide to doing this with dh? If you're using short form dh, this would be one way to do it: override_dh_auto_configure: install -d debian/build-gtk2 cd debian/build-gtk2 ../../configure --with-gtk2 install -d debian/build-gtk3 cd debian/build-gtk3 ../../configure --with-gtk3 override_dh_auto_build: cd debian/build-gtk2 make cd debian/build-gtk3 make override_dh_auto_install: cd debian/build-gtk2 make install DESTDIR=$(CURDIR)/debian/pkg-gtk2 cd debian/build-gtk3 make install DESTDIR=$(CURDIR)/debian/pkg-gtk3 And from this point on, it's just standard dh. If it's long-form debhelper, then instead of the overrides, do something similar in your configure, build and install targets. There might be nicer ways to do the same thing, but this is already fairly straightforward, in my opinion. -- |8] -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/87hb5nqbyr@balabit.hu
Re: Using dh to build 1 binary package with different configure options
Gergely Nagy wrote: If you're using short form dh, this would be one way to do it: override_dh_auto_configure: install -d debian/build-gtk2 cd debian/build-gtk2 ../../configure --with-gtk2 install -d debian/build-gtk3 cd debian/build-gtk3 ../../configure --with-gtk3 override_dh_auto_build: cd debian/build-gtk2 make cd debian/build-gtk3 make override_dh_auto_install: cd debian/build-gtk2 make install \ DESTDIR=$(CURDIR)/debian/pkg-gtk2 cd debian/build-gtk3 make install \ DESTDIR=$(CURDIR)/debian/pkg-gtk3 And from this point on, it's just standard dh. I'm doing it slightly differently, using the --builddirectory parameter of dh: -- debian/rules abstract - override_dh_auto_configure: o_d_auto_conf_a o_d_auto_conf_b o_d_auto_conf_a: mkdir -p build-a dh_auto_configure --builddirectory=build-a -- \ --with-a-specifics o_d_auto_conf_b: mkdir -p build-b dh_auto_configure --builddirectory=build-b -- \ --with-b-specifics -- debian/rules abstract - Then mimick this at least in : override_dh_auto_build override_dh_auto_install override_dh_auto_test And add rm -rf build-* to override_dh_auto_clean. -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/j22puu$88a$1...@dough.gmane.org
Re: Using dh to build 1 binary package with different configure options
Didier Raboud o...@debian.org writes: I'm doing it slightly differently, using the --builddirectory parameter of dh: Yeah, that's pretty much the same thing, with a bit better style =) And add rm -rf build-* to override_dh_auto_clean. Right, this part I completely forgot to mention. Thanks! -- |8] -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/87d3gbq8ef@balabit.hu
Re: Using dh to build 1 binary package with different configure options
On Fri, Aug 12, 2011 at 10:18:52AM +0200, Gergely Nagy wrote: Tony Houghton h...@realh.co.uk writes: I'm pretty sure I once read something about how to get a single source package to build multiple binary packages from the same source with different configure options. Unfortunately I can't remember what I read and it didn't apply to dh anyway. Can anyone recommend a guide to doing this with dh? If you're using short form dh, this would be one way to do it: cd debian/build-gtk3 make cd debian/build-gtk2 make install DESTDIR=$(CURDIR)/debian/pkg-gtk2 Note make has a '-C' option to avoid the cd: make -C debian/build-gtk3 make -C debian/build-gtk3 install DESTDIR=$(CURDIR)/debian/pkg-gtk2 Regards, Roger -- .''`. Roger Leigh : :' : Debian GNU/Linux http://people.debian.org/~rleigh/ `. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/ `-GPG Public Key: 0x25BFB848 Please GPG sign your mail. signature.asc Description: Digital signature
Re: Using dh to build 1 binary package with different configure options
On Fri, 12 Aug 2011 10:53:32 +1000 Karl Goetz k...@kgoetz.id.au wrote: On Fri, 12 Aug 2011 00:40:34 +0100 Tony Houghton h...@realh.co.uk wrote: I'm pretty sure I once read something about how to get a single source package to build multiple binary packages from the same source with different configure options. Unfortunately I can't remember what I read and it didn't apply to dh anyway. Can anyone recommend a guide to doing this with dh? Important question: Are you using dh short form or not? Yes, I'm using the short form. Thanks to everyone who showed me how to do this. But I'd also appreciate some feedback on the question of whether it's sensible to provide two versions of roxterm this way or should I pick one version and stick to a simple rules file? -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110812133318.0b33ff6e@junior
Re: Using dh to build 1 binary package with different configure options
Tony Houghton h...@realh.co.uk writes: Yes, I'm using the short form. Thanks to everyone who showed me how to do this. But I'd also appreciate some feedback on the question of whether it's sensible to provide two versions of roxterm this way or should I pick one version and stick to a simple rules file? I'd probably provide both. A rules file doing two configure make make install runs isn't all that complicated. The -gtk2 version can always be dropped later, either when upstream stops supporting it, or when the number of users drops to a level not worth the effort of maintaining two versions. -- |8] -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/87ty9mpzll@balabit.hu
Using dh to build 1 binary package with different configure options
A new release of roxterm is in the pipeline. I've made a lot of changes, mostly to replace libglade with GtkBuilder and to get it to work with gtk3. I'd ideally like to call it version 2 and have the clear distinction that version 1 was for gtk2 and version 2 is for gtk3. However, I suspect a lot of users would not be happy with switching to gtk3 yet, especially users of xfwm4 and kwin (and others?) due to bug #632403. gtk2/3 can be selected as a configure option. I don't mind continuing to support both for now, but I'd like to look to the future and make sure the gtk3-specific code is well tested as early as possible while still supporting people who want to stick with gtk2. Therefore I'd like to create two packages from the same source, eg roxterm (gtk2) and roxterm2 (gtk3). Or would it be better to rename both of them and make roxterm a meta package which depends on one or the other? They'd share a number of files, eg the .ui (formerly .glade) file, graphics and documentation; should I make a roxterm-data/roxterm-common package for these? Does all this sound like a good idea, or too complex to be worth it? I'm pretty sure I once read something about how to get a single source package to build multiple binary packages from the same source with different configure options. Unfortunately I can't remember what I read and it didn't apply to dh anyway. Can anyone recommend a guide to doing this with dh? -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110812004034.20b47535@junior
Re: Using dh to build 1 binary package with different configure options
On Fri, 12 Aug 2011 00:40:34 +0100 Tony Houghton h...@realh.co.uk wrote: I'm pretty sure I once read something about how to get a single source package to build multiple binary packages from the same source with different configure options. Unfortunately I can't remember what I read and it didn't apply to dh anyway. Can anyone recommend a guide to doing this with dh? Important question: Are you using dh short form or not? thanks, kk ps. (Freecivs packaging does what you're asking about, but its at compat 5, so probably not a good example :)) -- Karl Goetz, (Kamping_Kaiser / VK5FOSS) Debian contributor / gNewSense Maintainer http://www.kgoetz.id.au No, I won't join your social networking group signature.asc Description: PGP signature