[DRE-commits] [tdiary] 01/01: Update Debian specifc tools

Youhei SASAKI uwabami-guest at moszumanska.debian.org
Sun Mar 8 13:07:29 UTC 2015


This is an automated email from the git hooks/post-receive script.

uwabami-guest pushed a commit to branch master
in repository tdiary.

commit a5598dd740c10fa2f3cedac082bf2e31b9c5eecc
Author: Youhei SASAKI <uwabami at gfd-dennou.org>
Date:   Mon Mar 2 10:47:42 2015 +0900

    Update Debian specifc tools
    
    Signed-off-by: Youhei SASAKI <uwabami at gfd-dennou.org>
---
 debian/copyright                                   | 405 ++++++++++++++++++---
 debian/{ => debian-tools}/20change_url.rb          |   0
 debian/{ => debian-tools}/TC_tdiary-setup.rb       |   0
 debian/old/packaging-tools-author.rb               |  56 ---
 .../old/packaging-tools-author-plugin.rb           |   0
 .../old/packaging-tools-author-theme.rb            |   0
 debian/packaging-tools/packaging-tools-author.rb   | 130 +++++++
 debian/{docs => tdiary-core.docs}                  |   0
 debian/tdiary-core.install                         |   4 +-
 9 files changed, 484 insertions(+), 111 deletions(-)

diff --git a/debian/copyright b/debian/copyright
index 73be805..31fdd7e 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -3,65 +3,364 @@ Upstream-Name: tDiary
 Upstream-Contact: http://www.tdiary.org/20000102.html
 Source: https://github.com/tdiary
 Copyright: (C) 2001-2010 TADA Tadashi <sho at spc.gr.jp>
-License: GPL-2
+License: GPL-2.0+
 Disclaimer:
     A lot of people have contributed to this software.  I picked them out
     at copyright file for each binary package.  Please take a look at the
     binary package dedicated copyright file.
 
