The question "how to install a package without installing the entire recipe" does not make sense as you don't install recipes. The recipe must be in a layer that's available to bitbake though.
A recipe describes how to build one or more packages out of specified sources. The packages are defined by PACKAGES variable (which contains some sensible default packages but often recipes add some more). bitbake works on recipes not packages, so when you tell bitbake to build a recipe, all of its packages will be built.
If you want one of the built packages to be installed into an image, IMAGE_INSTALL_append = " packagename"
should work (note the whitespace inside quotes). Typically you wouldn't need to do this for libraries like in your examples though: the application that uses the library should runtime depend on it instead.
If you have a specific problem, maybe putting that into the question would help.