summaryrefslogtreecommitdiff
path: root/irc/ruby-irc
diff options
context:
space:
mode:
authorAkinori MUSHA <knu@FreeBSD.org>2001-01-19 09:00:21 +0000
committerAkinori MUSHA <knu@FreeBSD.org>2001-01-19 09:00:21 +0000
commitd8fdbb29dbafef2a16a08ab451fc371361332244 (patch)
tree00fcac36f69df4018b27eac48910774929683ce7 /irc/ruby-irc
parentMake the German versions of <warning> and <caution> behave as <note>, (diff)
Add ruby-irc, an IRC client framework for Ruby.
Currently few English documents are bundled. For the time being, try the bot.rb (and cpi/*.cpi) example I translated into English to see how it works.
Notes
Notes: svn path=/head/; revision=37323
Diffstat (limited to 'irc/ruby-irc')
-rw-r--r--irc/ruby-irc/Makefile50
-rw-r--r--irc/ruby-irc/distinfo1
-rw-r--r--irc/ruby-irc/files/patch-0:bot.rb11
-rw-r--r--irc/ruby-irc/files/patch-0:operator.rb11
-rw-r--r--irc/ruby-irc/files/patch-bot.rb5
-rw-r--r--irc/ruby-irc/files/patch-dice.cpi27
-rw-r--r--irc/ruby-irc/files/patch-init.cpi18
-rw-r--r--irc/ruby-irc/files/patch-omikuji.cpi36
-rw-r--r--irc/ruby-irc/files/patch-operator.cpi75
-rw-r--r--irc/ruby-irc/files/patch-syslog.cpi8
-rw-r--r--irc/ruby-irc/files/patch-userlog.cpi11
-rw-r--r--irc/ruby-irc/pkg-comment1
-rw-r--r--irc/ruby-irc/pkg-descr3
-rw-r--r--irc/ruby-irc/pkg-plist41
14 files changed, 298 insertions, 0 deletions
diff --git a/irc/ruby-irc/Makefile b/irc/ruby-irc/Makefile
new file mode 100644
index 000000000000..e8f55a37f7a3
--- /dev/null
+++ b/irc/ruby-irc/Makefile
@@ -0,0 +1,50 @@
+# New ports collection makefile for: Ruby/IRC
+# Date created: 19 Jan 2001
+# Whom: Akinori MUSHA aka knu <knu@idaemons.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= irc
+PORTVERSION= 0.13
+CATEGORIES= irc ruby
+MASTER_SITES= http://www.ueda.info.waseda.ac.jp/~igarashi/ruby/
+PKGNAMEPREFIX= ${RUBY_PKGNAMEPREFIX}
+DISTNAME= ruby-${PORTNAME}-${PORTVERSION}
+DIST_SUBDIR= ruby
+
+MAINTAINER= knu@FreeBSD.org
+
+USE_RUBY= yes
+
+NO_BUILD= yes
+
+DOCS_EN= BUGS ChangeLog MANIFEST \
+ NEWS README TODO
+DOCS_JA= MEMO.ja README.ja
+
+do-install:
+ ${INSTALL_DATA} ${WRKSRC}/localize.rb ${RUBY_SITELIBDIR}
+ ${MKDIR} ${RUBY_SITELIBDIR}/irc
+ ${INSTALL_DATA} ${WRKSRC}/irc/*.rb ${RUBY_SITELIBDIR}/irc/
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${RUBY_DOCDIR}/irc/ja
+.for f in ${DOCS_EN}
+ ${INSTALL_DATA} ${WRKSRC}/${f} ${RUBY_DOCDIR}/irc/
+.endfor
+.for f in ${DOCS_JA}
+ ${INSTALL_DATA} ${WRKSRC}/${f} ${RUBY_DOCDIR}/irc/ja/
+.endfor
+ ${INSTALL_DATA} ${WRKSRC}/doc/* ${RUBY_DOCDIR}/irc/ja/
+ ${MKDIR} ${RUBY_EXAMPLESDIR}/irc/cpi
+ ${MKDIR} ${RUBY_EXAMPLESDIR}/irc/ja/cpi
+ cd ${WRKSRC}/cpi && \
+ for f in *.cpi; do ${INSTALL_DATA} $${f} ${RUBY_EXAMPLESDIR}/irc/cpi/; done; \
+ for f in *.cpi.orig; do ${INSTALL_DATA} $${f} ${RUBY_EXAMPLESDIR}/irc/ja/cpi/$${f%.orig}; done
+ ${INSTALL_DATA} ${WRKSRC}/bot.rb ${RUBY_EXAMPLESDIR}/irc/
+ ${INSTALL_DATA} ${WRKSRC}/bot.rb.orig ${RUBY_EXAMPLESDIR}/irc/ja/bot.rb
+ ${MKDIR} ${RUBY_EXAMPLESDIR}/irc/log
+ ${MKDIR} ${RUBY_EXAMPLESDIR}/irc/ja/log
+.endif
+
+.include <bsd.port.mk>
diff --git a/irc/ruby-irc/distinfo b/irc/ruby-irc/distinfo
new file mode 100644
index 000000000000..74c92a4fbfda
--- /dev/null
+++ b/irc/ruby-irc/distinfo
@@ -0,0 +1 @@
+MD5 (ruby/ruby-irc-0.13.tar.gz) = 345c5cd815cd72dd09110f8faa1f8634
diff --git a/irc/ruby-irc/files/patch-0:bot.rb b/irc/ruby-irc/files/patch-0:bot.rb
new file mode 100644
index 000000000000..b5a240426067
--- /dev/null
+++ b/irc/ruby-irc/files/patch-0:bot.rb
@@ -0,0 +1,11 @@
+--- bot.rb.orig Wed Jun 14 05:12:45 2000
++++ bot.rb Fri Jan 19 17:17:42 2001
+@@ -30,7 +30,7 @@
+ parseArgs(0, "server", "",
+ "server:", "logfile:", "nick:", "operator:", "username:")
+ Server = $OPT_server
+-Operator = $OPT_operator || "Igapon"
++Operator = $OPT_operator || "igapon!igarashi@mahon.ueda.info.waseda.ac.jp"
+ Nick = $OPT_nick || "Bot"
+ UserName = $OPT_username || "iga"
+ AgentName = $OPT_agentname || "Rubyちゃん"
diff --git a/irc/ruby-irc/files/patch-0:operator.rb b/irc/ruby-irc/files/patch-0:operator.rb
new file mode 100644
index 000000000000..e1a8d6eb06d0
--- /dev/null
+++ b/irc/ruby-irc/files/patch-0:operator.rb
@@ -0,0 +1,11 @@
+--- cpi/operator.cpi.orig Wed Jun 14 10:03:51 2000
++++ cpi/operator.cpi Fri Jan 19 17:15:50 2001
+@@ -15,7 +15,7 @@
+ include IRC
+ def start(client)
+ super
+- @operator = User.parse("igapon!igarashi@mahon.ueda.info.waseda.ac.jp")
++ @operator = User.parse(Operator)
+ report("こんにちわ")
+ end
+ def stop
diff --git a/irc/ruby-irc/files/patch-bot.rb b/irc/ruby-irc/files/patch-bot.rb
new file mode 100644
index 000000000000..bb8bf687c77a
--- /dev/null
+++ b/irc/ruby-irc/files/patch-bot.rb
@@ -0,0 +1,5 @@
+--- bot.rb.orig Wed Jun 14 05:12:45 2000
++++ bot.rb Fri Jan 19 16:53:24 2001
+@@ -36 +36 @@
+-AgentName = $OPT_agentname || "Rubyちゃん"
++AgentName = $OPT_agentname || "Ruby-chan"
diff --git a/irc/ruby-irc/files/patch-dice.cpi b/irc/ruby-irc/files/patch-dice.cpi
new file mode 100644
index 000000000000..3723205d4e21
--- /dev/null
+++ b/irc/ruby-irc/files/patch-dice.cpi
@@ -0,0 +1,27 @@
+--- cpi/dice.cpi.orig Tue Jun 13 00:52:00 2000
++++ cpi/dice.cpi Fri Jan 19 16:54:24 2001
+@@ -3 +3 @@
+-#さいころ振りエージェント
++# "Dice Thrower" agent
+@@ -11 +11 @@
+-#このスクリプトは
++#This script was translated from a perl script:
+@@ -15 +14,0 @@
+-#を移植させて頂いたものです。
+@@ -17 +16 @@
+-#"2d6"のような表現に反応し、さいころを振ってくれます。
++#It responds to phrases like "2d6" and throws dice.
+@@ -20 +19 @@
+-agent = IRC::PassiveAgent::new("さいころ振り")
++agent = IRC::PassiveAgent::new("Dice Thrower")
+@@ -41,5 +40,5 @@
+- 'だいすのかずがへんですぅ',
+- 'そのだいすはもってないですぅ',
+- 'そんなにたくさんもってないですぅ〜',
+- 'だいすがつくえからおちたですぅ',
+- '0 ではわれないですぅ〜',
++ 'The number of dice is invalid.',
++ 'Sorry, I don\'t have such kind of dice.',
++ 'Sorry, I don\'t have so many dice.',
++ 'Oops, dice fell out of the table!',
++ 'Divided by zero.',
diff --git a/irc/ruby-irc/files/patch-init.cpi b/irc/ruby-irc/files/patch-init.cpi
new file mode 100644
index 000000000000..db1c64757a8b
--- /dev/null
+++ b/irc/ruby-irc/files/patch-init.cpi
@@ -0,0 +1,18 @@
+--- cpi/init.cpi.orig Tue Jun 13 00:52:00 2000
++++ cpi/init.cpi Fri Jan 19 16:20:28 2001
+@@ -3 +3 @@
+-#初期化スクリプト
++#Initialization
+@@ -12,2 +12,2 @@
+-# ここではIRC::Clientクラスのメソッドが利用できます。
+-# IRC::Client#startAgentを呼び出してプラグインエージェントを起動できます。
++# You can invoke the methods of the class IRC::Client.
++# Invoke IRC::Client#startAgent to run each plug-in agent.
+@@ -16 +16 @@
+-# エージェントの起動
++# Invocation of agents
+@@ -24,2 +24,2 @@
+-# nilを返すことにより、1度きりの実行となる。
+-# 登録されることはない。
++# Returning nil means "run me just once"
++# so as not to registered as a resident agent.
diff --git a/irc/ruby-irc/files/patch-omikuji.cpi b/irc/ruby-irc/files/patch-omikuji.cpi
new file mode 100644
index 000000000000..8dc4c4d06ba4
--- /dev/null
+++ b/irc/ruby-irc/files/patch-omikuji.cpi
@@ -0,0 +1,36 @@
+--- cpi/omikuji.cpi.orig Tue Jun 13 00:52:00 2000
++++ cpi/omikuji.cpi Fri Jan 19 17:07:00 2001
+@@ -3 +3 @@
+-#おみくじエージェント
++#Omikuji - Fortuneteller agent
+@@ -11 +11 @@
+-agent = IRC::PassiveAgent::new("おみくじ")
++gent = IRC::PassiveAgent::new("Fortuneteller")
+@@ -26 +26 @@
+- if message.trailing =~ /^(?:\s| )*おみくじ(?:\s| )*$/
++ if message.trailing =~ /^(?:\s| )*(?:Fortune|Omikuji)(?:\s| )*$/
+@@ -38,2 +38,2 @@
+-#from:String おみくじを引いた人
+-#to:String 結果の送り先
++#from:String - Consultee
++#to:String - Recipient
+@@ -41,2 +41,2 @@
+- privmsg("おみくじ引きまぁす。", to)
+- privmsg("#{from}さんの運勢は……", to)
++ privmsg("Consulting an oracle.", to)
++ privmsg("Reading #{from}'s fortune...", to)
+@@ -48 +48 @@
+- "大吉でぇす!!"
++ "Best Luck!!!"
+@@ -50 +50 @@
+- "中吉でぇす!"
++ "Good Luck!!"
+@@ -52 +52 @@
+- "小吉でぇす!"
++ "Not Much Luck!"
+@@ -54 +54 @@
+- "凶でぇす!"
++ "Bad Luck!"
+@@ -56 +56 @@
+- "大凶でぇす!"
++ "Worst Luck!!"
diff --git a/irc/ruby-irc/files/patch-operator.cpi b/irc/ruby-irc/files/patch-operator.cpi
new file mode 100644
index 000000000000..72a32a9ca467
--- /dev/null
+++ b/irc/ruby-irc/files/patch-operator.cpi
@@ -0,0 +1,75 @@
+--- cpi/operator.cpi.orig Wed Jun 14 10:03:51 2000
++++ cpi/operator.cpi Fri Jan 19 16:20:28 2001
+@@ -3,2 +3,2 @@
+-#Operator命令処理エージェント
+-# ぷりぶで来た!ではじまる命令に反応します。
++#Command Executer
++# This agent responds to privmsg's from the operator that start with "!" and execute the commands.
+@@ -12 +12 @@
+-agent = IRC::PassiveAgent::new("Operator命令")
++agent = IRC::PassiveAgent::new("CommandExecuter")
+@@ -19 +19 @@
+- report("こんにちわ")
++ report("Hello, sir.")
+@@ -36 +36 @@
+- report("#{user}さんが「#{str}」だって。")
++ report("#{user} commanded me \"#{str}\".")
+@@ -44 +44 @@
+- privmsg("!"+str, @operator.nick)
++ privmsg("!"+str, @operator.nick)
+@@ -51 +51 @@
+- when /\A(?:quit|停止|ばいばい)\Z/
++ when /\Aquit\Z/
+@@ -53 +53 @@
+- when /\A(?:reboot|再起動)\Z/
++ when /\Areboot\Z/
+@@ -55 +55 @@
+- when /\A(?:エージェント|えーじぇんと|listAgent)\Z/
++ when /\AlistAgent\Z/
+@@ -57 +57 @@
+- when /\A(?:restartAgent|えーじぇんとさいきどう|エージェント再起動)[\s ]+(\w+)\Z/
++ when /\ArestartAgent[\s ]+(\w+)\Z/
+@@ -59 +59 @@
+- when /\A(?:channels|ちゃんねる|チャンネル)\Z/
++ when /\Achannels\Z/
+@@ -61 +61 @@
+- when /\A(?:invite|おいで)[\s ]+(\S+)\Z/
++ when /\Ainvite[\s ]+(\S+)\Z/
+@@ -64 +64 @@
+- report("ほえ?")
++ report("Beg your pardon, sir?")
+@@ -71 +71 @@
+- report("ばいば〜い☆")
++ report("I am leaving, sir!")
+@@ -83 +83 @@
+- # エージェント:一覧
++ # List agents
+@@ -85 +85 @@
+- report("エージェント一覧:")
++ report("List of agents:")
+@@ -91 +91 @@
+- report("(エージェント一覧ここまで)")
++ report("(End of list)")
+@@ -94 +94 @@
+- # エージェント:再起動
++ # Restart an agent
+@@ -98 +98 @@
+- report("エージェント[#{new_agent.nick}]を再起動しました。")
++ report("Agent [#{new_agent.nick}] has been restarted.")
+@@ -102 +102 @@
+- # 自分の入っているチャンネル
++ # List channels it's joining
+@@ -106 +106 @@
+- report("今入っているちゃんねるは")
++ report("I am joining the channels: ")
+@@ -108 +107,0 @@
+- report("だよ。")
+@@ -110 +109 @@
+- report("今どのチャンネルにも入ってないよ")
++ report("I am not joining any channels.")
+@@ -115 +114 @@
+- report(channel+"にいきます。")
++ report("I'm coming to "+channel)
+@@ -117 +116 @@
+- privmsg("こんにちわ、おじゃましま〜す☆(試験運転中です)", channel)
++ privmsg("Hello, excuse me to interrupting you. (I am in experimental service)", channel)
diff --git a/irc/ruby-irc/files/patch-syslog.cpi b/irc/ruby-irc/files/patch-syslog.cpi
new file mode 100644
index 000000000000..e06379535728
--- /dev/null
+++ b/irc/ruby-irc/files/patch-syslog.cpi
@@ -0,0 +1,8 @@
+--- cpi/syslog.cpi.orig Tue Jun 13 00:52:00 2000
++++ cpi/syslog.cpi Fri Jan 19 16:20:28 2001
+@@ -13 +13 @@
+-agent = IRC::PassiveAgent::new("syslog")
++agent = IRC::PassiveAgent::new("Syslog")
+@@ -27 +27 @@
+- buf = log.timestamp.strftime("%m月%d日%H時%M分")
++ buf = log.timestamp.strftime("%m/%d %H:%M")
diff --git a/irc/ruby-irc/files/patch-userlog.cpi b/irc/ruby-irc/files/patch-userlog.cpi
new file mode 100644
index 000000000000..6ea4cd7b653d
--- /dev/null
+++ b/irc/ruby-irc/files/patch-userlog.cpi
@@ -0,0 +1,11 @@
+--- cpi/userlog.cpi.orig Tue Jun 13 00:52:00 2000
++++ cpi/userlog.cpi Fri Jan 19 16:20:28 2001
+@@ -3 +3 @@
+-# ユーザ定義のlogger
++# User defined logger
+@@ -11 +11 @@
+-agent = IRC::PassiveAgent::new("ログ取り")
++agent = IRC::PassiveAgent::new("Logger")
+@@ -25 +25 @@
+- buf = log.timestamp.strftime("%m月%d日%H時%M分")
++ buf = log.timestamp.strftime("%m/%d %H:%M")
diff --git a/irc/ruby-irc/pkg-comment b/irc/ruby-irc/pkg-comment
new file mode 100644
index 000000000000..add4a53e9374
--- /dev/null
+++ b/irc/ruby-irc/pkg-comment
@@ -0,0 +1 @@
+IRC client framework for Ruby
diff --git a/irc/ruby-irc/pkg-descr b/irc/ruby-irc/pkg-descr
new file mode 100644
index 000000000000..eb96d72f7383
--- /dev/null
+++ b/irc/ruby-irc/pkg-descr
@@ -0,0 +1,3 @@
+Ruby/IRC is an IRC client framework for Ruby.
+
+Author: Hiroshi IGARASHI <igarashi@ueda.info.waseda.ac.jp>
diff --git a/irc/ruby-irc/pkg-plist b/irc/ruby-irc/pkg-plist
new file mode 100644
index 000000000000..30ec6f087840
--- /dev/null
+++ b/irc/ruby-irc/pkg-plist
@@ -0,0 +1,41 @@
+%%RUBY_SITELIBDIR%%/irc/agent.rb
+%%RUBY_SITELIBDIR%%/irc/client.rb
+%%RUBY_SITELIBDIR%%/irc/const.rb
+%%RUBY_SITELIBDIR%%/irc/irc.rb
+@dirrm %%RUBY_SITELIBDIR%%/irc
+%%RUBY_SITELIBDIR%%/localize.rb
+%%RUBY_DOCDIR%%/irc/BUGS
+%%RUBY_DOCDIR%%/irc/ChangeLog
+%%RUBY_DOCDIR%%/irc/MANIFEST
+%%RUBY_DOCDIR%%/irc/NEWS
+%%RUBY_DOCDIR%%/irc/README
+%%RUBY_DOCDIR%%/irc/TODO
+%%RUBY_DOCDIR%%/irc/ja/MEMO.ja
+%%RUBY_DOCDIR%%/irc/ja/README.ja
+%%RUBY_DOCDIR%%/irc/ja/index.html
+%%RUBY_DOCDIR%%/irc/ja/irc-client.doc
+%%RUBY_DOCDIR%%/irc/ja/irc-client-api.doc
+%%RUBY_DOCDIR%%/irc/ja/irc-lib-api.doc
+%%RUBY_DOCDIR%%/irc/ja/irc-lib.doc
+@dirrm %%RUBY_DOCDIR%%/irc/ja
+@dirrm %%RUBY_DOCDIR%%/irc
+%%RUBY_EXAMPLESDIR%%/irc/ja/cpi/dice.cpi
+%%RUBY_EXAMPLESDIR%%/irc/ja/cpi/init.cpi
+%%RUBY_EXAMPLESDIR%%/irc/ja/cpi/omikuji.cpi
+%%RUBY_EXAMPLESDIR%%/irc/ja/cpi/operator.cpi
+%%RUBY_EXAMPLESDIR%%/irc/ja/cpi/syslog.cpi
+%%RUBY_EXAMPLESDIR%%/irc/ja/cpi/userlog.cpi
+%%RUBY_EXAMPLESDIR%%/irc/ja/bot.rb
+@dirrm %%RUBY_EXAMPLESDIR%%/irc/ja/cpi
+@dirrm %%RUBY_EXAMPLESDIR%%/irc/ja/log
+@dirrm %%RUBY_EXAMPLESDIR%%/irc/ja
+%%RUBY_EXAMPLESDIR%%/irc/cpi/dice.cpi
+%%RUBY_EXAMPLESDIR%%/irc/cpi/init.cpi
+%%RUBY_EXAMPLESDIR%%/irc/cpi/omikuji.cpi
+%%RUBY_EXAMPLESDIR%%/irc/cpi/operator.cpi
+%%RUBY_EXAMPLESDIR%%/irc/cpi/syslog.cpi
+%%RUBY_EXAMPLESDIR%%/irc/cpi/userlog.cpi
+%%RUBY_EXAMPLESDIR%%/irc/bot.rb
+@dirrm %%RUBY_EXAMPLESDIR%%/irc/cpi
+@dirrm %%RUBY_EXAMPLESDIR%%/irc/log
+@dirrm %%RUBY_EXAMPLESDIR%%/irc