function create_docs
Main purpose
- Insure that the package tree contains some basic documents.
Notes
A good package should always include some documentation, usually a
README file or other such files and , especially, a copy of the license
under which the software is released.
This function checks the PKG_DIR to see if documents have been
installed already. If not it uses a list of commonly-used document
names and searches the SRC_DIR (and CONFIG_DIR) for any such documents
and copies them into the PKG_DIR.
As done earlier, documents are checked for proper directory placement
and also proper naming. This means that if documents have been
installed to /usr/share/doc they will be moved to /usr/doc. If
documents have been installed without a verison number this is also
corrected. This is really not necessary but makes for better uniformity
in /usr/doc. I haven't found any programs which are 'broken' by doing
this since any other content under /usr/share is left alone.
create_docs calls an advanced packaging routine which takes care of
several things, including the installation of pkgconfig '*.pc' files
and '*.desktop' files. These are searched for both in the sources and
in the CWD. If you need to add such a file to the package it can simply
be placed in the CWD and will be copied automatically into the PKG_DIR.
More advanced routines can be called which will create non-standard
packages with less content by creating compressed archives of the
package documents or removing extra language/localization files from
the package tree. See SAVE_SPACE and PURGE_LOCALES in the FUNCTIONS
file for details.