From: PHO Date: Fri, 16 Nov 2012 06:07:06 +0000 (+0900) Subject: Makefile.PL for rc.d X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Fmaster;p=pci-nopaste.git Makefile.PL for rc.d --- diff --git a/po/ja.po b/po/ja.po index 4de948c..747e54d 100644 --- a/po/ja.po +++ b/po/ja.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: pci-nopaste #0\n" "Report-Msgid-Bugs-To: phonohawk \n" -"POT-Creation-Date: 2012-11-06 14:27+0900\n" +"POT-Creation-Date: 2012-11-16 15:01+0900\n" "PO-Revision-Date: 2005-09-24 17:57+0900\n" "Last-Translator: phonohawk \n" "Language-Team: Japanese \n" diff --git a/rc.d/Makefile.PL b/rc.d/Makefile.PL new file mode 100644 index 0000000..9ba39ce --- /dev/null +++ b/rc.d/Makefile.PL @@ -0,0 +1,5 @@ +use ExtUtils::MakeMaker; + +WriteMakefile( + NAME => 'rc.d' + ); diff --git a/rc.d/linux/Makefile.PL b/rc.d/linux/Makefile.PL new file mode 100644 index 0000000..34a49c6 --- /dev/null +++ b/rc.d/linux/Makefile.PL @@ -0,0 +1,27 @@ +use strict; +use warnings; +use Config qw(%Config); +use ExtUtils::MakeMaker; +use File::Slurp qw(read_file write_file); + +# FIXME: Stop hard-coding these variables. +my %vars = ( + DAEMON => '/usr/local/sbin/daemon', + bindir => $Config{installbin}, + localstatedir => '/usr/local/var', + sysconfdir => '/usr/local/etc' + ); + +my $script = read_file('pci-nopaste.in'); + +while (my ($var, $subst) = each %vars) { + $script =~ s/\@\Q$var\E\@/$subst/g; +} + +print "Writing pci-nopaste\n"; +write_file('pci-nopaste', $script); +chmod 0755, 'pci-nopaste'; + +WriteMakefile( + NAME => 'linux' + );