Using finddir to replace hardcoded directory locations in .bep and .hpb files.
Here are some common hardcoded directories that can be redirected using finddir for packages that use the GNU autotools, these may also work on some ports that don't use the autotools.
- docdir=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`/doc/{packagename} Try running the build without this in place and if it creates share/doc/{packagename}, then try setting this.
- infodir=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`/info
- mandir=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`/man
aclocal expects to find the .m4 files in B_COMMON_DATA_DIRECTORY/aclocal/, some packages use `datadir` to set this location, others use `datarootdir`, and others might even use something else, so this might take a few build attempts to get figured out. Most will auto-append the aclocal to this path, so we just need to add the `finddir B_COMMON_DATA_DIRECTORY`.
- sbindir usually defaults to {prefix}/sbin, since we DO NOT want this in Haiku this needs to be redirected ( http://dev.haiku-os.org/ticket/3311). It seems the current consensus for this location is {prefix}/bin, aka `finddir B_COMMON_BIN_DIRECTORY`, be sure to test this one out as several packages seem to hardcode this one to not allow an easy way to override it's wishes to put sbin into {prefix}/sbin. In those cases, perhaps use sed or patch it to force it to use {prefix}/bin instead.
- libexecdir is another one that is used from time to time. This can probably be set to B_COMMON_LIB_DIRECTORY.
Be sure to check the resulting .zip packages to make sure they are free of the `{prefix}/share/`, `{prefix}/doc` `{prefix}/info` and `{prefix}/man`. If they are still there, try ./configure --help for a list of commandline options to override the driectory settings.
If you find any others that should be mentioned here, be sure to update this page.
