OSDN Git Service

Now, we can download the info manual of coreutils.
authorcyoichi <cyoichi@users.sourceforge.jp>
Wed, 12 Aug 2015 01:23:17 +0000 (10:23 +0900)
committercyoichi <cyoichi@users.sourceforge.jp>
Wed, 12 Aug 2015 01:23:17 +0000 (10:23 +0900)
modified files:
* Makefile
* bin/chkcvs.sh
* info/GNU_coreutils/Makefile
* stamp/.gitignore
* www/.gitignore
* www/Makefile
* www/bin/link-info-archives.perl (new)
* www/download.m4
* www/index.m4

Makefile
bin/chkcvs.sh
info/GNU_coreutils/Makefile
stamp/.gitignore
www/.gitignore
www/Makefile
www/bin/link-info-archives.perl [new file with mode: 0755]
www/download.m4
www/index.m4

index 3ee27c4..a0cdc9f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -29,7 +29,7 @@ JMRPM_BUILD_ROOT=$(TMPDIR)/man-pages-ja-root
 #
 # global rules
 #
-periodic: chkcvs roff html web cgi
+periodic: chkcvs roff infoman html web cgi
 
 all: periodic archive-install 
 
@@ -63,12 +63,21 @@ stamp/www-html-modified: stamp/cvs-release-modified
        mkdir -p $(WWWHTML)
        $(MKRWWW) $(ROFFSRC) $(WWWHTML) $(MAN2HTML)
        $(MKPWWW) $(PODSRC) $(WWWHTML) $(POD2HTML)
-       $(MAKE) -C $(INFOSRC) install
+#      $(MAKE) -C $(INFOSRC) install
        # Remove temporary files generated by pod2html
        rm -f pod2htmd.tmp pod2htmi.tmp
        touch $@
 
 #
+# info tree
+#
+infoman: stamp/www-info-modified
+
+stamp/www-info-modified: stamp/info-release-modified
+       $(MAKE) -C $(INFOSRC) install
+       touch $@
+
+#
 # web & cgi contents
 #
 web:
index 9bb8053..f9cbdb2 100755 (executable)
@@ -6,6 +6,7 @@
 #
 RM=stamp/cvs-release-modified
 SM=stamp/cvs-status-modified
+IM=stamp/info-release-modified
 
 if [ ! -f $RM ]; then
        touch $RM
@@ -20,3 +21,9 @@ elif (find manual -name translation_list -newer $SM | grep -q "."); then
        touch $SM
 fi
 
+if [ ! -f $IM ]; then
+        touch $IM
+elif (find info -newer $IM | grep -q "release"); then
+        touch $IM
+fi
+
index 035b9d6..679a43f 100644 (file)
@@ -4,6 +4,12 @@ PACKAGE = $(shell basename `pwd`)
 MANTYPE = info
 WWWDEST = $(WWWROOT)/$(MANTYPE)/$(PACKAGE)
 
+GITTOP = $(ROOT)/jm.git
+INFOPKGWWW = $(GITTOP)/www/info-pkg
+INFOTMPDIR = $(TMPDIR)/info
+INFORELEASE = $(shell env LANG=C date +"%Y%m%d")
+INFODEST = info-ja-GNU_coreutils-$(INFORELEASE)
+
 TEXI2HTML = texi2html
 TEXIFILE = release/coreutils-ja.texi
 HTMLDIR = html
@@ -17,7 +23,22 @@ $(HTMLFILE): $(TEXIFILE)
 
 clean:
        $(RM) -r $(HTMLDIR)
+       $(RM) -r $(INFOPKGWWW)
 
-install:       $(HTMLFILE)
+html-install:  $(HTMLFILE)
        mkdir -p $(WWWDEST)
        rsync -av --delete $(HTMLDIR)/ $(WWWDEST)
