[DRE-commits] [hiki] 01/04: Imported Debian patch 1.0.0-0.1
Jonas Genannt
jonas at brachium-system.net
Wed Jan 15 10:29:27 UTC 2014
This is an automated email from the git hooks/post-receive script.
hggh-guest pushed a commit to branch master
in repository hiki.
commit 20bd9533ad415bba065aea6779f0b9a7643b4fa4
Author: Hideki Yamane <henrich at debian.org>
Date: Wed Apr 24 06:13:38 2013 +0900
Imported Debian patch 1.0.0-0.1
---
debian/.cvsignore | 2 -
debian/README.Debian | 23 ++
debian/README.Debian.ja | 33 +++
debian/changelog | 175 ++++++++++++++
debian/compat | 2 +-
debian/control | 13 +-
debian/copyright | 46 ++--
debian/dirs | 1 +
debian/docs | 8 +
debian/examples | 1 -
debian/hikisetup | 198 +++++++++++-----
debian/hikisetup.1 | 6 +-
debian/install.rb | 0
.../10_use_anoter_packages_algorithm_diff.dpatch | 262 ---------------------
debian/rules | 82 ++-----
debian/source/format | 1 +
debian/watch | 5 +
17 files changed, 429 insertions(+), 429 deletions(-)
diff --git a/debian/.cvsignore b/debian/.cvsignore
deleted file mode 100644
index dab45cc..0000000
--- a/debian/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-files
-hiki
diff --git a/debian/README.Debian b/debian/README.Debian
index 25c12df..92d6913 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -1,6 +1,29 @@
hiki for Debian
---------------
+HOW TO SETUP hiki
+=================
+
You can run 'hikisetup' to setup hiki easily.
+ % mkdir /var/www/hiki
+ % hikisetup /var/www/hiki
+ INFO: hiki basedir is /var/www/hiki
+ Please input data_path [/var/www/hiki/data]:
+ hikisetup succeeded!
+ Please edit /var/www/hiki/hikiconf.rb
+
+Use "--lang" option to use the other language instead of English.
+
+Be sure that Apache allows users to override configurations with a
+`.htaccess' file because the default hikisetup requires it.
+
+SEE ALSO
+========
+
+Useful documents are in following URL.
+You should read some documents on it.
+
+http://hikiwiki.org/en/
+
-- Taku YASUI <tach at debian.or.jp>, Sat, 28 Jun 2003 11:01:05 +0900
diff --git a/debian/README.Debian.ja b/debian/README.Debian.ja
new file mode 100644
index 0000000..4dc8936
--- /dev/null
+++ b/debian/README.Debian.ja
@@ -0,0 +1,33 @@
+Debian での hiki について
+-------------------------
+
+Debian では,簡単に hiki をセットアップするために,hikisetup コマンドを
+用意しています.hiki を設置するディレクトリで hikisetup コマンドを実行
+するだけで,hiki を動作させる環境ができあがります.
+
+ ~/public_html/hiki% hikisetup --lang ja
+ INFO: hiki basedir is /home/tach/public_html/hiki
+ Please input data_path [/home/tach/public_html/hiki/data]:
+ hikisetup succeeded!
+ Please edit /home/tach/public_html/hiki/hikiconf.rb
+
+hikisetup コマンドで設置した hiki は,パッケージをアップグレードした
+際に,自動的に新しい hiki が動作するようになっています.そのため,
+hiki を更新するときにはパッケージをアップグレードするだけで OK です.
+しかし,hiki のメジャーアップグレードの際には設定ファイルの書式が
+変更になる可能性がありますので,そのときは再度 hikisetup コマンドを
+実行することをおすすめします.hikisetup コマンドは,何度実行しても
+環境を壊さないように作成してあります.
+
+Version 0.6.x 以前をお使いの方へ
+--------------------------------
+
+hiki は,Version 0.8 から設定ファイルの書式が変更になっています.
+hikisetup コマンドでは,$data_path と $cgi_name のみ新しいファイル
+に移行し,その他の設定はサンプルのものをそのまま利用し,hikiconf.rb
+を生成します.古いファイルはリネームして残してありますので,手動で
+再設定してください.なお,プラグインなどの書式も変わっていますので,
+ご注意ください.詳しくは,/usr/share/doc/hiki/VERSIONUP.txt を参照
+してください.
+
+ -- Taku YASUI <tach at debian.or.jp>, Sat, 28 Jun 2003 11:01:05 +0900
diff --git a/debian/changelog b/debian/changelog
index 09c2ce9..1d58dae 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,178 @@
+hiki (1.0.0-0.1) experimental; urgency=low
+
+ * Non-maintainer upload.
+ * New upstream release
+ * debian/watch
+ - deal with upstream moved to github
+ * debian/control
+ - set "Standards-Version: 3.9.4"
+ * debian/patches
+ - drop: 010_use_ruby1.8, since merged to upstream
+ - drop: 020_remove_shebang_from_library, upstream delete file, so it's
+ unnecessary anymore
+
+ -- Hideki Yamane <henrich at debian.org> Wed, 24 Apr 2013 06:13:38 +0900
+
+hiki (0.8.8.1-3) unstable; urgency=low
+
+ * Change debhelper compat level to 8
+ * Follow for Ruby package name transition
+ * Change debian source format to '3.0 (quilt)'
+ * Remove lintian warnings
+ - Add patch: 020_remove_shebang_from_library
+ * Force to use ruby1.8
+ - Add patch: debian/patches/010_use_ruby1.8
+
+ -- Taku YASUI <tach at debian.org> Sun, 13 May 2012 15:02:31 +0900
+
+hiki (0.8.8.1-2) unstable; urgency=low
+
+ * Bump Standards-Version to 3.9.3
+ * Moved repository to svn.debian.org
+ - svn://svn.debian.org/svn/collab-maint/deb-maint/hiki
+
+ -- Taku YASUI <tach at debian.org> Mon, 26 Mar 2012 23:46:40 +0900
+
+hiki (0.8.8.1-1) unstable; urgency=low
+
+ * New upstream release
+ * Fix debian/watch to find correct latest release
+
+ -- Taku YASUI <tach at debian.org> Tue, 22 Sep 2009 13:52:43 +0900
+
+hiki (0.8.8-1) unstable; urgency=low
+
+ * New upstream release
+ * Update debian/watch file for new SourceForge.JP release page layout
+
+ -- Taku YASUI <tach at debian.org> Mon, 10 Aug 2009 00:18:25 +0900
+
+hiki (0.8.7-3) unstable; urgency=low
+
+ * Add debian/watch file
+
+ -- Taku YASUI <tach at debian.org> Tue, 21 Apr 2009 11:54:04 +0900
+
+hiki (0.8.7-2) unstable; urgency=low
+
+ * Change maintainer email address: tach at debian.org
+ * Update debhelper compat version: 7
+ * Update Depends: line
+ - apache2 instead of apache
+ * Update Standards-Version: 3.8.1
+ * Add hikisetup manual page
+ * New debian/copyright format
+ http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=454
+ * Fix ruby binary path on script
+
+ -- Taku YASUI <tach at debian.org> Tue, 21 Apr 2009 03:16:19 +0900
+
+hiki (0.8.7-1) unstable; urgency=high
+
+ * New upstream release
+ * [SECURITY] fix unsafe session management
+ See http://hikiwiki.org/en/advisory20070624.html for more information
+ (closes: #430691)
+
+ -- Taku YASUI <tach at debian.or.jp> Wed, 27 Jun 2007 11:43:21 +0900
+
+hiki (0.8.6-5) unstable; urgency=low
+
+ * Remove unwanted patch from source package
+ * Fix: unable to write page
+ (closes: #417570)
+
+ -- Taku YASUI <tach at debian.or.jp> Tue, 10 Apr 2007 03:07:58 +0900
+
+hiki (0.8.6-4) unstable; urgency=low
+
+ * Make to copy default text files
+ * Change default language of hikisetup command to "en"
+ * Add more languages to hikisetup language option
+ * Update README.Debian (closes: #242918)
+ * Fix to run hikisetup correctly (closes: #335484)
+
+ -- Taku YASUI <tach at debian.or.jp> Sun, 3 Dec 2006 00:06:01 +0900
+
+hiki (0.8.6-3) unstable; urgency=low
+
+ * Fix: orig.tar.gz does not include...
+
+ -- Taku YASUI <tach at debian.or.jp> Sun, 3 Dec 2006 00:04:03 +0900
+
+hiki (0.8.6-2) unstable; urgency=low
+
+ * Fix: hikisetup does not work correctly.
+ * Add --lang option to hikisetup
+
+ -- Taku YASUI <tach at debian.or.jp> Sat, 2 Dec 2006 23:40:12 +0900
+
+hiki (0.8.6-1) unstable; urgency=high
+
+ * New upstream release
+ * Security release for CVE-2006-3379
+ (closes: #378059)
+ * Change to use cdbs for building
+
+ -- Taku YASUI <tach at debian.or.jp> Fri, 21 Jul 2006 02:49:13 +0900
+
+hiki (0.8.4-1) unstable; urgency=low
+
+ * New upstream release
+ * Add i18n support to hikisetup command
+ - --lang option
+ - gettextize
+
+ -- Taku YASUI <tach at debian.or.jp> Thu, 29 Sep 2005 16:43:18 +0900
+
+hiki (0.8.3-1) unstable; urgency=high
+
+ * New upstream release
+ - Security fix release (fix cross-site scripting)
+
+ -- Taku YASUI <tach at debian.or.jp> Fri, 5 Aug 2005 07:43:00 +0900
+
+hiki (0.8.2-1) unstable; urgency=high
+
+ * New upstream release
+ * Fix some XSS security vul.
+
+ -- Taku YASUI <tach at debian.or.jp> Tue, 2 Aug 2005 19:32:21 +0900
+
+hiki (0.6.5-1) unstable; urgency=high
+
+ * New upstrem release - several security fixes
+ (closes: #256614)
+ * hikisetup fix: Despite enabling help option, setup completed
+
+ -- Taku YASUI <tach at debian.or.jp> Tue, 29 Jun 2004 01:23:24 +0900
+
+hiki (0.6.4-1) unstable; urgency=high
+
+ * New upstream release
+ (closes: #255456)
+
+ -- Taku YASUI <tach at debian.or.jp> Mon, 21 Jun 2004 15:17:57 +0900
+
+hiki (0.6.3-1) unstable; urgency=high
+
+ * New upstream release
+
+ -- Taku YASUI <tach at debian.or.jp> Sun, 30 May 2004 20:11:26 +0900
+
+hiki (0.6.2-1) unstable; urgency=low
+
+ * New upstream release
+ (closes: #237434)
+
+ -- Taku YASUI <tach at debian.or.jp> Fri, 19 Mar 2004 18:04:44 +0900
+
+hiki (0.5+20031214-1) experimental; urgency=low
+
+ * New upstream release (cvs snapshot)
+
+ -- Taku YASUI <tach at debian.or.jp> Sun, 14 Dec 2003 15:21:38 +0900
+
hiki (0.4.2a-4) unstable; urgency=low
* More dependency fix
diff --git a/debian/compat b/debian/compat
index b8626c4..45a4fb7 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-4
+8
diff --git a/debian/control b/debian/control
index 699122b..9d1dab4 100644
--- a/debian/control
+++ b/debian/control
@@ -1,14 +1,17 @@
Source: hiki
Section: web
Priority: optional
-Maintainer: Taku YASUI <tach at debian.or.jp>
-Build-Depends-Indep: debhelper (>> 4.0.0), ruby1.6
-Standards-Version: 3.6.1
+Maintainer: Taku YASUI <tach at debian.org>
+Build-Depends: debhelper (>= 8), ruby, cdbs, quilt
+Homepage: http://hikiwiki.org/
+Standards-Version: 3.9.4
+Vcs-Svn: svn://svn.debian.org/svn/collab-maint/deb-maint/hiki
+Vcs-Browser: http://anonscm.debian.org/viewvc/collab-maint/deb-maint/hiki
Package: hiki
Architecture: all
-Depends: ruby1.6, libalgorithm-diff-ruby1.6, libstrscan-ruby1.6, libamrita-ruby1.6
-Suggests: httpd, tdiary-theme
+Depends: ${misc:Depends}, ruby (>= 1.8.7), ruby-uconv
+Suggests: apache2 | httpd, tdiary-theme, ruby-imagesize, ruby-rd, librt-ruby1.8
Description: Wiki Engine written in Ruby
Hiki is one of WikiWiki Web clone (Wiki Engine) written in programming
language Ruby. WikiWikiWeb is web base collaboration tool. Hiki has
diff --git a/debian/copyright b/debian/copyright
index 24c0b4b..c283a64 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,26 +1,20 @@
-This package was debianized by Taku YASUI <tach at debian.or.jp> on
-Sat, 28 Jun 2003 11:01:05 +0900.
-
-It was downloaded from <URL:http://sourceforge.jp/projects/hiki/files/>
-
-Upstream Author: Hitoshi TAKEUCHI <hitoshi at namaraii.com>
-
-Copyright:
-
- 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; version 2 dated June, 1991.
-
- 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 package; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA.
-
-On Debian systems, the complete text of the GNU General
-Public License can be found in `/usr/share/common-licenses/GPL'.
-
+Format-Specification:
+ http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=454
+Upstream-Maintainer: TAKEUCHI Hitoshi <hitoshi at namaraii.com>
+Upstream-Source: http://hikiwiki.org/
+Upstream-Name: Hiki
+
+Files: *
+Copyright: Copyright (C) 2002-2004 TAKEUCHI Hitoshi <hitoshi at namaraii.com>
+Locense: GPL-2
+ This package is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License version 2
+ as published by the Free Software Foundation.
+ On Debian systems, the complete text of the GNU General Public License
+ version 2 can be found in `/usr/share/common-licenses/GPL-2'.
+
+Files: debian/*
+Copyright: Copyright(C) 2003-2009 Taku YASUI <tach at debian.org>
+License: GPL-2
+ 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/dirs b/debian/dirs
index 4a20a08..e464b67 100644
--- a/debian/dirs
+++ b/debian/dirs
@@ -1,2 +1,3 @@
usr/bin
usr/share/hiki
+usr/share/doc/hiki/examples
diff --git a/debian/docs b/debian/docs
index eeccdd6..b6a6c0e 100644
--- a/debian/docs
+++ b/debian/docs
@@ -1 +1,9 @@
+doc/HACKING.en
+doc/HACKING.txt
+doc/NEWS.en
+doc/NEWS.txt
+doc/README-attach.txt
+doc/README.en
doc/README.txt
+doc/VERSIONUP.txt
+doc/rd+/
diff --git a/debian/examples b/debian/examples
index 5aae6f6..61b7dad 100644
--- a/debian/examples
+++ b/debian/examples
@@ -1,2 +1 @@
dot.htaccess
-hikiconf.rb.sample
diff --git a/debian/hikisetup b/debian/hikisetup
index 55c97c3..d6af23d 100755
--- a/debian/hikisetup
+++ b/debian/hikisetup
@@ -1,65 +1,139 @@
-#!/usr/bin/ruby1.6
+#!/usr/bin/ruby
#
# hikisetup - setup hiki for debian systems
# Copyright (C) Taku YASUI <tach at debian.or.jp>
#
require 'getoptlong'
-require 'ftools'
+require 'fileutils'
-SRCDIR = '/usr/share/hiki'
+include FileUtils
+
+HIKIDIR = '/usr/share/hiki'
def parse_options
options = Hash.new
parser = GetoptLong.new
- parser.set_options(['--help', '-h', GetoptLong::NO_ARGUMENT],
- ['--copy', '-c', GetoptLong::NO_ARGUMENT])
+ parser.set_options(['--help', '-h', GetoptLong::NO_ARGUMENT],
+ ['--lang', '-l', GetoptLong::REQUIRED_ARGUMENT])
parser.each_option { |name, arg| options[name.sub(/^--/, "")] = arg }
+ if ( ! options['lang'] )
+ options['lang'] = 'en'
+ elsif ( ! options['lang'].match(/^(#{get_languages.join('|')})$/) )
+ STDERR.puts("Argument of --lang must be one of following: #{get_languages.join(', ')}")
+ exit 1
+ end
show_usage if options['help']
return options
end
-def setup_symlink(dir)
- File.makedirs("#{dir}/plugin", "#{dir}/theme")
- Dir.glob("#{SRCDIR}/plugin/*.rb") do |file|
- filename = File.basename(file)
- next if ( File.exist?("#{dir}/plugin/#{filename}") && ! File.symlink?("#{dir}/plugin/#{filename}") )
- File.unlink("#{dir}/plugin/#{filename}") if ( File.exist?("#{dir}/plugin/#{filename}") )
- system('ln', '-sf', file, "#{dir}/plugin")
+def input_data(default, var='variable')
+ print "Please input #{var} [#{default}]: "
+ ret = STDIN.gets.chop
+ ret = default if ret.match(/^\s*$/)
+ return ret
+end
+
+def get_languages
+ Dir.glob(File.join(HIKIDIR, "messages/*.rb")).map{ |s| s.scan(%r!([^/]+)\.rb$!).first }
+end
+
+def check_datapath
+ if @data_path
+ elsif $data_path
+ @data_path = $data_path
+ else
+ @data_path = File.join @hikidir, 'data'
end
- Dir.glob("#{SRCDIR}/theme/*") do |file|
- filename = File.basename(file)
- next if ( File.exist?("#{dir}/theme/#{filename}") && ! File.symlink?("#{dir}/theme/#{filename}") )
- File.unlink("#{dir}/theme/#{filename}") if ( File.exist?("#{dir}/theme/#{filename}") )
- system('ln', '-sf', file, "#{dir}/theme")
+ @data_path = input_data(@data_path, 'data_path')
+end
+
+def check_pluginpath
+ @plugin_path = '/usr/share/hiki/plugin' if ! @plugin_path
+end
+
+def check_templatepath
+ @template_path = '/usr/share/hiki/template' if ! @template_path
+end
+
+def create_hikiconf
+ if $data_path && File.exist?('hikiconf.rb')
+ oldconf = 'hikiconf.rb.' + Time.now.strftime('%Y%m%d-%H%M%S')
+ mv 'hikiconf.rb', oldconf
+ puts "WARN: Old hikiconf.rb format found and converted to new one"
+ puts "WARN: Please read /usr/share/doc/hiki/VERSIONUP.txt"
+ puts "INFO: hikiconf.rb was moved to #{oldconf}"
+ puts "INFO: Please remove #{oldconf} if it will be not nesessory"
end
- if ( File.directory?("#{dir}/messages") )
- STDERR.puts "Warning: directory #{dir}/messages already exists."
- else
- system('ln', '-sf', "#{SRCDIR}/messages", dir)
+ if ! File.exist?('hikiconf.rb')
+ begin
+ cp('/usr/share/doc/hiki/examples/hikiconf.rb.sample.' + @opts['lang'] , 'hikiconf.rb')
+ rescue
+ STDERR.puts("Sample hikiconf.rb of \"#{@opts['lang']}\" does not found. Using \"en\" one.")
+ cp('/usr/share/doc/hiki/examples/hikiconf.rb.sample.en' , 'hikiconf.rb')
+ end
end
- if ( File.directory?("#{dir}/template") )
- STDERR.puts "Warning: directory #{dir}/template already exists."
- else
- system('ln', '-sf', "#{SRCDIR}/template", dir)
+ conf=<<_EOT
+### BEGIN: CREATED BY DEBIAN HIKISETUP ###
+ at data_path = '#{@data_path}'
+ at plugin_path = '#{@plugin_path}'
+ at template_path = '#{@template_path}'
+ at cgi_name = '#{@cgi_name}'
+ at lang = '#{@opts["lang"]}'
+### END: CREATED BY DEBIAN HIKISETUP ###
+_EOT
+ hikiconf = File.read('hikiconf.rb')
+ if ! hikiconf.sub!(/### BEGIN: CREATED BY DEBIAN HIKISETUP ###.*### END: CREATED BY DEBIAN HIKISETUP ###\s*\n/m, conf)
+ hikiconf += conf
end
- if ( File.directory?("#{dir}/style") )
- STDERR.puts "Warning: directory #{dir}/style already exists."
- else
- system('ln', '-sf', "#{SRCDIR}/style", dir)
+ File.open('hikiconf.rb', 'w') do |f|
+ f.print hikiconf
end
- File.unlink("#{dir}/hiki.cgi") if ( File.exist?("#{dir}/hiki.cgi") )
- File.symlink("#{SRCDIR}/hiki.cgi", "#{dir}/hiki.cgi")
end
-def setup_copy(dir)
- system('cp', '-dfR', "#{SRCDIR}/plugin", dir)
- system('cp', '-dfR', "#{SRCDIR}/theme", dir)
- system('cp', '-dfR', "#{SRCDIR}/messages", dir)
- system('cp', '-dfR', "#{SRCDIR}/template", dir)
- system('cp', '-dfR', "#{SRCDIR}/style", dir)
- File.unlink("#{dir}/hiki.cgi") if ( File.exist?("#{dir}/hiki.cgi") )
- File.cp("#{SRCDIR}/hiki.cgi", dir)
+def create_hikicgi
+ if ! @cgi_name
+ @cgi_name = $cgi_name || 'hiki.cgi'
+ end
+ @cgi_name = File.basename(@cgi_name).sub(/^\.*/, '')
+ @cgi_name = 'hiki.cgi' if @cgi_name == ''
+ if File.exist?(@cgi_name)
+ oldcgi = @cgi_name + '.' + Time.now.strftime('%Y%m%d-%H%M%S')
+ mv @cgi_name, oldcgi
+ puts "INFO: #{@cgi_name} was moved to #{oldcgi}"
+ puts "INFO: Please remove #{oldcgi} if it will be not nesessory"
+ end
+ File.open(@cgi_name, 'w') do |f|
+ f.print <<_EOT
+#!/usr/bin/ruby1.8 -I#{HIKIDIR}
+load '#{HIKIDIR}/hiki.cgi'
+_EOT
+ end
+ chmod 0755, @cgi_name
+end
+
+def create_datadir
+ if ( ! File.directory? @data_path )
+ mkdir_p @data_path
+ begin
+ cp_r "#{HIKIDIR}/misc/text/default.#{@opts['lang']}", @data_path + "/text"
+ rescue
+ STDERR.puts("Default text data of \"#{@opts['lang']}\" does not found. Using \"en\" one.")
+ cp_r "#{HIKIDIR}/misc/text/default.en", @data_path + "/text"
+ end
+ end
+end
+
+def create_theme
+ if ! File.exist? "#{@hikidir}/theme"
+ cp_r "#{HIKIDIR}/theme", @hikidir
+ end
+end
+
+def create_dothtaccess
+ if ( @first && ! File.exist?("#{@hikidir}/.htaccess") )
+ cp "/usr/share/doc/hiki/examples/dot.htaccess", ".htaccess"
+ end
end
def show_usage
@@ -67,36 +141,36 @@ def show_usage
Usage: hikisetup [OPTIONS] [directory]
OPTIONS:
--help, -h: Show this help
- --copy, -c: Copy CGI and some files instead of symlink
+ --lang LANGUAGE, -l: Specify config language (default: en)
+
+LANGUAGE must be one of following: #{get_languages.join(", ")}
_EOT
+ exit 1
end
def main
begin
- opts = parse_options
- dir = ARGV[0] || '.'
- File.makedirs(dir)
- if ( ! File.directory?("#{dir}/data") )
- system('cp', '-r', "#{SRCDIR}/data", dir)
- end
- if ( ! File.exist?("#{dir}/hikiconf.rb") )
- File.cp("#{SRCDIR}/hikiconf.rb", dir)
- end
- if ( opts['copy'])
- setup_copy(dir)
- else
- setup_symlink(dir)
- end
- if ( File.directory?('/var/www/tdiary/theme') )
- Dir.glob("/var/www/tdiary/theme/*") do |file|
- filename = File.basename(file)
- next if ( File.exist?("#{dir}/theme/#{filename}") && ! File.symlink?("#{dir}/theme/#{filename}") )
- File.unlink("#{dir}/theme/#{filename}") if ( File.exist?("#{dir}/theme/#{filename}") )
- system('ln', '-sf', file, "#{dir}/theme")
- end
+ @opts = parse_options
+ @first = false
+ @hikidir = File.expand_path(ARGV[0] || '.')
+ chdir @hikidir
+ puts "INFO: hiki basedir is #{@hikidir}"
+ begin
+ require 'hikiconf'
+ rescue LoadError
+ @first = true
end
+ check_datapath
+ check_pluginpath
+ check_templatepath
+ makedirs(@hikidir)
+ create_hikicgi
+ create_theme
+ create_datadir
+ create_hikiconf
+ create_dothtaccess
puts "hikisetup succeeded!"
- puts "Please edit #{dir}/hikiconf.rb"
+ puts "Please edit #{@hikidir}/hikiconf.rb"
rescue
puts 'Error: ' + $!
puts "hikisetup failed!"
diff --git a/debian/hikisetup.1 b/debian/hikisetup.1
index 1b04797..98765b6 100644
--- a/debian/hikisetup.1
+++ b/debian/hikisetup.1
@@ -1,6 +1,6 @@
.\" hikisetup manpage for Debian GNU/Linux
-.\" written by Taku YASUI <tach at debian.or.jp>
-.TH HIKI 1
+.\" written by Taku YASUI <tach at debian.org>
+.TH HIKISETUP 1
.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection
.\" other parms are allowed: see man(7), man(1)
.SH NAME
@@ -28,5 +28,5 @@ automatically when the package is upgraded. But if your web server
does not allow to run CGI which is symlink, you should copy CGI file.
.SH AUTHOR
hikisetup and this manual page was written by Taku YASUI
-<tach at debian.or.jp>,
+<tach at debian.org>,
for the Debian GNU/Linux system (but may be used by others).
diff --git a/debian/install.rb b/debian/install.rb
old mode 100755
new mode 100644
diff --git a/debian/patches/10_use_anoter_packages_algorithm_diff.dpatch b/debian/patches/10_use_anoter_packages_algorithm_diff.dpatch
deleted file mode 100755
index 29ca816..0000000
--- a/debian/patches/10_use_anoter_packages_algorithm_diff.dpatch
+++ /dev/null
@@ -1,262 +0,0 @@
-#!/bin/sh -e
-## 10_use_anoter_packages_algorithm_diff.dpatch
-## by Taku YASUI <tach at debian.or.jp>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
-if [ $# -ne 1 ]; then
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
- exit 1
-fi
-
-[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
-patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
-
-case "$1" in
- -patch) patch $patch_opts -p1 < $0;;
- -unpatch) patch $patch_opts -p1 -R < $0;;
- *)
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
- exit 1;;
-esac
-
-exit 0
-
- at DPATCH@
-diff -urNad hiki.old/hiki/algorithm/diff.rb hiki/hiki/algorithm/diff.rb
---- hiki.old/hiki/algorithm/diff.rb 2003-02-22 13:39:31.000000000 +0900
-+++ hiki/hiki/algorithm/diff.rb 1970-01-01 09:00:00.000000000 +0900
-@@ -1,220 +0,0 @@
--#
--# algorith/diff - a Ruby module to compute difference sets between two
--# objects. Copyright (c) 2001-2002 Lars Christensen.
--#
--# 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 of the License, or
--# (at your option) any later version.
--#
--# This program 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, write to the Free Software
--# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
--# 02111-1307, USA.
--#
--
--module Diff
--
-- VERSION = 0.4
--
-- attr_reader :diffs
--
-- def Diff.lcs(a, b)
-- astart = 0
-- bstart = 0
-- afinish = a.length-1
-- bfinish = b.length-1
-- mvector = []
--
-- # First we prune off any common elements at the beginning
-- while (astart <= afinish && bstart <= afinish && a[astart] == b[bstart])
-- mvector[astart] = bstart
-- astart += 1
-- bstart += 1
-- end
--
-- # now the end
-- while (astart <= afinish && bstart <= bfinish && a[afinish] == b[bfinish])
-- mvector[afinish] = bfinish
-- afinish -= 1
-- bfinish -= 1
-- end
--
-- bmatches = b.reverse_hash(bstart..bfinish)
-- thresh = []
-- links = []
--
-- (astart..afinish).each { |aindex|
-- aelem = a[aindex]
-- next unless bmatches.has_key? aelem
-- k = nil
-- bmatches[aelem].reverse_each { |bindex|
-- if k && (thresh[k] > bindex) && (thresh[k-1] < bindex)
-- thresh[k] = bindex
-- else
-- k = thresh.replacenextlarger(bindex, k)
-- end
-- links[k] = [ k!=0 && links[k-1], aindex, bindex ] if k
-- }
-- }
--
-- if !thresh.empty?
-- link = links[thresh.length-1]
-- while link
-- mvector[link[1]] = link[2]
-- link = link[0]
-- end
-- end
--
-- return mvector
-- end
--
-- def Diff.makediff(a, b)
-- mvector = Diff.lcs(a, b)
-- ai = bi = 0
-- while ai < mvector.length
-- bline = mvector[ai]
-- if bline
-- while bi < bline
-- yield :+, bi, b[bi]
-- bi += 1
-- end
-- bi += 1
-- else
-- yield :-, ai, a[ai]
-- end
-- ai += 1
-- end
-- while ai < a.length
-- yield :-, ai, a[ai]
-- ai += 1
-- end
-- while bi < b.length
-- yield :+, bi, b[bi]
-- bi += 1
-- end
-- 1
-- end
--
-- def Diff.diff(a, b, &block)
-- isstring = b.kind_of? String
-- diffs = []
--
-- block ||= proc { |action, index, element|
-- prev = diffs[-1]
-- if prev && prev[0] == action &&
-- prev[1] + prev[2].length == index
-- prev[2] << element
-- else
-- diffs.push [ action, index, isstring ? element.chr : [element] ]
-- end
-- }
--
-- Diff.makediff(a, b, &block)
--
-- return diffs
-- end
--
--end
--
--module Diffable
-- def diff(b)
-- Diff.diff(self, b)
-- end
--
-- # Create a hash that maps elements of the array to arrays of indices
-- # where the elements are found.
--
-- def reverse_hash(range = (0...self.length))
-- revmap = {}
-- range.each { |i|
-- elem = self[i]
-- if revmap.has_key? elem
-- revmap[elem].push i
-- else
-- revmap[elem] = [i]
-- end
-- }
-- return revmap
-- end
--
-- # Replace the first element which is larger than value. Assumes that
-- # the element indexed by high, if given is larger than value.
--
-- def replacenextlarger(value, high = nil)
-- high ||= length
-- low = 0
-- index = found = nil
-- while low < high
-- index = (high+low) >> 1
-- found = self[index]
-- if value > found # this first, most common case
-- low = index + 1
-- elsif value == found
-- return nil
-- else
-- high = index
-- end
-- end
-- self[low] = value
-- return low
-- end
--
-- # Patches self with the given set of differences.
--
-- def patch(diffs)
-- newary = nil
-- kindofstring = kind_of? String
-- if kindofstring
-- newary = self.class.new('')
-- else
-- newary = self.class.new
-- end
-- ai = 0
-- bi = 0
-- diffs.each { |action,position,elements|
-- case action
-- when :-
-- while ai < position
-- newary << self[ai]
-- ai += 1
-- bi += 1
-- end
-- ai += elements.length
-- when :+
-- while bi < position
-- newary << self[ai]
-- ai += 1
-- bi += 1
-- end
-- if kindofstring
-- newary << elements
-- else
-- newary.push *elements
-- end
-- bi += elements.length
-- else
-- raise "Unknown diff action"
-- end
-- }
-- while ai < self.length
-- newary << self[ai]
-- ai += 1
-- bi += 1
-- end
-- return newary
-- end
--end
--
--class Array
-- include Diffable
--end
--
--class String
-- include Diffable
--end
-diff -urNad hiki.old/hiki/util.rb hiki/hiki/util.rb
---- hiki.old/hiki/util.rb 2003-02-26 21:02:16.000000000 +0900
-+++ hiki/hiki/util.rb 2003-06-28 14:17:15.000000000 +0900
-@@ -6,7 +6,7 @@
- require 'net/smtp'
- require 'time'
- require 'amrita/template'
--require 'hiki/algorithm/diff'
-+require 'algorithm/diff'
-
- class String
- def to_euc
diff --git a/debian/rules b/debian/rules
index 4b3389b..a361ad4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,75 +1,23 @@
#!/usr/bin/make -f
-# Sample debian/rules that uses debhelper.
-# GNU copyright 1997 to 1999 by Joey Hess.
+# Sample debian/rules that uses cdbs. Originaly written by Robert Millan.
+# This file is public domain.
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
+include /usr/share/cdbs/1/rules/debhelper.mk
-# This is the debhelper compatability version to use.
-# export DH_COMPAT=3
+DEB_COMPRESS_EXCLUDE = hikiconf.rb.sample
+DEB_INSTALL_MANPAGES_hiki = debian/hikisetup.1
-# This is the versions of upstream
-UPSTREAM = hiki
-UPSTREAM_VERSION = 0.4.2a
-
-build:
- # noting to do
-
-clean:
- dh_testdir
- dh_testroot
-
- # Clean build and stamps
- rm -rf build
- rm -rf unpack-stamp patch-stamp patch-stampTMP patches-stamp
-
- dh_clean
-
-install: build
- dh_testdir
- dh_testroot
- dh_clean -k
- dh_installdirs
-
- # Add here commands to install the package into debian/hiki.
- #mv hikiconf.rb.sample hikiconf.rb
- DESTDIR=$(CURDIR)/debian/hiki ruby1.6 $(CURDIR)/debian/install.rb
- cp -r data messages misc plugin style template theme $(CURDIR)/debian/hiki/usr/share/hiki
+install/hiki::
+ cp -r data hiki messages misc plugin style template theme $(CURDIR)/debian/hiki/usr/share/hiki
find $(CURDIR)/debian/hiki -type d -name CVS -print | xargs rm -rf
find $(CURDIR)/debian/hiki -name \*.rb -print | xargs chmod 644
- find $(CURDIR)/debian/hiki -type d -path '*/hiki/algorithm' -print | xargs rm -rf
install -m 755 hiki.cgi $(CURDIR)/debian/hiki/usr/share/hiki/hiki.cgi
- install -m 644 hikiconf.rb.sample $(CURDIR)/debian/hiki/usr/share/hiki/hikiconf.rb
install -m 755 debian/hikisetup $(CURDIR)/debian/hiki/usr/bin/hikisetup
- perl -i -npe 's!hiki/algorithm/diff!algorithm/diff!' `find $(CURDIR)/debian/hiki -name '*.rb' -print`
- perl -i -npe 's!/usr/bin/env ruby!/usr/bin/ruby1.6!' `find $(CURDIR)/debian/hiki -name '*.cgi' -print`
-
-
-# Build architecture-independent files here.
-binary-indep: build install
- dh_testdir
- dh_testroot
- dh_installchangelogs -i ChangeLog
- dh_installdocs -i
- dh_installexamples -i
-# dh_install -i
-# dh_installmenu -i
-# dh_installdebconf -i
-# dh_installlogrotate -i
-# dh_installemacsen -i
-# dh_installpam -i
-# dh_installmime -i
-# dh_installinit -i
-# dh_installcron -i
-# dh_installinfo -i
- dh_installman -i debian/hikisetup.1
- dh_link -i
- dh_compress -i
- dh_fixperms -i
- dh_installdeb -i
- dh_gencontrol -i
- dh_md5sums -i
- dh_builddeb -i
-
-binary: binary-indep
-.PHONY: build clean binary-indep binary install patch unpack
+ install -m 644 hikiconf.rb.sample $(CURDIR)/debian/hiki/usr/share/doc/hiki/examples/hikiconf.rb.sample.ja
+ mv $(CURDIR)/debian/hiki/usr/share/hiki/misc/i18n/hikiconf.rb.sample.en $(CURDIR)/debian/hiki/usr/share/doc/hiki/examples/hikiconf.rb.sample.en && rmdir $(CURDIR)/debian/hiki/usr/share/hiki/misc/i18n
+ ln -s hikiconf.rb.sample.en $(CURDIR)/debian/hiki/usr/share/doc/hiki/examples/hikiconf.rb.sample.de
+ mv $(CURDIR)/debian/hiki/usr/share/hiki/data/text $(CURDIR)/debian/hiki/usr/share/hiki/misc/text/default.ja
+ find $(CURDIR)/debian/hiki \( -name '*.cgi' -o -name '*.rb' \) -print0 | \
+ xargs -0r -n1 perl -i -npe '$$i++; $$i==1 and s|^#!\s*(?:/usr)?/bin/env ruby|#!/usr/bin/ruby1.8|'
+ chmod 755 $(CURDIR)/debian/hiki/usr/share/hiki/hiki/auth/typekey.rb
+ chmod 755 $(CURDIR)/debian/hiki/usr/share/hiki/misc/webrick/hikilet.rb
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..80846ba
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,5 @@
+# format version number, currently 3; this line is compulsory!
+version=3
+# URL to the package page followed by a regex to search
+https://github.com/hiki/hiki/tags \
+ /hiki/hiki/archive/(\d*.*)\.tar\.gz
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/hiki.git
More information about the Pkg-ruby-extras-commits
mailing list