wpkg --max-version

Options Comments
--admindir Define the administration directory, where the database of the installed packages resides.
--debug Define a set of flags of things to print out for debug purposes.
--instdir Define the installation directory, where the data files are installed on the target.
--quiet Not used.
--root Define the installation root path.
--verbose Not used.

The --max-version command checks that a package has a version smaller or equal to the specified version.

This function is a pkg-config extension supported by wpkg.

You may also want to check out --exact-version, --atleast-version and --atleast-wpkg-version.