aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.PL
diff options
context:
space:
mode:
authorFlorent Villard <warly@mandriva.com>2006-08-04 16:45:06 +0000
committerFlorent Villard <warly@mandriva.com>2006-08-04 16:45:06 +0000
commit0a7ef4aa1b338a6c23dccd0db15086596f05a22a (patch)
tree620105c88261aa086535f04d1ca5fba94cb4cbbf /Makefile.PL
parent1fec4f0cac5732229070c4ad2e24c01ba2bab51b (diff)
downloadmga-youri-core-0a7ef4aa1b338a6c23dccd0db15086596f05a22a.tar
mga-youri-core-0a7ef4aa1b338a6c23dccd0db15086596f05a22a.tar.gz
mga-youri-core-0a7ef4aa1b338a6c23dccd0db15086596f05a22a.tar.bz2
mga-youri-core-0a7ef4aa1b338a6c23dccd0db15086596f05a22a.tar.xz
mga-youri-core-0a7ef4aa1b338a6c23dccd0db15086596f05a22a.zip
imported initial version of youri svn
Diffstat (limited to 'Makefile.PL')
-rw-r--r--Makefile.PL77
1 files changed, 77 insertions, 0 deletions
diff --git a/Makefile.PL b/Makefile.PL
new file mode 100644
index 0000000..d6a4c5c
--- /dev/null
+++ b/Makefile.PL
@@ -0,0 +1,77 @@
+# $Id: Makefile.PL 880 2006-04-16 21:53:04Z guillomovitch $
+use ExtUtils::MakeMaker;
+
+WriteMakefile(
+ NAME => 'youri',
+ VERSION => 0.9,
+ AUTHOR => 'Youri project <youri@zarb.org>',
+ EXE_FILES => [ 'bin/youri-check', 'bin/youri-upload' ],
+ PREREQ_PM => {
+ 'AppConfig' => 0,
+ 'YAML' => 0,
+ 'DateTime' => 0,
+ 'Pod::Simple::HTMLBatch' => 0
+ }
+);
+
+package MY;
+
+sub post_constants {
+ my ($self) = @_;
+ my $sysconfdir =
+ $self->{ARGS}->{SYSCONFDIR} ||
+ ($self->{INSTALLDIRS} eq 'site' ?
+ '/usr/local/etc' :
+ '/usr/etc');
+ return <<EOF;
+SYSCONFDIR = $sysconfdir
+EOF
+}
+
+sub top_targets {
+ my ($self) = @_;
+ my $top_targets = $self->SUPER::top_targets(@_);
+ $top_targets =~ s/all :: pure_all manifypods/all :: pure_all manifypods htmlifypods/;
+ $top_targets .= <<'EOF';
+htmlifypods : $(TO_INST_PM)
+ if [ ! -d blib/html ]; then mkdir blib/html; fi
+ perl -MPod::Simple::HTMLBatch -e Pod::Simple::HTMLBatch::go lib blib/html
+ -perl -MPod::Simple::HTML -e Pod::Simple::HTML::go bin/youri-check blib/html/youri-check.html
+ -perl -MPod::Simple::HTML -e Pod::Simple::HTML::go bin/youri-upload blib/html/youri-upload.html
+EOF
+ return $top_targets;
+}
+
+sub install {
+ my ($self) = @_;
+ my $install = $self->SUPER::install(@_);
+ $install =~ s/install :: all pure_install doc_install/install :: all pure_install doc_install config_install completion_install/;
+ $install .= <<'EOF';
+config_install :
+ install -d -m 755 $(DESTDIR)$(SYSCONFDIR)/youri
+ install -m 644 etc/check.conf $(DESTDIR)$(SYSCONFDIR)/youri
+ install -m 644 etc/upload.conf $(DESTDIR)$(SYSCONFDIR)/youri
+
+completion_install :
+ install -d -m 755 $(DESTDIR)$(SYSCONFDIR)/bash_completion.d
+ install -m 644 etc/bash_completion.d/youri $(DESTDIR)$(SYSCONFDIR)/bash_completion.d
+EOF
+ return $install;
+}
+
+sub installbin {
+ my ($self) = @_;
+ my $installbin = $self->SUPER::installbin(@_);
+ $installbin .= <<'EOF';
+bin/youri-check : bin/youri-check.in Makefile
+ perl -p \
+ -e 's|\@sysconfdir\@|$(SYSCONFDIR)|;' \
+ < $< > $@
+
+bin/youri-upload : bin/youri-upload.in Makefile
+ perl -p \
+ -e 's|\@sysconfdir\@|$(SYSCONFDIR)|;' \
+ < $< > $@
+EOF
+ return $installbin;
+}