[Pkg-ime-devel] Bug#750902: RFH: Bug#750902: ibus: Have unconditional B-D on libwayland-dev - prevents build on kfreebsd

Simon McVittie smcv at debian.org
Sun Jun 8 18:09:51 UTC 2014


On 08/06/14 17:12, Osamu Aoki wrote:
> | Build-Depends: autoconf,
> | ...
> |                libwayland-dev [linux-any],

This looks correct. Builds of ibus on Linux will build-depend on
libwayland-dev, builds on non-Linux will not.

> | Package: ibus-wayland
> | Architecture: linux-any

This also looks correct. The binary package ibus-wayland will only be
built on Linux architectures.

> Also, what is the most effective way to make debian/rules architecture
> dependent?  I do not know how to set $(OS) elegantly.
>  http://anonscm.debian.org/gitweb/?p=pkg-ime/ibus.git;a=blob;f=debian/rules;hb=HEAD
> 
> | ifdef ($(OS),linux-any)
> | override_dh_auto_configure:
> | ...
> | else
> | override_dh_auto_configure:
> | ...
> | endif

Include dpkg's default.mk ("include /usr/share/dpkg/default.mk", or use
architecture.mk instead if you would like to avoid also setting CFLAGS
and other useful variables), then use:

ifeq($(DEB_HOST_ARCH_OS),linux)
...       # Linux things here
else
...       # non-Linux things here
endif

Run dpkg-architecture to see other variables you can use.

telepathy-mission-control-5 is an example of a package with optional
Linux-specifics (we build with NetworkManager support on Linux only):

http://anonscm.debian.org/gitweb/?p=pkg-telepathy/telepathy-mission-control-5.git;a=blob;f=debian/rules;hb=HEAD
http://anonscm.debian.org/gitweb/?p=pkg-telepathy/telepathy-mission-control-5.git;a=blob_plain;f=debian/control;hb=HEAD

    S



More information about the Pkg-ime-devel mailing list