Should I put application into /usr/local or /usr/local/share?
I think /opt is more standard in this sort of context. The relevant section in the Filesystem Hierarchy Standard is quoted below.
Distributions may install software in /opt, but must not modify or delete software installed by the local system administrator without the assent of the local system administrator.
 Rationale The use of /opt for add-on software is a well-established practice in the UNIX community. The System V Application Binary Interface [AT&T 1990], based on the System V Interface Definition (Third Edition), provides for an /opt structure very similar to the one defined here.
The Intel Binary Compatibility Standard v. 2 (iBCS2) also provides a similar structure for /opt.
Generally, all data required to support a package on a system must be present within /opt/, including files intended to be copied into /etc/opt/ and /var/opt/ as well as reserved directories in /opt.
The minor restrictions on distributions using /opt are necessary because conflicts are possible between distribution-installed and locally-installed software, especially in the case of fixed pathnames found in some binary software.
The structure of the directories below /opt/ is left up to the packager of the software, though it is recommended that packages are installed in /opt// and follow a similar structure to the guidelines for /opt/package. A valid reason for diverging from this structure is for support packages which may have files installed in /opt//lib or /opt//bin.
You should only use /usr/local/share
for files which are not specific to a particular architecture / OS version.
After that it's up to you whether you distribute the files between the existing subdirs of /usr/local
or if you create a new dedicated directory in /usr/local
(but the latter will not already exist on the executable PATH
, the LD_LIBRARY_PATH
, nor the MANPATH
).
Have a look at the FHS
Until /opt
became common, the usual place was /usr/local/lib/<package>
.