From fa0e6792dac880496b8c85dee938d492a21ef550 Mon Sep 17 00:00:00 2001 From: cyoichi Date: Wed, 12 Aug 2015 10:23:17 +0900 Subject: [PATCH] Now, we can download the info manual of coreutils. 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 | 13 +++++++++++-- bin/chkcvs.sh | 7 +++++++ info/GNU_coreutils/Makefile | 23 ++++++++++++++++++++++- stamp/.gitignore | 2 ++ www/.gitignore | 1 + www/Makefile | 2 +- www/bin/link-info-archives.perl | 38 ++++++++++++++++++++++++++++++++++++++ www/download.m4 | 8 ++++++-- www/index.m4 | 5 ++++- 9 files changed, 92 insertions(+), 7 deletions(-) create mode 100755 www/bin/link-info-archives.perl diff --git a/Makefile b/Makefile index 3ee27c40..a0cdc9f5 100644 --- 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: diff --git a/bin/chkcvs.sh b/bin/chkcvs.sh index 9bb80538..f9cbdb29 100755 --- a/bin/chkcvs.sh +++ b/bin/chkcvs.sh @@ -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 + diff --git a/info/GNU_coreutils/Makefile b/info/GNU_coreutils/Makefile index 035b9d68..679a43f5 100644 --- a/info/GNU_coreutils/Makefile +++ b/info/GNU_coreutils/Makefile @@ -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 + diff --git a/stamp/.gitignore b/stamp/.gitignore index 31a6ff11..2ad16eec 100644 --- a/stamp/.gitignore +++ b/stamp/.gitignore @@ -3,3 +3,5 @@ cvs-status-modified www-html-modified www-roff-modified latest-archive-modified +info-release-modified +www-info-modified diff --git a/www/.gitignore b/www/.gitignore index 077f6f42..2cca952a 100644 --- a/www/.gitignore +++ b/www/.gitignore @@ -1,4 +1,5 @@ *.html per-pkg/ man-pages-ja-*.tar.gz +info-pkg/ /news.m4.orig diff --git a/www/Makefile b/www/Makefile index 1c5e3022..9ce9bbdf 100644 --- a/www/Makefile +++ b/www/Makefile @@ -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 index 00000000..1dd0fa66 --- /dev/null +++ b/www/bin/link-info-archives.perl @@ -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 "

\n Sorry, Archives are unavailable now\n

\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 "\n"; + diff --git a/www/download.m4 b/www/download.m4 index 5c7e792a..7461fe81 100644 --- a/www/download.m4 +++ b/www/download.m4 @@ -19,16 +19,20 @@ m4_dnl _MIRROR_LIST(download.html)

なお、各 roff ページの文字コードは UTF-8 です。

-

全体のアーカイブ

+

全体のアーカイブ

-

パッケージ別アーカイブ

+

パッケージ別アーカイブ

m4_esyscmd(./bin/link-partial-archives.perl _DATE) +

info 版マニュアルのアーカイブ

+

info 版マニュアルは man pages 全体のアーカイブには収録されていません。

+ m4_esyscmd(./bin/link-info-archives.perl) + _CREDITS _BACK_TO_HOME diff --git a/www/index.m4 b/www/index.m4 index 81c83e05..a3d0c001 100644 --- a/www/index.m4 +++ b/www/index.m4 @@ -36,6 +36,9 @@ JM プロジェクトは、主に Linux 関連のマニュアルページの日

新着情報