--- trac-ja-resource-0.11.5.ja1.orig/debian/dirs
+++ trac-ja-resource-0.11.5.ja1/debian/dirs
@@ -0,0 +1,2 @@
+usr/share/trac-ja-resource
+usr/share/trac-ja-resource/cgi-bin
--- trac-ja-resource-0.11.5.ja1.orig/debian/docs
+++ trac-ja-resource-0.11.5.ja1/debian/docs
@@ -0,0 +1,3 @@
+README
+README.trac-ja
+debian/README.Debian.ja
--- trac-ja-resource-0.11.5.ja1.orig/debian/control
+++ trac-ja-resource-0.11.5.ja1/debian/control
@@ -0,0 +1,21 @@
+Source: trac-ja-resource
+Section: web
+Priority: optional
+Maintainer: Taku YASUI <tach@debian.org>
+Build-Depends: cdbs, debhelper (>= 5.0.0), python-support (>= 0.3)
+Homepage: http://www.i-act.co.jp/project/products/products.html
+Standards-Version: 3.8.3
+
+Package: trac-ja-resource
+Architecture: all
+Depends: trac (>= 0.11), trac (<< 0.12), ${misc:Depends}, ${python:Depends}
+Description: Japanese resources for trac
+ This package includes following Japanese resource for trac.
+ .
+   * Japanese web template
+   * Japanese default wiki page
+ .
+ Trac uses a minimalistic approach to web-based software project management.
+ Our mission; to help developers write great software while staying out of
+ the way. Trac should impose as little as possible on a team's established
+ development process and policies.
--- trac-ja-resource-0.11.5.ja1.orig/debian/rules
+++ trac-ja-resource-0.11.5.ja1/debian/rules
@@ -0,0 +1,18 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+DEB_DH_INSTALLCHANGELOGS_ARGS = ChangeLog.trac-ja
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+
+install/trac-ja-resource::
+	cp -r trac $(DEB_DESTDIR)/usr/share/trac-ja-resource/
+	find $(DEB_DESTDIR)/usr/share/trac-ja-resource/trac -type f -print0 | xargs -r0 chmod 644
+	rm -rf $(DEB_DESTDIR)/usr/share/trac-ja-resource/trac/htdocs
+	install -m 755 debian/trac.cgi $(DEB_DESTDIR)/usr/share/trac-ja-resource/cgi-bin/trac.cgi
+	install -m 755 debian/trac.fcgi $(DEB_DESTDIR)/usr/share/trac-ja-resource/cgi-bin/trac.fcgi
+	install -m 755 debian/trac.wsgi $(DEB_DESTDIR)/usr/share/trac-ja-resource/cgi-bin/trac.wsgi
+	ln -sf /usr/share/pyshared/trac/htdocs $(DEB_DESTDIR)/usr/share/trac-ja-resource/trac/htdocs
+
+binary-install/trac-ja-resource::
+	dh_pysupport -p$(cdbs_curpkg)
--- trac-ja-resource-0.11.5.ja1.orig/debian/watch
+++ trac-ja-resource-0.11.5.ja1/debian/watch
@@ -0,0 +1,4 @@
+# format version number, currently 3; this line is compulsory!
+version=3
+# URL to the package page followed by a regex to search
+http://www.i-act.co.jp/project/products/products.html   .*/Trac-v?(\d[ja\d_.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$
--- trac-ja-resource-0.11.5.ja1.orig/debian/changelog
+++ trac-ja-resource-0.11.5.ja1/debian/changelog
@@ -0,0 +1,89 @@
+trac-ja-resource (0.11.5.ja1-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Taku YASUI <tach@debian.org>  Tue, 22 Sep 2009 00:13:45 +0900
+
+trac-ja-resource (0.11.2.1.ja1-2) unstable; urgency=low
+
+  * Change maintainer email address: tach@debian.org
+  * Add debian/watch file
+  * New style debian/copyright format
+
+ -- Taku YASUI <tach@debian.org>  Tue, 21 Apr 2009 03:55:42 +0900
+
+trac-ja-resource (0.11.2.1.ja1-1) unstable; urgency=low
+
+  * New upstream release
+    (closes: #493391, #418527)
+  * New Standards-Version: 3.8.1
+  * Update README.Debian.ja for New upstrem release
+
+ -- Taku YASUI <tach@debian.or.jp>  Thu, 19 Mar 2009 02:24:53 +0900
+
+trac-ja-resource (0.10.4-ja-1-2) unstable; urgency=low
+
+  * Fix: 'NoneType' object has no attribute 'log' by
+    debian/patches/10_t5387.dpatch
+    - The patch is downloaded from
+      http://trac.edgewall.org/attachment/ticket/5387/t5387.diff
+
+ -- Taku YASUI <tach@debian.or.jp>  Mon, 21 Apr 2008 13:11:04 +0900
+
+trac-ja-resource (0.10.4-ja-1-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Taku YASUI <tach@debian.or.jp>  Thu, 24 May 2007 12:32:24 +0900
+
+trac-ja-resource (0.10.3.1-ja-1-2) unstable; urgency=low
+
+  * Add some python scripts
+
+ -- Taku YASUI <tach@debian.or.jp>  Wed, 16 May 2007 03:22:03 +0900
+
+trac-ja-resource (0.10.3.1-ja-1-1) unstable; urgency=low
+
+  * New upstream release
+  * Add trac dependency
+    - Bug#418527 has been fixed at unstable but not closed.
+      Because it is not fixed at etch.
+
+ -- Taku YASUI <tach@debian.or.jp>  Wed, 16 May 2007 02:31:24 +0900
+
+trac-ja-resource (0.9-1-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Taku YASUI <tach@debian.or.jp>  Thu,  1 Dec 2005 01:37:47 +0900
+
+trac-ja-resource (0.8.4-2-2) unstable; urgency=low
+
+  * Add Depends: trac (<< 0.9) because of incompatibility
+
+ -- Taku YASUI <tach@debian.or.jp>  Wed,  9 Nov 2005 02:44:09 +0900
+
+trac-ja-resource (0.8.4-2-1) unstable; urgency=low
+
+  * New upstream release
+    - Upstream added COPYING.trac-ja file
+  * Upload to debian archive
+    (closes: #317247)
+  * Change to use cdbs
+
+ -- Taku YASUI <tach@debian.or.jp>  Tue, 27 Sep 2005 06:40:47 +0900
+
+trac-ja-resource (0.8.4-1-1) unstable; urgency=low
+
+  * New upstream release
+  * Tried to upload to debian archive
+    - Rejected because license file does not exist
+
+ -- Taku YASUI <tach@debian.or.jp>  Sun, 10 Jul 2005 20:40:59 +0900
+
+trac-ja-resource (0.8.1-1-0.1) unstable; urgency=low
+
+  * Initial release
+
+ -- Taku YASUI <tach@debian.or.jp>  Fri, 17 Jun 2005 13:34:03 +0900
+
--- trac-ja-resource-0.11.5.ja1.orig/debian/compat
+++ trac-ja-resource-0.11.5.ja1/debian/compat
@@ -0,0 +1 @@
+5
--- trac-ja-resource-0.11.5.ja1.orig/debian/README.Debian
+++ trac-ja-resource-0.11.5.ja1/debian/README.Debian
@@ -0,0 +1,7 @@
+trac-ja-resource for Debian
+---------------------------
+
+Japanese instruction is into /usr/share/doc/trac-ja-resource/README.Debian.ja 
+file.  Please read to use Japanese resources.
+
+ -- Taku YASUI <tach@debian.or.jp>, Fri, 17 Jun 2005 13:34:03 +0900
--- trac-ja-resource-0.11.5.ja1.orig/debian/copyright
+++ trac-ja-resource-0.11.5.ja1/debian/copyright
@@ -0,0 +1,20 @@
+Format-Specification:
+    http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=454
+Upstream-Maintainer: InterAct Co., Ltd. <trac-ja@i-act.co.jp>
+Upstream-Source: http://www.i-act.co.jp/project/products/products.html
+Upstream-Name: Trac-ja
+
+Files: *
+Copyright: Copyright (C) 2005-2008 InterAct Co., Ltd.
+License: BSD
+    This package is free software; you can redistribute it and/or modify
+    it under the terms of the modified BSD license published by
+    The Regents of the University of California.
+    On Debian systems, the complete text of the modified BSD license
+    can be found in `/usr/share/common-licenses/BSD'.
+
+Files: *
+Copyright: Copyright (C)  2005-2009 Taku YASUI <tach@debian.org>
+License: BSD
+    On Debian systems, the complete text of the modified BSD license
+    can be found in `/usr/share/common-licenses/BSD'.
--- trac-ja-resource-0.11.5.ja1.orig/debian/trac.fcgi
+++ trac-ja-resource-0.11.5.ja1/debian/trac.fcgi
@@ -0,0 +1,50 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2003-2008 Edgewall Software
+# Copyright (C) 2003-2004 Jonas Borgström <jonas@edgewall.com>
+# All rights reserved.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at http://trac.edgewall.org/wiki/TracLicense.
+#
+# This software consists of voluntary contributions made by many
+# individuals. For the exact contribution history, see the revision
+# history and logs, available at http://trac.edgewall.org/log/.
+#
+# Author: Jonas Borgström <jonas@edgewall.com>
+
+import sys
+sys.path.insert(1, '/usr/share/trac-ja-resource')
+
+try:
+    import os
+    import pkg_resources
+    if 'TRAC_ENV' not in os.environ and \
+       'TRAC_ENV_PARENT_DIR' not in os.environ:
+        os.environ['TRAC_ENV'] = '/your/trac/path'
+    if 'PYTHON_EGG_CACHE' not in os.environ:
+        if 'TRAC_ENV' in os.environ:
+            egg_cache = os.path.join(os.environ['TRAC_ENV'], '.egg-cache')
+        elif 'TRAC_ENV_PARENT_DIR' in os.environ:
+            egg_cache = os.path.join(os.environ['TRAC_ENV_PARENT_DIR'], 
+                                     '.egg-cache')
+        pkg_resources.set_extraction_path(egg_cache)
+    from trac.web import fcgi_frontend
+    fcgi_frontend.run()
+except SystemExit:
+    raise
+except Exception, e:
+    print 'Content-Type: text/plain\r\n\r\n',
+    print 'Oops...'
+    print
+    print 'Trac detected an internal error:'
+    print
+    print e
+    print
+    import traceback
+    import StringIO
+    tb = StringIO.StringIO()
+    traceback.print_exc(file=tb)
+    print tb.getvalue()
--- trac-ja-resource-0.11.5.ja1.orig/debian/trac.wsgi
+++ trac-ja-resource-0.11.5.ja1/debian/trac.wsgi
@@ -0,0 +1,34 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2008 Edgewall Software
+# Copyright (C) 2008 Noah Kantrowitz <noah@coderanger.net>
+# All rights reserved.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at http://trac.edgewall.org/wiki/TracLicense.
+#
+# This software consists of voluntary contributions made by many
+# individuals. For the exact contribution history, see the revision
+# history and logs, available at http://trac.edgewall.org/log/.
+#
+# Author: Noah Kantrowitz <noah@coderanger.net>
+import os
+
+import sys
+sys.path.insert(1, '/usr/share/trac-ja-resource')
+
+def application(environ, start_request):
+    if not 'trac.env_path_parent_dir' in environ:
+        environ.setdefault('trac.env_path', '/your/trac/path')
+    if 'PYTHON_EGG_CACHE' in environ:                                           
+        os.environ['PYTHON_EGG_CACHE'] = environ['PYTHON_EGG_CACHE']
+    elif 'trac.env_path' in environ:
+        os.environ['PYTHON_EGG_CACHE'] = os.path.join(environ['trac.env_path'],
+                                                      '.egg-cache')
+    elif 'trac.env_path_parent_dir' in environ:
+        os.environ['PYTHON_EGG_CACHE'] = os.path.join(environ['trac.env_path_parent_dir'],
+                                                      '.egg-cache')
+    from trac.web.main import dispatch_request
+    return dispatch_request(environ, start_request)
--- trac-ja-resource-0.11.5.ja1.orig/debian/README.Debian.ja
+++ trac-ja-resource-0.11.5.ja1/debian/README.Debian.ja
@@ -0,0 +1,30 @@
+= trac-ja-resource の使い方 =
+
+== 新規プロジェクト作成時に日本語化する ==
+
+ 1. /usr/share/doc/trac/README.Debian を参照し、trac-admin コマンドを
+    実行する。
+
+ 2. trac-ja-resource の wiki デフォルトページをロードする。
+    
+    % trac-admin /path/to/projectenv wiki load /usr/share/trac-ja-resource/trac/wiki/default-pages
+
+ 3. 環境変数 PYTHONPATH を追加するため、trac.cgi または trac.fcgi ファイルを
+    入れ替える。サンプルは /usr/share/trac-ja-resource/cgi-bin にある。
+
+== 既存のプロジェクトを日本語化する ==
+
+新規プロジェクト作成時の 2. 3. を行えばよい。
+
+== Tops ==
+
+ * fcgi を使うときは、以下のような fcgi ファイルを用意することで、
+   今後のアップグレード時の対応が楽かもしれない
+   {{{
+#!/bin/sh
+export TRAC_ENV=/your/trac/path
+exec /usr/share/trac-ja-resource/cgi-bin/trac.fcgi
+   }}}
+
+ -- Taku YASUI <tach@debian.or.jp>, Thu, 19 Mar 2009 02:19:00 +0900
+
--- trac-ja-resource-0.11.5.ja1.orig/debian/trac.cgi
+++ trac-ja-resource-0.11.5.ja1/debian/trac.cgi
@@ -0,0 +1,52 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2003-2008 Edgewall Software
+# Copyright (C) 2003-2004 Jonas Borgström <jonas@edgewall.com>
+# All rights reserved.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at http://trac.edgewall.org/wiki/TracLicense.
+#
+# This software consists of voluntary contributions made by many
+# individuals. For the exact contribution history, see the revision
+# history and logs, available at http://trac.edgewall.org/log/.
+#
+# Author: Jonas Borgström <jonas@edgewall.com>
+
+import sys
+sys.path.insert(1, '/usr/share/trac-ja-resource')
+
+try:
+    import os
+    import pkg_resources
+    if 'TRAC_ENV' not in os.environ and \
+       'TRAC_ENV_PARENT_DIR' not in os.environ:
+        os.environ['TRAC_ENV'] = '/your/trac/path'
+    if 'PYTHON_EGG_CACHE' not in os.environ:
+        if 'TRAC_ENV' in os.environ:
+            egg_cache = os.path.join(os.environ['TRAC_ENV'], '.egg-cache')
+        elif 'TRAC_ENV_PARENT_DIR' in os.environ:
+            egg_cache = os.path.join(os.environ['TRAC_ENV_PARENT_DIR'], 
+                                     '.egg-cache')
+        pkg_resources.set_extraction_path(egg_cache)
+    from trac.web import cgi_frontend
+    cgi_frontend.run()
+except SystemExit:
+    raise
+except Exception, e:
+    import sys
+    import traceback
+
+    print>>sys.stderr, e
+    traceback.print_exc(file=sys.stderr)
+
+    print 'Status: 500 Internal Server Error'
+    print 'Content-Type: text/plain'
+    print
+    print 'Oops...'
+    print
+    print 'Trac detected an internal error:', e
+    print
+    traceback.print_exc(file=sys.stdout)