-Files: tdiary.rb index.rb update.rb tdiary/defaultio.rb tdiary/pstoreio.rb
-    tdiary/tdiary_style.rb tdiary/filter/default.rb
-    tdiary/filter/spamakismet.rb tdiary/filter/spamlinkcheck.rb
-    tdiary/lang/*.rb plugin/00default.rb plugin/50sp.rb
-Copyright: (C) 2001-2007, TADA Tadashi <sho at spc.gr.jp>
-License: GPL-2
-
-Files: misc/hikidoc.rb
-Copyright: (C) 2005, Kazuhiko <kazuhiko at fdiary.net>
-License:
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions are
-  met:
-  .
-  * Redistributions of source code must retain the above copyright
-    notice, this list of conditions and the following disclaimer.
-  * Redistributions in binary form must reproduce the above
-    copyright notice, this list of conditions and the following
-    disclaimer in the documentation and/or other materials provided
-    with the distribution.
-  * Neither the name of the HikiDoc nor the names of its
-    contributors may be used to endorse or promote products derived
-    from this software without specific prior written permission.
-  .
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Files: tdiary/wiki_style.rb
-Copyright: (C) 2003, TADA Tadashi <sho at spc.gr.jp>
-           (C) 2005, Kazuhiko <kazuhiko at fdiary.net>  
-License: GPL-2
-
-Files: tdiary/filter/spam.rb plugin/10spamfilter.rb
-Copyright: (C) 2005  akira yamada
-License: GPL-2
+Files: *
+Copyright: (C) 2001-2007 TADA Tadashi <sho at spc.gr.jp>
+License: GPL-2.0+
+
+Files: misc/plugin/title_tag.rb
+Copyright: (C) 2003 URABE Shyouhei <root at mput.dip.jp>
+License: Expat
+
+Files: misc/plugin/makerss.rb
+Copyright: (C) 2009 TADA Tadashi <t at tdtds.jp>
+License: GPL-2.0+
 
 Files: debian/*
 Copyright: (C) 2002-2012 Daigo Moriwaki <daigo at debian.org>
            (C) 2012 Taku YASUI <tach at debian.org>
-License: GPL-2
-
-License: GPL-2
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2.
-    On Debian GNU/Linux systems, the complete text of the GNU General
-    Public License can be found in `/usr/share/common-licenses/GPL-2'
+           (C) 2015 Youhei SASAKI <uwabami at gfd-dennou.org>
+License: GPL-2.0+
+
+Files: misc/plugin/todo.rb misc/plugin/ja/todo.rb misc/plugin/en/todo.rb
+Copyright: (C) 2001 2002 2003 Junichiro KITA <kita at kitaj.no-ip.com>
+License: GPL-2.0+
+
+Files: misc/plugin/calendar2.rb misc/plugin/recent_list.rb misc/plugin/calendar3.rb
+Copyright: (C) 2001 2002 Junichiro KITA <kita at kitaj.no-ip.com>
+License: GPL-2.0+
+
+Files: misc/convert2.rb
+Copyright: (C) 2001 2002 TADA Tadashi <sho at spc.gr.jp>
+License: GPL-2.0+
+
+Files: misc/lib/fcgi_patch.rb
+Copyright: (C) 2001 Eli Green
+           (C) 2002-2003 MoonWolf <moonwolf at moonwolf.com>
+           (C) 2004 Minero Aoki
+           (C) 2011 Kazuhiko <kazuhiko at fdiary.net>
+License: GPL-2.0+
+
+Files: misc/migrate.rb
+Copyright: (C) 2001-2003 TADA Tadashi <sho at spc.gr.jp>
+           (C) 2007 Kazuhiko <kazuhiko at fdiary.net>
+License: GPL-2.0+
+
+Files: theme/base.css
+Copyright: (C) 2001-2005 TADA Tadashi <sho at spc.gr.jp>
+License: GPL-2.0+
+
+Files: lib/tdiary/style/tdiary.rb lib/tdiary/io/default.rb lib/tdiary/io/pstore.rb lib/tdiary/plugin/ja/00default.rb lib/tdiary/plugin/en/00default.rb lib/tdiary/filter/default.rb
+Copyright: (C) 2001-2005 TADA Tadashi <t at tdtds.jp>
+License: GPL-2.0+
+
+Files: index.rb update.rb
+Copyright: (C) 2001-2009 TADA Tadashi <t at tdtds.jp>
+License: GPL-2.0+
+
+Files: lib/tdiary/lang/ja.rb lib/tdiary/lang/en.rb
+Copyright: (C) 2001-2011 TADA Tadashi <t at tdtds.jp>
+License: GPL-2.0+
+
+Files: lib/tdiary.rb
+Copyright: (C) 2001-2013 TADA Tadashi <t at tdtds.jp>
+License: GPL-2.0+
+
+Files: misc/plugin/image.rb
+Copyright: (C) 2002 2003 Daisuke Kato <dai at kato-agri.com>
+           (C) 2002 Toshi Okada <toshi at neverland.to>
+           (C) 2003 Yoshimi KURUMA <yoshimik at iris.dti.ne.jp>
+License: GPL-2.0+
+
+Files: misc/plugin/ja/amazon.rb misc/plugin/en/amazon.rb
+Copyright: (C) 2002 HAL99 <hal99 at mtj.biglobe.ne.jp>
+License: GPL-2.0+
+
+Files: misc/plugin/recent_namazu.rb
+Copyright: (C) 2002 Hiroyuki Ikezoe <zoe at kasumi.sakura.ne.jp>
+License: GPL-2.0+
+
+Files: misc/plugin/recent_comment3.rb misc/plugin/whatsnew.rb misc/plugin/navi_user.rb
+Copyright: (C) 2002 Junichiro KITA <kita at kitaj.no-ip.com>
+License: GPL-2.0+
+
+Files: misc/plugin/search_form.rb misc/plugin/referer-antibot.rb
+Copyright: (C) 2002 MUTOH Masao <mutoh at highway.ne.jp>
+License: GPL-2.0+
+
+Files: misc/plugin/squeeze.rb
+Copyright: (C) 2002 MUTOH Masao <mutoh at highway.ne.jp>
+           (C) 2002 MUTOH Masao<mutoh at highway.ne.jp></p></div>
+License: GPL-2.0+
+
+Files: misc/plugin/tlink.rb misc/theme_convert/theme_convert.rb
+Copyright: (C) 2002 NT <nt at 24i.net>
+License: GPL-2.0+
+
+Files: misc/plugin/gradient.rb misc/plugin/comment_rank.rb misc/plugin/my-ex.rb misc/plugin/append-css.rb misc/plugin/recent_comment.rb misc/plugin/gradation.rb misc/plugin/speed_comment.rb misc/plugin/html_anchor.rb
+Copyright: (C) 2002 TADA Tadashi <sho at spc.gr.jp>
+License: GPL-2.0+
+
+Files: misc/plugin/list.rb
+Copyright: (C) 2002 abbey <inlet at cello.no-ip.org>
+License: GPL-2.0+
+
+Files: misc/plugin/bq.rb
+Copyright: (C) 2002 s.sawada <moonwave at ba2.so-net.ne.jp>
+License: GPL-2.0+
+
+Files: misc/plugin/a.rb
+Copyright: (C) 2002-2004 MUTOH Masao <mutoh at highway.ne.jp>
+License: GPL-2.0+
+
+Files: misc/plugin/counter.rb
+Copyright: (C) 2002-2006 Masao Mutoh
+License: GPL-2.0+
+
+Files: misc/plugin/makelirs.rb
+Copyright: (C) 2002Kazuhiro NISHIYAMA
+License: GPL-2.0+
+
+Files: misc/plugin/number_anchor.rb
+Copyright: (C) 2002zoe <http://www.kasumi.sakura.ne.jp/~zoe/tdiary/>
+License: GPL-2.0+
+
+Files: misc/plugin/ja/search_control.rb misc/plugin/search_control.rb misc/plugin/en/search_control.rb
+Copyright: (C) 2003 2004 zunda <zunda at freeshell.org>
+License: GPL-2.0+
+
+Files: misc/plugin/random_google.rb misc/plugin/category.rb
+Copyright: (C) 2003 Junichiro KITA <kita at kitaj.no-ip.com>
+License: GPL-2.0+
+
+Files: misc/plugin/sn.rb
+Copyright: (C) 2003 SAKAMOTO Hideki <hs at on-sky.net>
+License: GPL-2.0+
+
+Files: misc/plugin/dropdown_calendar.rb
+Copyright: (C) 2003 TADA Tadashi
+License: GPL-2.0+
+
+Files: misc/plugin/tb-show.rb misc/plugin/kw.rb misc/plugin/comment_mail-smtp.rb misc/plugin/comment_mail-qmail.rb misc/plugin/comment_mail-sendmail.rb misc/plugin/pb-show.rb
+Copyright: (C) 2003 TADA Tadashi <sho at spc.gr.jp>
+License: GPL-2.0+
+
+Files: lib/tdiary/style/wiki.rb
+Copyright: (C) 2003 TADA Tadashi <t at tdtds.jp>
+           (C) 2005 Kazuhiko <kazuhiko at fdiary.net>
+License: GPL-2.0+
+
+Files: lib/tdiary/plugin/ja/50sp.rb lib/tdiary/plugin/ja/60sf.rb lib/tdiary/plugin/en/50sp.rb lib/tdiary/plugin/en/60sf.rb misc/plugin/ja/disp_referrer.rb misc/plugin/ja/weather.rb misc/plugin/ja/referer_scheme.rb misc/plugin/referer_scheme.rb misc/plugin/en/disp_referrer.rb misc/plugin/en/weather.rb misc/plugin/en/referer_scheme.rb
+Copyright: (C) 2003 zunda <zunda at freeshell.org>
+License: GPL-2.0+
+
+Files: misc/plugin/weather.rb
+Copyright: (C) 2003 zunda <zunda at freeshell.org>
+           (C) 2000 2001 Minero Aoki <aamine at loveruby.net>
+License: GPL-2.0+
+
+Files: misc/plugin/recent_rss.rb misc/plugin/ja/recent_rss.rb misc/plugin/en/recent_rss.rb
+Copyright: (C) 2003-2005 Kouhei Sutou <kou at cozmixng.org>
+License: GPL-2.0+
+
+Files: misc/plugin/search-default.rb
+Copyright: (C) 2003-2005 Minero Aoki
+           (C) 2012 TADA Tadashi <t at tdtds.jp>
+License: GPL-2.0+
+
+Files: misc/plugin/disp_referrer.rb
+Copyright: (C) 2003-2005 zunda <zunda at freeshell.org>
+           (C) 2000 Network Applied Communication Laboratory Inc.
+           (C) 2000 Information-technology Promotion Agency Japan
+License: GPL-2.0+
+
+Files: misc/plugin/highlight.rb
+Copyright: (C) 2003Ryuji SAKAI
+           (C) 2003Kazuhiro NISHIYAMA
+           (C) 2011MATSUOKA Kohei
+License: GPL-2.0+
+
+Files: js/highlight.js
+Copyright: (C) 2003Ryuji SAKAI
+           (C) 2003Kazuhiro NISHIYAMA
+           (C) 2011MATSUOKA Kohei <kmachu at gmail.com>
+License: GPL-2.0+
+
+Files: index.fcgi
+Copyright: (C) 2004 Akinori MUSHA
+           (C) 2006 moriq
+           (C) 2006-2009 Kazuhiko <kazuhiko at fdiary.net>
+License: GPL-2.0+
+
+Files: update.fcgi
+Copyright: (C) 2004 Akinori MUSHA
+           (C) 2006 moriq
+           (C) 2011 Kazuhiko <kazuhiko at fdiary.net>
+License: GPL-2.0+
+
+Files: misc/plugin/ja/category.rb misc/plugin/en/category.rb
+Copyright: (C) 2004 Junichiro KITA <kita at kitaj.no-ip.com>
+License: GPL-2.0+
+
+Files: misc/plugin/xmlrpc/xmlrpc.rb misc/plugin/xmlrpc.rb
+Copyright: (C) 2004 MoonWolf <moonwolf at moonwolf.com>
+License: GPL-2.0+
+
+Files: misc/plugin/ping.rb
+Copyright: (C) 2004 TADA Tadashi <sho at spc.gr.jp>
+License: GPL-2.0+
+
+Files: misc/plugin/ja/recent_comment.rb misc/plugin/en/recent_comment3.rb misc/plugin/en/recent_comment.rb
+Copyright: (C) 2005 Hiroshi SHIBATA <h-sbt at nifty.com>
+License: GPL-2.0+
+
+Files: misc/plugin/daily_theme.rb misc/plugin/ja/recent_comment3.rb misc/plugin/ja/daily_theme.rb misc/plugin/en/daily_theme.rb
+Copyright: (C) 2005 SHIBATA Hiroshi <h-sbt at nifty.com>
+License: GPL-2.0+
+
+Files: theme/conf.css misc/plugin/doctype-html401tr.rb misc/plugin/title_list.rb misc/plugin/amazon/amazonimg.rb misc/plugin/src.rb
+Copyright: (C) 2005 TADA Tadashi <sho at spc.gr.jp>
+License: GPL-2.0+
+
+Files: lib/tdiary/plugin/05referer.rb
+Copyright: (C) 2005 TADA Tadashi <t at tdtds.jp>
+License: GPL-2.0+
+
+Files: lib/tdiary/plugin/10spamfilter.rb lib/tdiary/filter/spam.rb
+Copyright: (C) 2005 akira yamada
+License: GPL-2.0+
+
+Files: misc/plugin/amazon.rb
+Copyright: (C) 2005-2007 TADA Tadashi <sho at spc.gr.jp>
+License: GPL-2.0+
+
+Files: misc/plugin/en/counter.rb
+Copyright: (C) 2006 Masao Mutoh
+License: GPL-2.0+
+
+Files: lib/tdiary/plugin/ja/05referer.rb lib/tdiary/plugin/en/05referer.rb
+Copyright: (C) 2006 TADA Tadashi <t at tdtds.jp>
+License: GPL-2.0+
+
+Files: misc/plugin/my-sequel.rb misc/plugin/ja/my-sequel.rb
+Copyright: (C) 2006 zunda <zunda at freeshell.org> and
+License: GPL-2.0+
+
+Files: misc/plugin/footnote.rb
+Copyright: (C) 2007 TADA Tadashi <sho at spc.gr.jp>
+License: GPL-2.0+
+
+Files: misc/plugin/edit_today.rb
+Copyright: (C) 2007NOB <nob at harunaru.com>
+License: GPL-2.0+
+
+Files: misc/plugin/hide-mail-field.rb
+Copyright: (C) 2007TADA Tadahi <sho at spc.gr.jp>
+License: GPL-2.0+
+
+Files: misc/filter/linkcheck.rb
+Copyright: (C) 2007TADA Tadashi <sho at spc.gr.jp>
+License: GPL-2.0+
+
+Files: lib/tdiary/server.rb lib/tdiary/tasks/server.rake
+Copyright: (C) 2008-2010 Kakutani Shintaro <shintaro at kakutani.com>
+License: GPL-2.0+
+
+Files: lib/tdiary/plugin/00default.rb js/00default.js misc/plugin/pre_wrap.rb
+Copyright: (C) 2010 TADA Tadashi <t at tdtds.jp>
+License: GPL-2.0+
+
+Files: misc/plugin/category_autocomplete.rb
+Copyright: (C) 2010-2012 tamoot <tamoot+tdiary at gmail.com>
+License: GPL-2.0+
+
+Files: js/category.js js/01conf.js js/amazon.js
+Copyright: (C) 2011TADA Tadashi <t at tdtds.jp>
+License: GPL-2.0+
+
+Files: js/image.js
+Copyright: (C) 2011TADA Tadashi <t at tdtds.jp>
+           (C) 2011hb <smallstyle at gmail.com>
+License: GPL-2.0+
+
+Files: js/caretposition.js
+Copyright: (C) 2012- Hiroki Akiyama http://akiroom.com/
+License: GPL-2.0+
+
+Files: js/category_autocomplete.js
+Copyright: (C) 2012tamoot <tamoot+tdiary at gmail.com>
+License: GPL-2.0+
+
+Files: misc/plugin/comment_emoji_autocomplete.rb
+Copyright: (C) 2013 tamoot <tamoot+tdiary at gmail.com>
+License: GPL-2.0+
+
+Files: js/comment_ajax.js
+Copyright: (C) 2013MATSUOKA Kohei <kohei at machu.jp>
+License: GPL-2.0+
+
+Files: js/comment_emoji_autocomplete.js
+Copyright: (C) 2013tamoot <tamoot+tdiary at gmail.com>
+License: GPL-2.0+
+
+Files: misc/plugin/theme_online.rb
+Copyright: (C) 2014TADA Tadashi <t at tdtds.jp>
+License: GPL-2.0+
+
+Files: js/draft.js misc/plugin/draft.rb
+Copyright: (C) MATSUOKA Kohei <http://www.machu.jp/>
+License: GPL-2.0+
+
+Files: misc/filter/limitdays.rb
+Copyright: (C) 2008 SHIBATA Hiroshi <shibata.hiroshi at gmail.com>
+License: GPL-2.0+
+
+Files: misc/filter/antispamservice.rb misc/filter/plugin/antispamservice.rb
+Copyright: (C) 2007 TADA Tadashi <sho at spc.gr.jp>
+License: GPL-2.0+
+
+Files: theme/default/default.css
+Copyright: (C) TADA Tadashi <t at tdtds.jp>
+License: GPL-2.0+
+
+
+License: Expat
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included
+ in all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+License: GPL-2.0+
+ This package is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
diff --git a/debian/20change_url.rb b/debian/debian-tools/20change_url.rb
similarity index 100%
rename from debian/20change_url.rb
rename to debian/debian-tools/20change_url.rb
diff --git a/debian/TC_tdiary-setup.rb b/debian/debian-tools/TC_tdiary-setup.rb
similarity index 100%
rename from debian/TC_tdiary-setup.rb
rename to debian/debian-tools/TC_tdiary-setup.rb
diff --git a/debian/old/packaging-tools-author.rb b/debian/old/packaging-tools-author.rb
deleted file mode 100644
index 0b21c43..0000000
--- a/debian/old/packaging-tools-author.rb
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/env ruby
-
-#
-# Extract copyright holders.
-# Author:   Daigo Moriwaki <beatles at sgtpepper.net>
-# Copyright (c) 2005 Daigo Moriwaki
-# License:  GNU GENERAL PUBLIC LICENSE Version 2 or later.
-#
-$KCODE = "E"
-
-def grep(pattern)
-  lines = IO.popen("zsh -c \"grep -i copyright #{pattern}\"") {|io| io.readlines}
-
-  authors = []
-  trush   = []
-
-  lines.each do |l|
-    case l
-    when /\d{4},?\s+(.*)/     # 2004(,) ....
-      s = $1.strip
-      s.gsub!(/by\s+/i, "")   # 2004 by ...
-      authors << s
-    when /by\s+(.*)$/i        # by ...
-      s = $1.strip
-      authors << s
-    when /\(C\)\s*(.*)$/i     # (C) ...
-      authors << $1.strip
-    else
-      trush << l
-    end
-  end
-
-  authors.map! do |s|
-    s.gsub!(/\(C\)\s*/,"")
-    s.gsub!(/\. All Rights Reserved\./, "")
-    s.gsub!(/^\d{4}-\d{4}\./,"")
-    s
-  end
-  return authors.uniq.sort, trush
-end
-
-def output(authors, trush)
-  puts authors
-  puts
-  puts trush
-end
-
-puts "+++ tdiary-plugin +++"
-output *grep("tdiary-plugin/**/*.rb")
-puts
-puts "+++ tdiary-theme +++"
-output *grep("tdiary-theme/**/README")
-puts
-puts "+++ tdiary-contrib +++"
-output *grep("tdiary-contrib/**/*.rb")
-
diff --git a/debian/old/packaging-tools-author-plugin.rb b/debian/packaging-tools/old/packaging-tools-author-plugin.rb
similarity index 100%
rename from debian/old/packaging-tools-author-plugin.rb
rename to debian/packaging-tools/old/packaging-tools-author-plugin.rb
diff --git a/debian/old/packaging-tools-author-theme.rb b/debian/packaging-tools/old/packaging-tools-author-theme.rb
similarity index 100%
rename from debian/old/packaging-tools-author-theme.rb
rename to debian/packaging-tools/old/packaging-tools-author-theme.rb
diff --git a/debian/packaging-tools/packaging-tools-author.rb b/debian/packaging-tools/packaging-tools-author.rb
new file mode 100644
index 0000000..d9b5e0e
--- /dev/null
+++ b/debian/packaging-tools/packaging-tools-author.rb
@@ -0,0 +1,130 @@
+#!/usr/bin/env ruby
+# -*- coding: utf-8 -*-
+#
+# Extract copyright holders.
+# Author:   Daigo Moriwaki <beatles at sgtpepper.net>
+# Copyright (C) 2005 Daigo Moriwaki
+#           (C) 2015 Youhei SASAKI
+# License:  GNU GENERAL PUBLIC LICENSE Version 2 or later.
+#
+require 'pp'
+def update_hash(hash, key, val)
+  @hash = hash
+  @key = key
+  @val = val
+  unless @hash[@key]
+    @hash[@key] = @val
+  else
+    unless @hash[@key] == ""
+      new = @hash[@key] + ", " + @val
+    else
+      new = @val
+    end
+    @hash[@key] = new
+  end
+  return @hash
+end
+
+def cleanup_author_year(str)
+  @str = str
+  @str = @str.gsub(/,/," ")
+  @str = @str.gsub(/all right reserved/i,"")
+  @str = @str.gsub(/\sby\s/,'')
+  @str = @str.gsub(/notices:/,'')
+  @str = @str.gsub(/\s+/," ")
+  # case @str
+  # when /^(\d{4})-(\S.*)/
+  #   @str = $1 + "-" + $2
+  # # when /^(\d{4})\s\d{4}\s(\d{4}.*)/
+  # #   @str = $1 + "-" + $2
+  # when /^(\d{4})(\S.*)/
+  #   @str = $1 + " " + $2.gsub(/^-\s/,'')
+  # when /(.*)\s(\d{4})/
+  #   @str = $2 + " " + $1
+  # end
+  # if @str =~/(\d{4})(\S.*)/
+  #   left,right = $1.strip, $2.strip
+  #   if right =~ /^-/
+  #     @str = left + right
+  #   elsif right=~/^(\d{4}.*)/
+  #     @str = left + "-" + $1
+  #   else
+  #     @str = left.gsub(/-$/,'') + " " + right
+  #   end
+  # elsif
+  # end
+  return @str
+end
+
+def file_grep
+  lines = IO.popen(
+    "find . -type f \|
+      xargs grep -i copyright \|
+      grep -v debian \|
+      grep -v .git \|
+      grep -v LICENSE \|
+      grep -v ChangeLog \|
+      grep -v misc/plugin/title_tag.rb \|
+      grep -v misc/plugin/makerss.rb
+    " ) {
+    |io| io.readlines
+  }
+  @copyright = Hash.new
+  @unknown = Hash.new
+  @authors = Array.new
+  lines.each do |l|
+    @fname = l.split(":")[0].gsub(/^\.\//,'')
+    @author = nil
+    case l
+    when /\(C\)\s*(.*)$/i     # (C) ...
+      @author = $1.strip
+      @author = cleanup_author_year(@author)
+      update_hash(@copyright, @fname, @author)
+    when /Copyright\snotice[\r\n\)]+?(.*)/i
+      @author = $1.strip
+      @author = cleanup_author_year(@author)
+      update_hash(@copyright, @fname, @author)
+    when /Copyright[\s]+?(.*)/i
+      @author = $1.strip
+      @author = cleanup_author_year(@author)
+      update_hash(@copyright, @fname, @author)
+    when /\d{4},?\s+(.*)/     # 2004(,) ....
+      @author = $1.gsub!(/by\s+/i, "")   # 2004 by ...
+      @author = cleanup_author_year(@author)
+      update_hash(@copyright, @fname, @author)
+    when /by\s+(.*)$/i        # by ...
+      @author = $1.strip
+      @author = cleanup_author_year(@author)
+      update_hash(@copyright, @fname, @author)
+    else
+      update_hash(@unknown, @fname, "unknown")
+    end
+  end
+  @copyright.each do |k,v|
+    @authors.push v
+  end
+  return @copyright, @authors.uniq.sort, @unknwon
+end
+
+copyright, authors, unknown = file_grep
+
+authors.each do |author|
+  data = copyright.find_all {|k,v| v == author}
+  filename_line = "Files: "
+  data.each do |fname|
+    filename_line += fname[0] + " "
+  end
+  puts filename_line.rstrip
+  author = author.split(",")
+  puts "Copyright: (C) " + author.shift
+  unless author.nil?
+    author.each do |name|
+      puts "           (C) " + name.strip
+    end
+  end
+  puts "License: GPL-2.0+"
+  puts ""
+  copyright.reject!{|k,v| v == author}
+end
+
+puts unknown
diff --git a/debian/docs b/debian/tdiary-core.docs
similarity index 100%
rename from debian/docs
rename to debian/tdiary-core.docs
diff --git a/debian/tdiary-core.install b/debian/tdiary-core.install
index b9bfffc..80b1bac 100644
--- a/debian/tdiary-core.install
+++ b/debian/tdiary-core.install
@@ -14,5 +14,5 @@ update.fcgi usr/share/tdiary/
 update.rb usr/share/tdiary/
 views  usr/share/tdiary/
 debian/debian-tools usr/share/tdiary/
-debian/20change_url.rb usr/share/tdiary/lib/tdiary/plugin/
-debian/TC_tdiary-setup.rb   usr/share/tdiary/
+debian/debian-tools/20change_url.rb usr/share/tdiary/lib/tdiary/plugin/
+debian/debian-tools/TC_tdiary-setup.rb   usr/share/tdiary/

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/tdiary.git



More information about the Pkg-ruby-extras-commits mailing list