Fork me on GitHub

application

Gentoo Mono Handbook
FHS: overview, 3.0
/usr/share
The /usr/share hierarchy is for all read-only architecture independent data files.
/usr/bin
Non-essential command binaries (not needed in single user mode); for all users.

https://devmanual.gentoo.org/eclass-reference/eutils.eclass/
make_wrapper <wrapper> <target> [chdir] [libpaths] [installpath]
Create a shell wrapper script named wrapper in installpath (defaults to the bindir) to execute target (default of wrapper) by first optionally setting LD_LIBRARY_PATH to the colon-delimited libpaths followed by optionally changing directory to chdir.

https://www.gnu.org/prep/standards/html_node/Directory-Variables.html
bindir

The directory for installing executable programs that users can run. This should normally be /usr/local/bin, but write it as $(exec_prefix)/bin. (If you are using Autoconf, write it as ‘@bindir@’.)


/usr/share/${PN}-${SLOT}/

http://tldp.org/LDP/abs/html/string-manipulation.html
${string%substring}
Deletes shortest match of $substring from back of $string.

Some examples

make_wrapper nant "mono /usr/share/nant/NAnt.exe"

SLOTTEDDIR="/usr/share/${PN}-${SLOT}/"
insinto "${SLOTTEDDIR}"
doins bin/${DIR}/*.{config,dll,exe}
# install: cannot stat 'bin/Release/*.mdb': No such file or directory
make_wrapper nunit264 "mono ${SLOTTEDDIR}/nunit-console.exe"

make_wrapper ${exe} "mono /usr/$(get_libdir)/${MY_PN}/${exe}.exe" || die
make_wrapper pash "mono /usr/lib/pash/Pash.exe"
MONO=/usr/bin/mono
make_wrapper "$1" "${MONO} --debug /usr/share/${PN}-${SLOT}/$1.exe"
make_wrapper fake "mono /usr/lib/mono/FAKE/${FRAMEWORK}/FAKE.exe"
make_wrapper mypad "mono /usr/lib/mypad-${PV}/MyPad.exe"

cat /usr/bin/pinta
#!/bin/sh 
prefix=/usr
exec_prefix=${prefix}

exec /usr/bin/mono /usr/lib64/pinta/Pinta.exe "$@"

grep "\.exe" /usr/bin/monodevelop
EXE_PATH="/usr/lib/monodevelop/bin/MonoDevelop.exe"