+
+pkg-install:
+       [ -d $(INFOPKGWWW) ] || mkdir -p $(INFOPKGWWW)
+       -rm $(INFOPKGWWW)/info-ja-GNU_coreutils-*
+       [ -d $(INFOTMPDIR) ] || mkdir -p $(INFOTMPDIR)
+       -rm -rf $(INFOTMPDIR)/info-ja-GNU_coreutils-*
+       mkdir -p $(INFOTMPDIR)/$(INFODEST)
+       cp -p release/* $(INFOTMPDIR)/$(INFODEST)
+       cd $(INFOTMPDIR); \
+       tar czf $(INFODEST).tar.gz $(INFODEST); \
+       cp -p $(INFODEST).tar.gz $(INFOPKGWWW)
+
+install:       html-install pkg-install
+
index 31a6ff1..2ad16ee 100644 (file)
@@ -3,3 +3,5 @@ cvs-status-modified
 www-html-modified
 www-roff-modified
 latest-archive-modified
+info-release-modified
+www-info-modified
index 077f6f4..2cca952 100644 (file)
@@ -1,4 +1,5 @@
 *.html
 per-pkg/
 man-pages-ja-*.tar.gz
+info-pkg/
 /news.m4.orig
index 1c5e302..9ce9bbd 100644 (file)
@@ -42,7 +42,7 @@ INSTALL.html: ../dist/INSTALL
 ../dist/README ../dist/INSTALL:
        $(MAKE) -C .. -f Makefile.dist
 
-download.html: download.m4 ../stamp/latest-archive-modified
+download.html: download.m4 ../stamp/latest-archive-modified ../stamp/www-info-modified
        m4 -P -D _WORKDIR=$(WORKDIR) -D _DATE=$(DATE) $< | nkf -w > $@
 
 ../stamp/latest-archive-modified:
diff --git a/www/bin/link-info-archives.perl b/www/bin/link-info-archives.perl
new file mode 100755 (executable)
index 0000000..1dd0fa6
--- /dev/null
@@ -0,0 +1,38 @@
+#!/usr/bin/perl
+#
+# download.html 用のアーカイブリンクエントリを作る. (info 用)
+#
+$ENV{"LANG"}="C";
+
+BEGIN{
+    $epath = `dirname $0`; chomp $epath;
+    unshift (@INC, $epath);
+}
+use linkInfo('get_latest_file', 'print_file_info');
+
+sub print_unavail() {
+    print "<P>\n Sorry, Archives are unavailable now\n</P>\n";
+    exit 0;
+}
+
+#
+#yes, it's an ugly hack...
+#
+$fpath = get_latest_file("info-pkg/info-ja-GNU_coreutils-*.tar.gz");
+print_unavail() if (not $fpath);
+if ($fpath !~ m|info-pkg/info-ja-GNU_coreutils-(\d+).tar.gz|) {
+  print_unavail();
+}
+#$date = $1;
+
+@fpaths = glob("info-pkg/info-ja-*.tar.gz");
+
+print "<UL>\n";
+foreach $fpath (@fpaths){
+    print "<LI>";
+    print_file_info($fpath, "it");
+    print "</LI>\n";
+}
+close LS;
+print "</UL>\n";
+
index 5c7e792..7461fe8 100644 (file)
@@ -19,16 +19,20 @@ m4_dnl _MIRROR_LIST(download.html)
 
 <P>なお、各 roff ページの文字コードは UTF-8 です。</P>
 
-<H2>全体のアーカイブ</H2>
+<H2><A NAME="ALL_IN_ONE">全体のアーカイブ</A></H2>
 <UL>
  <LI>m4_esyscmd(./bin/link-whole-archive.perl _DATE)</LI>
  <LI>アーカイブの _LINK(README.html,README ファイル)</LI>
  <LI>アーカイブの _LINK(INSTALL.html,INSTALL ファイル)</LI>
 </UL>
 
-<H2>パッケージ別アーカイブ</H2>
+<H2><A NAME="EACH_MANUAL">パッケージ別アーカイブ</A></H2>
  m4_esyscmd(./bin/link-partial-archives.perl _DATE)
 
+<H2><A NAME="INFO_MANUAL">info 版マニュアルのアーカイブ</A></H2>
+<P>info 版マニュアルは man pages 全体のアーカイブには収録されていません。</P>
+ m4_esyscmd(./bin/link-info-archives.perl)
+
 _CREDITS
 
 _BACK_TO_HOME
index 81c83e0..a3d0c00 100644 (file)
@@ -36,6 +36,9 @@ JM プロジェクトは、主に Linux 関連のマニュアルページの日
 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
 <H2><A NAME="WHATSNEW">新着情報</A></H2>
 <UL>
+ <LI>_LINK(download.html#INFO_MANUAL, GNU coreutils 8.22 の info 版マニュアルの翻訳をダウンロード)できるようにしました。
+ <SMALL>(2015/07/26)</SMALL>
+
  <LI>_LINK(INDEX/ldp.html,LDP man-pages 3.79 対応版)を更新しました。
   詳細は_LINK(news/index.html#20150205,こちら)。
  <SMALL>(2015/02/05)</SMALL>
@@ -60,7 +63,7 @@ JM プロジェクトは、主に Linux 関連のマニュアルページの日
   詳細は_LINK(news/index.html#20150109,こちら)。
  <SMALL>(2015/01/09)</SMALL>
 
- <LI>_LINK(info/GNU_coreutils/coreutils-ja.html,GNU coreutils info)の翻訳を 8.22 に更新しました。
+ <LI>_LINK(info/GNU_coreutils/coreutils-ja.html,GNU coreutils info) の翻訳を 8.22 に更新しました。
  <SMALL>(2014/11/25)</SMALL>
 
  <LI>_LINK(../INDEX/gnu.html#GNU_coreutils,GNU coreutils 8.22 の翻訳)を公開しました。