summaryrefslogtreecommitdiffstats
path: root/main/redmine
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2011-06-21 10:56:55 +0000
committerCarlo Landmeter <clandmeter@gmail.com>2011-06-21 10:56:55 +0000
commit489b6a5306f268d5c35466a82ef1184764d0f30d (patch)
treeb3c7753a61e1c472438ab4bb7161f41052ba31e3 /main/redmine
parentaf4306109b58e890c58fe6a6bcb5c4b98c0f6164 (diff)
downloadaports-489b6a5306f268d5c35466a82ef1184764d0f30d.tar.bz2
aports-489b6a5306f268d5c35466a82ef1184764d0f30d.tar.xz
aports/main: move redmine and deps to main
Diffstat (limited to 'main/redmine')
-rw-r--r--main/redmine/APKBUILD85
-rw-r--r--main/redmine/additional_environment.rb16
-rw-r--r--main/redmine/configuration.yml147
-rw-r--r--main/redmine/database.yml10
-rw-r--r--main/redmine/lighttpd-virtual.conf26
5 files changed, 284 insertions, 0 deletions
diff --git a/main/redmine/APKBUILD b/main/redmine/APKBUILD
new file mode 100644
index 000000000..b3bd5a13f
--- /dev/null
+++ b/main/redmine/APKBUILD
@@ -0,0 +1,85 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer:
+pkgname=redmine
+pkgver=1.2.0
+pkgrel=2
+pkgdesc="Project management web application written in Ruby"
+url="http://redmine.org"
+arch="noarch"
+license="GPL2"
+depends="ruby-rails ruby-fcgi ruby-rmagick ruby-i18n ruby-openid
+ lighttpd rubygems"
+depends_dev=
+makedepends="$depends_dev"
+install=""
+subpackages=""
+source="http://rubyforge.org/frs/download.php/74944/redmine-$pkgver.tar.gz
+ additional_environment.rb
+ configuration.yml
+ database.yml
+ lighttpd-virtual.conf"
+_webapps="usr/share/webapps"
+
+_builddir="$srcdir"/redmine-$pkgver
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ #nothing to do here
+ return 0
+}
+
+package() {
+ cd "$_builddir"
+ mkdir -p "$pkgdir/$_webapps/$pkgname" \
+ "$pkgdir"/var/log \
+ "$pkgdir"/etc/lighttpd \
+ "$pkgdir"/var/www/localhost/htdocs
+ # move app to webapps dir
+ mv * "$pkgdir/$_webapps/$pkgname"
+ # install default config to /etc/redmine
+ install -m644 -D "$srcdir"/database.yml \
+ "$pkgdir"/etc/redmine/database.yml
+ install -m644 -D "$srcdir"/configuration.yml \
+ "$pkgdir"/etc/redmine/configuration.yml
+ install -m644 -D "$srcdir"/additional_environment.rb \
+ "$pkgdir"/etc/redmine/additional_environment.rb
+ # we use fcgi by default
+ cd "$pkgdir/$_webapps/$pkgname"/public
+ ln -s dispatch.fcgi.example dispatch.fcgi
+ cd "$pkgdir/$_webapps/$pkgname"/config
+ # link config to webapps dir
+ ln -s /etc/redmine/database.yml
+ ln -s /etc/redmine/configuration.yml
+ ln -s /etc/redmine/additional_environment.rb
+ # move redmine log to /var/log
+ cd "$pkgdir/$_webapps/$pkgname"
+ mv log "$pkgdir"/var/log/$pkgname
+ # symlink logs to var log
+ ln -s /var/log/redmine log
+ # symlink redmine to htdocs dir
+ ln -s "/$_webapps/$pkgname" \
+ "$pkgdir"/var/www/localhost/htdocs/"$pkgname"
+ # example lighttpd config for redmine virtual hosting
+ cp "$srcdir"/lighttpd-virtual.conf \
+ "$pkgdir"/etc/lighttpd/redmine-virtual.conf
+ # set correct permissions
+ chown -R lighttpd:lighttpd \
+ "$pkgdir/$_webapps/$pkgname" \
+ "$pkgdir"/var/log/"$pkgname" \
+ "$pkgdir"/etc/"$pkgname"
+}
+
+md5sums="9d9809a6137c75f754a7fb6c0acc1d6c redmine-1.2.0.tar.gz
+b9ca61be7418969188c74c110e3fe3a5 additional_environment.rb
+69243d1b5b9b111da631c7034d51ba71 configuration.yml
+4c4b10aadbc229ea75f309ff1fafcd7a database.yml
+f43ad7e5875b46b723c69b3a9b5e52f2 lighttpd-virtual.conf"
diff --git a/main/redmine/additional_environment.rb b/main/redmine/additional_environment.rb
new file mode 100644
index 000000000..0d37f579d
--- /dev/null
+++ b/main/redmine/additional_environment.rb
@@ -0,0 +1,16 @@
+# Copy this file to additional_environment.rb and add any statements
+# that need to be passed to the Rails::Initializer. `config` is
+# available in this context.
+#
+# Example:
+#
+# config.log_level = :debug
+# config.gem "example_plugin", :lib => false
+# config.gem "timesheet_plugin", :lib => false, :version => '0.5.0'
+# config.gem "aws-s3", :lib => "aws/s3"
+# ...
+#
+
+config.logger = Logger.new(config.log_path, 2, 1000000)
+config.logger.level = Logger::WARN
+
diff --git a/main/redmine/configuration.yml b/main/redmine/configuration.yml
new file mode 100644
index 000000000..a729c60c7
--- /dev/null
+++ b/main/redmine/configuration.yml
@@ -0,0 +1,147 @@
+# = Redmine configuration file
+#
+# Each environment has it's own configuration options. If you are only
+# running in production, only the production block needs to be configured.
+# Environment specific configuration options override the default ones.
+#
+# Note that this file needs to be a valid YAML file.
+#
+# == Outgoing email settings (email_delivery setting)
+#
+# === Common configurations
+#
+# ==== Sendmail command
+#
+# production:
+# email_delivery:
+# delivery_method: :sendmail
+#
+# ==== Simple SMTP server at localhost
+#
+# production:
+# email_delivery:
+# delivery_method: :smtp
+# smtp_settings:
+# address: "localhost"
+# port: 25
+#
+# ==== SMTP server at example.com using LOGIN authentication and checking HELO for foo.com
+#
+# production:
+# email_delivery:
+# delivery_method: :smtp
+# smtp_settings:
+# address: "example.com"
+# port: 25
+# authentication: :login
+# domain: 'foo.com'
+# user_name: 'myaccount'
+# password: 'password'
+#
+# ==== SMTP server at example.com using PLAIN authentication
+#
+# production:
+# email_delivery:
+# delivery_method: :smtp
+# smtp_settings:
+# address: "example.com"
+# port: 25
+# authentication: :plain
+# domain: 'example.com'
+# user_name: 'myaccount'
+# password: 'password'
+#
+# ==== SMTP server at using TLS (GMail)
+#
+# This requires some additional configuration. See the article at:
+# http://redmineblog.com/articles/setup-redmine-to-send-email-using-gmail/
+#
+# production:
+# email_delivery:
+# delivery_method: :smtp
+# smtp_settings:
+# tls: true
+# address: "smtp.gmail.com"
+# port: 587
+# domain: "smtp.gmail.com" # 'your.domain.com' for GoogleApps
+# authentication: :plain
+# user_name: "your_email@gmail.com"
+# password: "your_password"
+#
+#
+# === More configuration options
+#
+# See the "Configuration options" at the following website for a list of the
+# full options allowed:
+#
+# http://wiki.rubyonrails.org/rails/pages/HowToSendEmailsWithActionMailer
+
+
+# default configuration options for all environments
+default:
+ # Outgoing emails configuration (see examples above)
+ email_delivery:
+ delivery_method: :smtp
+ smtp_settings:
+ address: smtp.example.net
+ port: 25
+ domain: example.net
+ authentication: :login
+ user_name: "redmine@example.net"
+ password: "redmine"
+
+ # Absolute path to the directory where attachments are stored.
+ # The default is the 'files' directory in your Redmine instance.
+ # Your Redmine instance needs to have write permission on this
+ # directory.
+ # Examples:
+ # attachments_storage_path: /var/redmine/files
+ # attachments_storage_path: D:/redmine/files
+ attachments_storage_path:
+
+ # Configuration of the autologin cookie.
+ # autologin_cookie_name: the name of the cookie (default: autologin)
+ # autologin_cookie_path: the cookie path (default: /)
+ # autologin_cookie_secure: true sets the cookie secure flag (default: false)
+ autologin_cookie_name:
+ autologin_cookie_path:
+ autologin_cookie_secure:
+
+ # Configuration of SCM executable command.
+ # Absolute path (e.g. /usr/local/bin/hg) or command name (e.g. hg.exe, bzr.exe)
+ # On Windows, *.cmd, *.bat (e.g. hg.cmd, bzr.bat) does not work.
+ # Examples:
+ # scm_subversion_command: svn # (default: svn)
+ # scm_mercurial_command: C:\Program Files\TortoiseHg\hg.exe # (default: hg)
+ # scm_git_command: /usr/local/bin/git # (default: git)
+ # scm_cvs_command: cvs # (default: cvs)
+ # scm_bazaar_command: bzr.exe # (default: bzr)
+ # scm_darcs_command: darcs-1.0.9-i386-linux # (default: darcs)
+ scm_subversion_command:
+ scm_mercurial_command:
+ scm_git_command:
+ scm_cvs_command:
+ scm_bazaar_command:
+ scm_darcs_command:
+
+ # Key used to encrypt sensitive data in the database (SCM and LDAP passwords).
+ # If you don't want to enable data encryption, just leave it blank.
+ # WARNING: losing/changing this key will make encrypted data unreadable.
+ #
+ # If you want to encrypt existing passwords in your database:
+ # * set the cipher key here in your configuration file
+ # * encrypt data using 'rake db:encrypt RAILS_ENV=production'
+ #
+ # If you have encrypted data and want to change this key, you have to:
+ # * decrypt data using 'rake db:decrypt RAILS_ENV=production' first
+ # * change the cipher key here in your configuration file
+ # * encrypt data using 'rake db:encrypt RAILS_ENV=production'
+ database_cipher_key:
+
+# specific configuration options for production environment
+# that overrides the default ones
+production:
+
+# specific configuration options for development environment
+# that overrides the default ones
+development:
diff --git a/main/redmine/database.yml b/main/redmine/database.yml
new file mode 100644
index 000000000..eb934bf76
--- /dev/null
+++ b/main/redmine/database.yml
@@ -0,0 +1,10 @@
+# MySQL (default setup).
+
+production:
+ adapter: mysql
+ database: redmine
+ host: localhost
+ username: root
+ password:
+ encoding: utf8
+
diff --git a/main/redmine/lighttpd-virtual.conf b/main/redmine/lighttpd-virtual.conf
new file mode 100644
index 000000000..be0c684b0
--- /dev/null
+++ b/main/redmine/lighttpd-virtual.conf
@@ -0,0 +1,26 @@
+## copy this file to /etc/lighttpd to enable virtual hosting
+## make sure you set hostname correctly
+
+server.modules += ( "mod_simple_vhost" , "mod_fastcgi" )
+
+$HTTP["host"] =~ "^www\.example\.org$" {
+ server.document-root = "/var/www/localhost/htdocs/redmine/public/"
+ server.follow-symlink = "enable"
+ server.indexfiles = ( "dispatch.fcgi" )
+ server.error-handler-404 = "/dispatch.fcgi"
+
+ fastcgi.server = (
+ ".fcgi" => (
+ "redmine" => (
+ "bin-path" => "/usr/bin/ruby /var/www/localhost/htdocs/redmine/public/dispatch.fcgi",
+ "socket" => "/tmp/redmine.socket",
+ "min-procs" => 1,
+ "max-procs" => 4,
+ "idle-timeout" => 120,
+ "check-local" => "disable",
+ "bin-environment" => ( "RAILS_ENV" => "production" ),
+ )
+ )
+ )
+}
+