While trying to properly package up cyrus-imapd-2.1.16 I kept running into a snag with the perl subdirectory.
Some background: the OS in question is Solaris 9, using the built-in perl 5.6.1. MakeMaker.pm has been upgraded to 6.21 in order to have DESTDIR support.
What I'm trying to do is building a package by installing the software in a fake root directory, then call Solaris pkgproto and pkgmk, and then put the package on our install server:
./configure (lots of options) gmake gmake DESTDIR=/tmp/fakeroot install
However, and this will also happen if I do a 'regular' make install as root, the perl modules will end up under /usr/local because of the default PREFIX set in configure. Because there is no /usr/local in @INC at all, cyradm e.g. will not work because it cannot find the Cyrus::IMAP::Shell.pm module.
My suggestion: leave the location of the actual perl modules up to MakeMaker, so don't pass PREFIX when building the module makefiles out of Makefile.PL. To accomplish this, one would remove the PREFIX= entries from perl/Makefile.in (line 83) and perl/sieve/Makefile.in (line 81).
The only drawback of this is that cyradm and it's manpage end up under /usr/perl5/5.6.1/{bin,man}, which is arguably where they belong. For convenience, I've symlinked it from /usr/local/bin.
Regards, Paul Boven.