Here are a few changes to the installation layout for your approval.
The *.sample files and the initdb input files (BKI) should go into PREFIX/share, not lib. Since only initdb has to
knowabout this there should be no problems. As for finding these files, the easiest and safest method would be to
substitutethis path into initdb at build time. Override with -L is of course possible. (The "lib" mnemonic would be
gone, think of it as "location".)
As a point of reference, the NetBSD pkgsrc package for postgresql
already puts the following in /usr/pkg/share/postgresql:
global1.bki.source global1.description local1_template1.bki.source local1_template1.description
Cheers,
Brook