--- /dev/null
+= DESCRIPTION:
+
+= REQUIREMENTS:
+
+= ATTRIBUTES:
+
+= USAGE:
+
--- /dev/null
+maintainer "OpenStreetMap Administrators"
+maintainer_email "admins@openstreetmap.org"
+license "Apache 2.0"
+description "Installs and configures cgiirc"
+long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
+version "1.0.0"
+depends "apache"
--- /dev/null
+#
+# Cookbook Name:: cgiirc
+# Recipe:: default
+#
+# Copyright 2011, OpenStreetMap Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+include_recipe "apache"
+
+blocks = data_bag_item("cgiirc", "blocks")
+
+package "cgiirc"
+
+template "/etc/cgiirc/cgiirc.config" do
+ source "cgiirc.config.erb"
+ owner "root"
+ group "root"
+ mode 0644
+end
+
+template "/etc/cgiirc/ipaccess" do
+ source "ipaccess.erb"
+ owner "root"
+ group "root"
+ mode 0644
+ variables :blocks => blocks["addresses"]
+end
+
+apache_site "irc.openstreetmap.org" do
+ template "apache.erb"
+end
--- /dev/null
+# DO NOT EDIT - This file is being maintained by Chef
+
+<VirtualHost *:80>
+ ServerName <%= @name %>
+ ServerAdmin webmaster@openstreetmap.org
+
+ CustomLog /var/log/apache2/<%= @name %>-access.log combined
+ ErrorLog /var/log/apache2/<%= @name %>-error.log
+
+ DocumentRoot /usr/lib/cgi-bin/cgiirc
+ DirectoryIndex irc.cgi
+ Alias /images /usr/share/images/cgiirc
+
+ <Directory "/usr/lib/cgi-bin/cgiirc">
+ AddHandler cgi-script .cgi
+ </Directory>
+
+ <IfModule mod_deflate.c>
+ RemoveOutputFilter DEFLATE
+ SetEnv no-gzip
+ </IfModule>
+</VirtualHost>
--- /dev/null
+# DO NOT EDIT - This file is being maintained by Chef
+
+# CGI:IRC configuration file.
+#
+# Check /usr/share/doc/cgiirc/examples/cgiirc.config.full.gz
+# for more details.
+
+# Configure defaults
+default_server = irc.oftc.net
+default_port = 6667
+default_channel = #osm,#osm-dev,#osm-ewg,#osm-au,#osm-by,#osm-ca,#osm-ch,#osm-de,#osm-dk,#osm-es,#osm-fi,#osm-fr,#osm-gb,#osm-ie,#osm-it,#osm-local,#osm-lv,#osm-nl,#osm-no,#osm-nominatim,#osm-pl,#osm-pt,#osm-ru,#osm.se,#osm-strategic,#osm-us,#osm-za,#hot
+default_name = CGI:IRC User
+default_nick = CGI???
+
+# Path to images
+image_path = /images
+
+# Paths to CGI scripts
+script_nph = nph-irc.cgi
+script_form = client-perl.cgi
+script_login = irc.cgi
+
+# Access control file
+ip_access_file = ipaccess
--- /dev/null
+# DO NOT EDIT - This file is being maintained by Chef
+
+# CGI:IRC ipaccess file. (For CGI:IRC versions from 0.5.3).
+#
+# Check /usr/share/doc/cgiirc/examples/ipaccess.example
+# for more details.
+
+<% @blocks.each do |name,addresses| -%>
+# Block <%= name %>
+<% addresses.each do |address| -%>
+<%= address %> 0
+<% end -%>
+
+<% end -%>
+# Allow everybody.
+0.0.0.0/0