From 96294996078d67cd103c5f0db64dc18ea4784f03 Mon Sep 17 00:00:00 2001 From: Ian Beckwith Date: Sat, 16 Oct 2010 12:38:32 +0100 Subject: [PATCH] fix sbin support --- Makefile.PL | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index 188e130..0724cd7 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -7,12 +7,11 @@ my @sbinscripts=qw(id3fsd); WriteMakefile(NAME=>"id3fs", VERSION=>"1.0", - EXE_FILES=>[ map( "bin/$_", @binscripts), map( "sbin/$_", @sbinscripts) ], + EXE_FILES=>[ map( "bin/$_", @binscripts) ], MAN1PODS=>{ map({ +"bin/$_" => "\${INST_MAN1DIR}/$_.1" } @binscripts) }, - MAN8PODS=>{ map({ +"sbin/$_" => "\${INST_MAN8DIR}/$_.8" } @sbinscripts) }, PREREQ_PM=>{ 'Fuse' => 0, 'DBI' => 0, - 'DBD::Sqlite' => 0} , + 'DBD::SQLite' => 0} , # dist=>{ COMPRESS=>"gzip -9f", SUFFIX=>"gz", }, ($] >= 5.005 ? (ABSTRACT => 'FUSE-based filesystem for browsing music metadata', @@ -33,7 +32,7 @@ sub constants { my $add = q{ # begin id3fs -#MAN5PODS = docs/mp3lintrc.pod +MAN8PODS = sbin/id3fsd INST_MAN8DIR = blib/man8 INSTALLMAN8DIR = $(PREFIX)/man/man8 DESTINSTALLMAN8DIR = $(DESTDIR)$(INSTALLMAN8DIR) @@ -42,9 +41,10 @@ DESTINSTALLSITEMAN8DIR = $(DESTDIR)$(INSTALLSITEMAN8DIR) INSTALLVENDORMAN8DIR = $(VENDORPREFIX)/man/man8 DESTINSTALLVENDORMAN8DIR = $(DESTDIR)$(INSTALLVENDORMAN8DIR) MAN8EXT = 8 -INST_SYSCONFDIR = blib/etc -INSTALLSYSCONFDIR = /etc -DESTINSTALLSYSCONFDIR = $(DESTDIR)$(INSTALLSYSCONFDIR) +SBIN_FILES = sbin/id3fsd +INST_SBINDIR = blib/sbin +INSTALLSBINDIR = $(SITEPREFIX)/sbin +DESTINSTALLSBINDIR = $(DESTDIR)$(INSTALLSBINDIR) # end id3fs }; @@ -68,7 +68,7 @@ sub MY::top_targets { my $add = sprintf <<'MAKE_FRAG', $perlh, $perlh, $perlh, $perlh; # begin id3fs -config :: $(INST_MAN8DIR)/.exists $(INST_SYSCONFDIR)/.exists +config :: $(INST_MAN8DIR)/.exists $(INST_SBINDIR)/.exists @$(NOOP) $(INST_MAN8DIR)/.exists :: %s @@ -76,11 +76,11 @@ $(INST_MAN8DIR)/.exists :: %s @$(EQUALIZE_TIMESTAMP) %s $(INST_MAN8DIR)/.exists -@$(CHMOD) $(PERM_RWX) $(INST_MAN8DIR) -#$(INST_SYSCONFDIR)/.exists :: %s -# @$(MKPATH) $(INST_SYSCONFDIR) -# @$(EQUALIZE_TIMESTAMP) %s $(INST_SYSCONFDIR)/.exists -# -@$(CHMOD) $(PERM_RWX) $(INST_SYSCONFDIR) -# @$(CP) etc/matrc $(INST_SYSCONFDIR) +$(INST_SBINDIR)/.exists :: %s + @$(MKPATH) $(INST_SBINDIR) + @$(EQUALIZE_TIMESTAMP) %s $(INST_SBINDIR)/.exists + -@$(CHMOD) $(PERM_RWX) $(INST_SBINDIR) + @$(CP) $(SBIN_FILES) $(INST_SBINDIR) # end id3fs MAKE_FRAG @@ -101,16 +101,16 @@ sub MY::manifypods { { $pod2man=q{POD2MAN = $(POD2MAN_EXE)}; } -# my $manifypods_local = sprintf <<'MAKE_FRAG', $pod2man; -# -## begin id3fs -#%s -# -#manifypods-local : docs/mp3lintrc.pod -# $(POD2MAN) -s $(MAN8EXT) docs/mp3lintrc.pod $(INST_MAN8DIR)/mp3lintrc.$(MAN8EXT) -# -##end id3fs -#MAKE_FRAG + my $manifypods_local = sprintf <<'MAKE_FRAG', $pod2man; + +# begin id3fs +%s + +manifypods-local : sbin/id3fsd + $(POD2MAN) -s $(MAN8EXT) sbin/id3fsd $(INST_MAN8DIR)/id3fsd.$(MAN8EXT) + +#end id3fs +MAKE_FRAG return $inherited . "\n" . $manifypods_local; @@ -121,9 +121,9 @@ sub MY::install { my $self = shift; my $inherited = $self->SUPER::install(@_); - my $conf="\t\t\$(INST_SYSCONFDIR) \$(DESTINSTALLSYSCONFDIR)"; + my $conf="\t\t\$(INST_SBINDIR) \$(DESTINSTALLSBINDIR)"; $inherited =~ s/(^\s*\$\(INST_MAN)3(DIR\s*.*MAN)3(DIR\))/${1}3${2}3$3 \\\n${1}8${2}8$3 \\\n$conf/gm; -# $inherited =~ s/(^\s*\$\(INST_MAN3DIR\s*.*MAN3DIR\))/$1 \\\n$conf/gm; + $inherited =~ s/(^\s*\$\(INST_MAN3DIR\s*.*MAN3DIR\))/$1 \\\n$conf/gm; return $inherited; } -- 2.11.0