Sample src_install

src_install(){emakeDESTDIR="${D}" install
dodoc README CHANGES
}

Easy Installs

Often, especially with autotools-powered packages, there is a Makefileinstall target which will honour the DESTDIR variable to tell it to
install to a non-root location. If possible, this should be used:

emakeDESTDIR="${D}" install

Note:emake should be used to parallelise here. Some installs are
not designed to be parallelised, use emake -j1 or make
if you hit an error.

Sometimes this will end up installing a few things into strange
places. If and only if this is the case, the einstall
function can be used. It is usually necessary to include additional
dodoc statements for the README, ChangeLog, etc
in these cases:

einstalldodoc README CHANGES

Note:
There is no need to dodocCOPYING! The license belongs
to ${PORTDIR}/licenses. Sometimes though, you might want to
install COPYING regardless, if it explains how different
licenses are applied to different parts of the application, for
example.

Trivial Installs

For some packages with no Makefile that only install a small
number of files, writing a manual install using cp is the
easiest option. For example, to do a simple install of some (no
compilation required) themes:

This is, of course, considerably harder to handle than a
simple Makefile driven install.

Other Installs

Sometimes, there will be a Makefile that does not
honour DESTDIR and a non-trivial number of files to install. In
these situations, it is best to patch the Makefile and contact
upstream explaining the situation to them.