Reputation: 315
I writing distribution package of my perl-program and I need to 'make install' command copy file e.g. conf/my.conf to /usr/local/etc/my.conf. Which parameter should I use in WriteMakefile?
Thanks!
Upvotes: 2
Views: 250
Reputation: 315
I've found not pretty, but useful solution:
sub MY::postamble {
return qq{
install :: conf/my.conf
\tcp conf/my.conf /usr/local/etc/my.conf
};
This is a simple add-on to Makefile to run the command when 'make install' running. In real life it's looks bit more difficult, but... =)
If there are any pretty idea, please welcome!
Upvotes: 0
Reputation: 21
It doesn't exit :) (is on the old TODO)
use File::ShareDir::Install
/File::UserConfig
or try your luck with Module::Build::SysPath
Upvotes: 2