• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythongamewindowsbathyscaphephpguic翻訳omegattwitterframeworktestbtronarduinovb.net計画中(planning stage)directxpreviewerゲームエンジンdom

hanzubon2


Commit MetaInfo

修订版e042462d313f0ff33183d2f1f358bb4a0d24ed91 (tree)
时间2009-10-16 20:19:07
作者ishikawa <ishikawa@d141...>
Commiterishikawa

Log Message

update Makefile.PL to install all files correct place (ticket: #18886)

git-svn-id: file:///home/ishikawa/tmp/TEST/SVN/keitairc/trunk@328 d1410196-9ac4-404c-8836-01155b1afb10

更改概述

差异

--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
1+2009-10-16 ISHIKAWA Mutsumi <ishikawa@hanzubon.jp>
2+
3+ * Makefile.PL, lib/keitairc/Config.pm:
4+ Update Makefile.PL install all files to correct directry
5+ (ticket: #18886)
6+ And Add make install_doc option for installing documents
7+ * MANIFEST: add missing files
8+
19 2009-09-26 Makoto Matsushita <matusita@jp.FreeBSD.org>
210
311 * Makefile.PL: add perl module dependencies (#18886 b)),
--- a/MANIFEST
+++ b/MANIFEST
@@ -56,11 +56,11 @@ lib/plugins/99keyword
5656 lib/public/favicon.ico
5757 lib/public/geopost-keitairc.js
5858 lib/public/iui-keitairc.css
59-lib/public/noreferrer-keitairc.js
6059 lib/public/iui/backButton.png
6160 lib/public/iui/blueButton.png
6261 lib/public/iui/cancel.png
6362 lib/public/iui/grayButton.png
63+lib/public/iui/iui-logo-touch-icon.png
6464 lib/public/iui/iui.css
6565 lib/public/iui/iui.js
6666 lib/public/iui/iuix.css
@@ -77,6 +77,7 @@ lib/public/iui/toggleOn.png
7777 lib/public/iui/toolbar.png
7878 lib/public/iui/toolButton.png
7979 lib/public/iui/whiteButton.png
80+lib/public/noreferrer-keitairc.js
8081 lib/public/robots.txt
8182 lib/templates/default/404.html
8283 lib/templates/default/address.html
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1,12 +1,16 @@
11 # -*-perl-*-
2-# $Id: Makefile.PL,v 1.5 2009-10-14 07:39:01 ishikawa Exp $
2+# $Id: Makefile.PL,v 1.6 2009-10-16 11:19:07 ishikawa Exp $
33 # $Source: /home/ishikawa/tmp/TEST/CVS/keitairc/Makefile.PL,v $
44
55 use 5.8.0;
66 use ExtUtils::MakeMaker;
77
88 my %pms;
9-map {$d = $_; $d =~ s@lib/Keitairc/@\$(INST_LIBDIR)/@; $pms{$_} = $d} glob('lib/Keitairc/*.pm');
9+map {$d = $_; $d =~ s@lib/Keitairc/@\$(INST_LIBDIR)/Keitairc/@; $pms{$_} = $d} glob('lib/Keitairc/*.pm');
10+
11+my $data = join(' ', map ({s!^lib/!!g ; $_} glob('lib/templates/*/*.html lib/plugins/[0-9]* lib/public/*.{ico,js,css,txt} lib/public/iui/*.{css,js,png,gif}')));
12+
13+my $docs = join(' ', map ({s!^doc/!!g ; $_} glob('doc/*.{gif,psd,png,html,css,jpg} doc/iui/*.txt')));
1014
1115 WriteMakefile(
1216 NAME => 'keitairc',
@@ -28,4 +32,23 @@ WriteMakefile(
2832 },
2933 EXE_FILES => ['keitairc'],
3034 PM => \%pms,
31-)
35+ PM_FILTER => "sed -e 's!__KEITAIRC_DATA_DIR__!\$(KEITAIRC_DATADIR)!g'",
36+ 'macro' => {
37+ KEITAIRC_DATADIR => '$(PREFIX)/share/keitairc',
38+ KEITAIRC_DATA => $data,
39+ KEITAIRC_DOCSDIR => '$(PREFIX)/share/doc/keitairc',
40+ KEITAIRC_DOCS => $docs,
41+ }
42+);
43+
44+sub MY::postamble {
45+ my $self = shift;
46+ return <<MAKE_FRAG
47+install ::
48+ for i in \$(KEITAIRC_DATA) ; do [ -d \$(DESTDIR)/\$(KEITAIRC_DATADIR)/\$\$(dirname \$\$i) ] || mkdir -p \$(DESTDIR)/\$(KEITAIRC_DATADIR)/\$\$(dirname \$\$i) ; install -m 644 lib/\$\$i \$(DESTDIR)/\$(KEITAIRC_DATADIR)/\$\$i ; done
49+
50+install_doc ::
51+ for i in \$(KEITAIRC_DOCS) ; do [ -d \$(DESTDIR)/\$(KEITAIRC_DOCSDIR)/\$\$(dirname \$\$i) ] || mkdir -p \$(DESTDIR)/\$(KEITAIRC_DOCSDIR)/\$\$(dirname \$\$i) ; install -m 644 doc/\$\$i \$(DESTDIR)/\$(KEITAIRC_DOCSDIR)/\$\$i ; done
52+ install -m 644 etc/dot.keitairc \$(DESTDIR)/\$(KEITAIRC_DOCSDIR)/
53+MAKE_FRAG
54+}
--- a/lib/Keitairc/Config.pm
+++ b/lib/Keitairc/Config.pm
@@ -1,6 +1,6 @@
11 # -*- mode: perl; coding: utf-8 -*-
22 # Keitairc::Config
3-# $Id: Config.pm,v 1.35 2009-09-24 16:17:00 morimoto Exp $
3+# $Id: Config.pm,v 1.36 2009-10-16 11:19:07 ishikawa Exp $
44 # $Source: /home/ishikawa/tmp/TEST/CVS/keitairc/lib/Keitairc/Config.pm,v $
55 #
66 # Copyright (c) 2008 Jun Morimoto <morimoto@mrmt.net>
@@ -71,9 +71,9 @@ sub new{
7171 $me->emobile_userid('');
7272 $me->pid_dir('/var/run');
7373 $me->pid_file('keitairc.pid');
74- $me->plugin_dir(getcwd() . '/lib/plugins:/usr/share/keitairc/lib/plugins');
75- $me->template_dir(getcwd() . '/lib/templates:/usr/share/keitairc/lib/templates');
76- $me->public_dir(getcwd() . '/lib/public:/usr/share/keitairc/lib/public');
74+ $me->plugin_dir(getcwd() . '/lib/plugins:__KEITAIRC_DATA_DIR__/plugins');
75+ $me->template_dir(getcwd() . '/lib/templates:__KEITAIRC_DATA_DIR__/templates');
76+ $me->public_dir(getcwd() . '/lib/public:__KEITAIRC_DATA_DIR__/public');
7777 $me->reverse_message(1);
7878 $me->reverse_recent(1);
7979 $me->reverse_unread(1);