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.
Reply to: