-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile.PL
More file actions
36 lines (32 loc) · 1.15 KB
/
Copy pathMakefile.PL
File metadata and controls
36 lines (32 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
use ExtUtils::MakeMaker;
WriteMakefile(
NAME => 'FileWiki',
VERSION_FROM => 'lib/FileWiki.pm',
EXE_FILES => [ 'bin/filewiki' ],
PREREQ_PM => { 'Template' => 0,
'Getopt::Std' => 0,
'Date::Format' => 0,
'Time::Local' => 0,
'HTML::Entities' => 0,
'File::Path' => 0,
'File::Spec::Functions' => 0,
},
);
# install templates to /usr/share/filewiki/template
# this is a bit hacky, but I have no clue how to do this in a nicer way.
sub MY::post_constants {
join("\n",
'INSTALL_TEMPLATES_LIB=$(PREFIX)/share/filewiki/template',
'DEST_INSTALL_TEMPLATES_LIB=$(DESTDIR)$(INSTALL_TEMPLATES_LIB)',
'TEMPLATES_SRC_DIR=template');
}
sub MY::postamble {
my $self = shift;
my @text;
push(@text,
'install :: install.templates',
'',
'install.templates:: $(TEMPLATES_SRC_DIR)',
"\t" . '$(NOECHO) $(MOD_INSTALL) $(TEMPLATES_SRC_DIR) $(DEST_INSTALL_TEMPLATES_LIB)');
join("\n",@text);
}