-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.PL
52 lines (42 loc) · 1.66 KB
/
Makefile.PL
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
use ExtUtils::MakeMaker;
use Carp;
my $install = "./utils/install-N-sub --config ./utils/install-N-sub.conf";
my $version = `cat VERSION`;
chomp $version;
sub MY::postamble {
my $string = <<EOF;
set_ver::
\tfind \$(DESTDIR)
\t${install} \$(DESTINSTALLSITEBIN)/flamethrower
\t${install} \$(DESTINSTALLSITEBIN)/flamethrowerd
\t${install} \$(DESTINSTALLSITELIB)/Flamethrower.pm
install_configs::
\tinstall -d \$(CONFDIR)/etc/init.d/
\tinstall -d \$(CONFDIR)/etc/flamethrower/
\tinstall -d \$(CONFDIR)/var/lib/flamethrower/
\tinstall -m 644 etc/flamethrower.conf \$(CONFDIR)/etc/flamethrower/
\tinstall -m 755 etc/init.d/flamethrower-server \$(CONFDIR)/etc/init.d/
source_tarball :: tmp/flamethrower-$version.tar.bz2
tmp/flamethrower-$version.tar.bz2::
\tmkdir -p tmp/flamethrower-$version
\ttar -c --exclude tmp/ * | (cd tmp/flamethrower-$version && tar x)
\tcd tmp/flamethrower-$version && rm -rf tmp
\tcd tmp/flamethrower-$version && make clean
\trm -rf \`find tmp/flamethrower-$version -name CVS -type d -printf \"\%p \"\`
\tcd tmp && tar -c flamethrower-$version | bzip2 > flamethrower-$version.tar.bz2
install :: set_ver install_configs
EOF
}
WriteMakefile(
'VERSION' => $version,
'NAME' => 'flamethrower',
'EXE_FILES' => [qw(bin/flamethrowerd bin/flamethrower)],
'dist' => {
'COMPRESS' => 'bzip2 -f',
'SUFFIX' => 'bz2'
},
'PREREQ_PM' => {
AppConfig => '1.52',
},
'realclean' => {FILES => "*.old *.bak *.tar.bz2 *.tar *.tar.gz Makefile MYMETA.*"},
);