summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Volkov <pva@gentoo.org>2013-05-11 20:59:39 +0000
committerPeter Volkov <pva@gentoo.org>2013-05-11 20:59:39 +0000
commit5411e21bc04ad7ba18b78177403be1b89cdc45b5 (patch)
tree26f0098c4d0b91b9b397e49ab4a2a2bd1fada8fe
parentAdded profile for containers. (diff)
downloadpva-5411e21bc04ad7ba18b78177403be1b89cdc45b5.tar.gz
pva-5411e21bc04ad7ba18b78177403be1b89cdc45b5.tar.bz2
pva-5411e21bc04ad7ba18b78177403be1b89cdc45b5.zip
Redmine version bump.
svn path=/; revision=515
-rw-r--r--www-apps/redmine/ChangeLog187
-rw-r--r--www-apps/redmine/Manifest14
-rw-r--r--www-apps/redmine/files/10_redmine_vhost.conf12
-rw-r--r--www-apps/redmine/files/redmine-1.4.1-bundler.patch15
-rw-r--r--www-apps/redmine/files/redmine-2.initd49
-rw-r--r--www-apps/redmine/files/redmine-rubytree-r8214.patch261
-rw-r--r--www-apps/redmine/files/redmine.confd13
-rw-r--r--www-apps/redmine/files/redmine.initd45
-rw-r--r--www-apps/redmine/metadata.xml14
-rw-r--r--www-apps/redmine/redmine-1.4.7.ebuild201
-rw-r--r--www-apps/redmine/redmine-2.2.0.ebuild218
-rw-r--r--www-apps/redmine/redmine-2.2.4.ebuild219
12 files changed, 1248 insertions, 0 deletions
diff --git a/www-apps/redmine/ChangeLog b/www-apps/redmine/ChangeLog
new file mode 100644
index 0000000..c201fa3
--- /dev/null
+++ b/www-apps/redmine/ChangeLog
@@ -0,0 +1,187 @@
+# ChangeLog for www-apps/redmine
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/www-apps/redmine/ChangeLog,v 1.33 2013/01/07 13:39:26 matsuu Exp $
+
+*redmine-2.2.0 (07 Jan 2013)
+*redmine-2.1.5 (07 Jan 2013)
+*redmine-1.4.5 (07 Jan 2013)
+
+ 07 Jan 2013; MATSUU Takuto <matsuu@gentoo.org> +redmine-1.4.5.ebuild,
+ +redmine-2.1.5.ebuild, +redmine-2.2.0.ebuild, +files/redmine-2.initd:
+ Version bumped, bug #418925.
+
+ 16 Aug 2012; Diego E. Pettenò <flameeyes@gentoo.org> redmine-1.3.2.ebuild,
+ redmine-1.3.3.ebuild, redmine-1.4.1.ebuild, redmine-1.4.3.ebuild:
+ Update after Ruby packages move.
+
+*redmine-1.4.3 (07 Jun 2012)
+
+ 07 Jun 2012; MATSUU Takuto <matsuu@gentoo.org> +redmine-1.4.3.ebuild:
+ Version bumped.
+
+*redmine-1.4.1 (25 Apr 2012)
+*redmine-1.3.3 (25 Apr 2012)
+
+ 25 Apr 2012; MATSUU Takuto <matsuu@gentoo.org> -redmine-1.3.0.ebuild,
+ -redmine-1.3.1.ebuild, +redmine-1.3.3.ebuild, +redmine-1.4.1.ebuild,
+ +files/redmine-1.4.1-bundler.patch:
+ Version bumped. Removed old versions.
+
+*redmine-1.3.2 (12 Mar 2012)
+
+ 12 Mar 2012; MATSUU Takuto <matsuu@gentoo.org> +redmine-1.3.2.ebuild,
+ files/redmine.initd:
+ Version bumped. Fixed directory owners and permissions, bug #406605.
+
+*redmine-1.3.1 (26 Feb 2012)
+
+ 26 Feb 2012; MATSUU Takuto <matsuu@gentoo.org>
+ +files/redmine-rubytree-r8214.patch, -redmine-1.1.3.ebuild,
+ -redmine-1.2.3.ebuild, +redmine-1.3.1.ebuild:
+ Version bumped, bug #404245. Added einfo about sqlite3, bug #401087. Removed
+ rubytree, bug #399503. Removed old versions.
+
+ 11 Jan 2012; MATSUU Takuto <matsuu@gentoo.org> -redmine-1.2.1-r1.ebuild,
+ -redmine-1.2.2.ebuild, redmine-1.3.0.ebuild:
+ Removed email.yml information, bug #395279. Removed old versions.
+
+*redmine-1.3.0 (12 Dec 2011)
+*redmine-1.2.3 (12 Dec 2011)
+
+ 12 Dec 2011; MATSUU Takuto <matsuu@gentoo.org> +redmine-1.2.3.ebuild,
+ +redmine-1.3.0.ebuild:
+ Version bumped.
+
+ 09 Dec 2011; Diego E. Pettenò <flameeyes@gentoo.org> redmine-1.1.3.ebuild,
+ redmine-1.2.1-r1.ebuild, redmine-1.2.2.ebuild:
+ QA: make dependencies behave as they are intended, which also means fixing
+ breakage after coderay 0.9.7 was removed. Also drop the mysql/postgres/sqlite3
+ USE flags that are vastly unbound and that should not be checked for in
+ pkg_setup.
+
+*redmine-1.2.2 (14 Nov 2011)
+
+ 14 Nov 2011; MATSUU Takuto <matsuu@gentoo.org> +redmine-1.2.2.ebuild:
+ Version bumped. Fixed dependency, bug #384929.
+
+*redmine-1.2.1-r1 (29 Sep 2011)
+
+ 29 Sep 2011; MATSUU Takuto <matsuu@gentoo.org> -redmine-1.1.2.ebuild,
+ -redmine-1.2.0.ebuild, -redmine-1.2.1.ebuild, +redmine-1.2.1-r1.ebuild,
+ files/redmine.initd:
+ Fixed dependency. Fixed initd files. Removed old versions.
+
+*redmine-1.2.1 (27 Jul 2011)
+
+ 27 Jul 2011; MATSUU Takuto <matsuu@gentoo.org> +redmine-1.2.1.ebuild:
+ Version bumped. Fixed dependency, bug #374485. Added EPREFIX.
+
+*redmine-1.2.0 (04 Jun 2011)
+
+ 04 Jun 2011; MATSUU Takuto <matsuu@gentoo.org> +redmine-1.2.0.ebuild:
+ Version bumped. Removed SCM USE flags.
+
+*redmine-1.1.3 (12 May 2011)
+
+ 12 May 2011; MATSUU Takuto <matsuu@gentoo.org> +redmine-1.1.3.ebuild:
+ Version bumped.
+
+ 24 Apr 2011; MATSUU Takuto <matsuu@gentoo.org> -redmine-1.0.5.ebuild,
+ -redmine-1.1.0.ebuild, -redmine-1.1.1.ebuild, redmine-1.1.2.ebuild:
+ Added dev-ruby/rake to dependency, bug #359195. Removed old versions.
+
+*redmine-1.1.2 (08 Mar 2011)
+
+ 08 Mar 2011; MATSUU Takuto <matsuu@gentoo.org> +redmine-1.1.2.ebuild:
+ Version bumped. Fixed dependency, bug #353742.
+
+*redmine-1.1.1 (30 Jan 2011)
+
+ 30 Jan 2011; MATSUU Takuto <matsuu@gentoo.org> +redmine-1.1.1.ebuild:
+ Version bumped.
+
+ 24 Jan 2011; MATSUU Takuto <matsuu@gentoo.org> -redmine-0.9.6.ebuild,
+ -redmine-1.0.2.ebuild, -redmine-1.0.3.ebuild, -redmine-1.0.4.ebuild,
+ redmine-1.0.5.ebuild, redmine-1.1.0.ebuild:
+ Removed dev-ruby/rails from RDEPEND, bug #352511. Fixed elog message bug
+ #352588. Removed old versions.
+
+*redmine-1.1.0 (17 Jan 2011)
+
+ 17 Jan 2011; MATSUU Takuto <matsuu@gentoo.org> +redmine-1.1.0.ebuild:
+ Version bumped, bug #351892.
+
+*redmine-1.0.5 (25 Dec 2010)
+
+ 25 Dec 2010; MATSUU Takuto <matsuu@gentoo.org> +redmine-1.0.5.ebuild,
+ files/redmine.initd:
+ Version bumped.
+
+*redmine-1.0.4 (13 Dec 2010)
+
+ 13 Dec 2010; MATSUU Takuto <matsuu@gentoo.org> +redmine-1.0.4.ebuild:
+ Version bumped, bug #347650.
+
+*redmine-1.0.3 (04 Nov 2010)
+
+ 04 Nov 2010; MATSUU Takuto <matsuu@gentoo.org> +redmine-1.0.3.ebuild:
+ Version bumped.
+
+*redmine-1.0.2 (02 Oct 2010)
+
+ 02 Oct 2010; MATSUU Takuto <matsuu@gentoo.org> +redmine-1.0.2.ebuild:
+ Version bumped.
+
+ 10 Jul 2010; MATSUU Takuto <matsuu@gentoo.org> redmine-0.9.6.ebuild:
+ Fixed dependency.
+
+*redmine-0.9.6 (08 Jul 2010)
+
+ 08 Jul 2010; MATSUU Takuto <matsuu@gentoo.org> -redmine-0.9.2.ebuild,
+ -redmine-0.9.3.ebuild, -redmine-0.9.4.ebuild, -redmine-0.9.5.ebuild,
+ +redmine-0.9.6.ebuild:
+ Version bumped. Removed old versions.
+
+*redmine-0.9.5 (07 Jul 2010)
+
+ 07 Jul 2010; MATSUU Takuto <matsuu@gentoo.org> +redmine-0.9.5.ebuild:
+ Version bumped. Convert to ruby-ng.
+
+ 22 Jun 2010; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
+ redmine-0.9.2.ebuild, redmine-0.9.3.ebuild, redmine-0.9.4.ebuild:
+ dev-util/subversion renamed to dev-vcs/subversion.
+
+ 19 Jun 2010; Jonathan Callen <abcd@gentoo.org> redmine-0.9.2.ebuild,
+ redmine-0.9.3.ebuild, redmine-0.9.4.ebuild:
+ Moving dev-util/cvs* to dev-vcs/cvs*
+
+*redmine-0.9.4-r1 (08 May 2010)
+
+ 08 May 2010; MATSUU Takuto <matsuu@gentoo.org> +redmine-0.9.4-r1.ebuild:
+ Added fastcgi USE flag, bug #318089.
+
+*redmine-0.9.4 (07 May 2010)
+
+ 07 May 2010; MATSUU Takuto <matsuu@gentoo.org> +redmine-0.9.4.ebuild,
+ metadata.xml:
+ Version bumped.
+
+ 17 Mar 2010; Sebastian Pipping <sping@gentoo.org> redmine-0.9.2.ebuild,
+ redmine-0.9.3.ebuild, metadata.xml:
+ Propagate move of dev-util/git to dev-vcs/git
+
+ 14 Mar 2010; Lennart Kolmodin <kolmodin@gentoo.org> redmine-0.9.2.ebuild,
+ redmine-0.9.3.ebuild, metadata.xml:
+ Change references to dev-util/darcs to dev-vcs/darcs due to the move.
+
+*redmine-0.9.3 (04 Mar 2010)
+
+ 04 Mar 2010; MATSUU Takuto <matsuu@gentoo.org> +redmine-0.9.3.ebuild:
+ Version bumped.
+
+*redmine-0.9.2 (10 Feb 2010)
+
+ 10 Feb 2010; MATSUU Takuto <matsuu@gentoo.org>
+ +files/10_redmine_vhost.conf, +redmine-0.9.2.ebuild, +files/redmine.confd,
+ +files/redmine.initd, +metadata.xml:
+ Initial import, bug #260575.
diff --git a/www-apps/redmine/Manifest b/www-apps/redmine/Manifest
new file mode 100644
index 0000000..c01d5f7
--- /dev/null
+++ b/www-apps/redmine/Manifest
@@ -0,0 +1,14 @@
+AUX 10_redmine_vhost.conf 343 SHA256 4067d312a5fc8e7f1f98e8917d2e9c296a70a7e9847efaf92a8415d753387435 SHA512 839a01abedd2977f79bde2a55041d4e3e3a72de1e04e2bdc4aa5169b3ec22adce12b2b39d4b991d6e034fcd13fbcd030cba5ecc69ae71a76f7f37d2cdde09edc WHIRLPOOL 7bdb8c8eb7b24b5fa7750f14a5d6d90504b9e95b1c3d07827a1bba320135ff9aca195282bcc86e6964b742cf0dde3690d79065e61fd14145135ab6ff4c10816b
+AUX redmine-1.4.1-bundler.patch 504 SHA256 e3c49d68db8e439d9e9203d7369117bf4c61e322d37752e085d34daf012f3128 SHA512 02a799f692389ba79d58f21b2ff9cc3f0c4bdaf5883b787eaf02d43a687117c69dd57116265a48e5bb6378dac7b2fea7a6abb4e778e97bdba4e67d15c9d0eb7b WHIRLPOOL caafb4228182f736b46253f0542403ae4117549fbfd310c34b5c671d74653529bccf59f7f910a085925a271fa434eddfa46a9281ab477ad945c447de60702f0e
+AUX redmine-2.initd 1468 SHA256 02d057b507e541518b55491da5fdac28e96709bfdf7991a13e5acb38bf987784 SHA512 8c042ef280cb45f3d2238e8e895261ed93d6182b6e1a09f4303729e9a4553d4b8b11e88fd7385c0079f11dbd66977d5e9dc0d17b0af93d7e98b9621473b39f12 WHIRLPOOL c800adb0c134b4ae8cc8021f7173d7938f2131cbde74cb6caff64aeba080bc9eed0f283a9fdbb11737341575cd6645516ce4dd66c40e9a823fa09860fc7eca26
+AUX redmine-rubytree-r8214.patch 8082 SHA256 4fea78ac11b90a44d94bca2f424c0c180ae9d9beb19212b8a88cf157408a5812 SHA512 c292bd850af1ac78252c2b5f4e461756be034933f8d4fc31daafd2c4b3495cd5288810bdc7bbed427dc16eae93d1390afc44ed68c5c068d0f15573f43d68d870 WHIRLPOOL e35fe926db9cb171a06ac81fc85f328538388313690a08bead40f176be040a960a1fb3d5fc3281b42082c8f2801d45a0ba2a3a2275ff2eaff06b763f3d5bb005
+AUX redmine.confd 267 SHA256 2ac6b7dfc2d055554b7ee9380fcf1a49a708bbd866987b775507d7a3b30f2d41 SHA512 4e4a700f1540b5e82df6ca610a94adcb08929f5ca75e605e40372b18ccc395515cdd53451ba2b3e3d9bdf129d9052a7218f6323d526c1ffb2540254d279c8d94 WHIRLPOOL fd6e8c63921d7ab2d73b5b15ff91db64ead03e521325871e21a1d165e313a1e56c607e9d9553504ccdef10a917a85ecdd5502527df159012b471803f4063ea00
+AUX redmine.initd 1328 SHA256 18ede107d4aaa4712515e9d70910e48ce508954c682cccd29d8936fee527249a SHA512 19527695226d166983d08fb0283023084a1bada6c8ced248fdde8e74048aa364bcf467c947a33127580f9a95eb67de9faaea651a3c5a61649eac9302b03d6585 WHIRLPOOL a889c9af02e0a36635dadedda96c8c0e7c6cab75273b2202ee12e618b048d3de6b9590d041d6b94e8ff8ae995dc3f0cba68d647c6e33a30319a20c645dee879c
+DIST redmine-1.4.7.tar.gz 3676293 SHA256 949bd0d88c12f7a77a6a9a47401478a733c9d0c07fea31fa334944e901f26349 SHA512 291d33266542445e1cc8d6a38d342fa098d59c34fb93c59f15531fbe17f33eb19cd5846caa3dbd5c0b358da1bd433098f807aeb2f9c1516aca150409164a6ef8 WHIRLPOOL 401acf393e2900bcc62427565337ddaaea10a2b8dda1b11ea5e28519ddc7356bc6a8823ab4c148afc0a76ae21f3aa2b6a87722c9f47da78c13466225e117a4a4
+DIST redmine-2.2.0.tar.gz 3750916 SHA256 def6701feb247bc86d6fa0e2006832c67c07b41193db0cd2ef7c9368132b9f0c SHA512 9b74c8db74aade743e2f0d48959ff592101af04976d7fa98913afaf79a50bd835c59444911f645100cdce5a85a643a8ea108a4f94f2754fa31aeb60037dab7e7 WHIRLPOOL f5896e62b5b8e0bc75f9aff1056a71cb5a859f8804061182e1a282be6a52499d2b691a16041a2552851e70737f53458a9d81e5050a171f20e70520457b149f23
+DIST redmine-2.2.4.tar.gz 3754826 SHA256 8465eb42865f7b5972a27fd66f08678244a77f7fc495ccb99978fbdbf8968d7f SHA512 d6ed394de71db1b98d22f47e105b698c798d84887161977d264f1629e8d5e917a0f24fd633378c855243609d9b318d81a81dc4d703198f043a24f01fcbdd6024 WHIRLPOOL fcd3c79dfab006f2eade4d9ae3d6d987731a7e21a7c51727fb184291e98364f6be7b96452ebd33419565069a2cc757d5f2b606ba8c2dcca3d4b685067b333f1b
+EBUILD redmine-1.4.7.ebuild 5951 SHA256 45864ba25ab7ae5914750d4f4266263eb50b5b16b00a982d8766366a76e4c535 SHA512 694d7aebd46bc5c7d23916275de8a5a7b60858245446b50796a9da486875acc556eb8c8cbdd7d995bec425d7bb8a792c162be0252825a22d8683a745b2a2611c WHIRLPOOL 9d31d1dff4c6a0871072b9fc729ed4b5b21aac5caefcf4b634b239ee592f228f8f87b21151b061a9f63d67220eb5d66e2a813d0dfe12687b8311c573e00ce94b
+EBUILD redmine-2.2.0.ebuild 6621 SHA256 7949064867bc8042c33c45ff5a4b36716c4bd3f0bda516f3c7efb211337e1796 SHA512 c330407c615b52da481aacbb9036bfc428df9e424a8768cd87a708ecd994060d55691c50fa31a7b549b2a218e00d2b57cb07f794451cd1ce389caa3bfb59394a WHIRLPOOL 7685418a3906d0188c3b4112d7452601e458e5a24cc6bc5fc1ab8f2cc09992e6acd5fb2729561a63612927670a4c7468b63161b5b961bbf36c92298ef80b767c
+EBUILD redmine-2.2.4.ebuild 6513 SHA256 389da118b2a7714356e84ca4bf3ec027581bf0d75bde30684b4e55741b07f772 SHA512 3d1083af4356ae17fa81bc1303aae272435aa7b28ec94de58932541af8839df9a6766959896c6a2f2240658d44654b376a8ffa432674cdbcf23c3d29fc824915 WHIRLPOOL 97baf07588ba55aeba7aa4f85a3f21867abba1fe29960b6dbe1276229456582fa468b3a6c5658a683843846f32c8503cf2bfc4448429ae23ae6c8e00c5248c73
+MISC ChangeLog 6398 SHA256 8c78cc4aa5411c1637fd89e48c538c8db3a17154ba8dc1510328de9afdc8c410 SHA512 88e7ae96db0c825223b37d4f24a852525457fdc8a6cbac287868e2c44ed5e3795d0aeb13418aece3b150b5a8ca16a221041ed75fe38c60619746390e6900b07d WHIRLPOOL eab33f5274595087ad3b46bd7cbde395493365f67823904e722fc5ef4ae683d5bfd465cb32399b2ec333af6bbb15703c2c8fd0bd3ab933e11c4339ec79a3a30c
+MISC metadata.xml 398 SHA256 492fedc9e0ee6f7d2aad26b056be8d4f726159417554a5132c5bc3b91ddb68f0 SHA512 49ede1d2d955e02335fb95ef81de1aad003aee360bba1bfc1873e5b1eb7f55d8bee2adbf04bfd1a7d97b1140a3973dcec30e4157ab99c8d1a6394f3f1306af38 WHIRLPOOL 4895566791b46506ed7c9aeea7cba7589ef245c39bbe277542ac79e5abc31950edeb81112b3bc96d3192802848db72e5f6968c02e873ffa7403b96ada3c7fc9f
diff --git a/www-apps/redmine/files/10_redmine_vhost.conf b/www-apps/redmine/files/10_redmine_vhost.conf
new file mode 100644
index 0000000..33a117a
--- /dev/null
+++ b/www-apps/redmine/files/10_redmine_vhost.conf
@@ -0,0 +1,12 @@
+<IfModule passenger_module>
+Listen 3000
+<VirtualHost *:3000>
+ DocumentRoot /var/lib/redmine/public
+# RailsEnv production
+ <Directory "/var/lib/redmine/public">
+ Options FollowSymLinks
+ Order allow,deny
+ Allow from all
+ </Directory>
+</VirtualHost>
+</IfModule>
diff --git a/www-apps/redmine/files/redmine-1.4.1-bundler.patch b/www-apps/redmine/files/redmine-1.4.1-bundler.patch
new file mode 100644
index 0000000..adef29a
--- /dev/null
+++ b/www-apps/redmine/files/redmine-1.4.1-bundler.patch
@@ -0,0 +1,15 @@
+diff -Naurb redmine-1.4.1.orig/config/boot.rb redmine-1.4.1/config/boot.rb
+--- redmine-1.4.1.orig/config/boot.rb 2012-04-20 19:01:56.000000000 +0900
++++ redmine-1.4.1/config/boot.rb 2012-04-25 13:00:01.702911764 +0900
+@@ -41,11 +41,6 @@
+ class Boot
+ def run
+ load_initializer
+- Rails::Initializer.class_eval do
+- def load_gems
+- @bundler_loaded ||= Bundler.require :default, Rails.env
+- end
+- end
+ Rails::Initializer.run(:set_load_path)
+ end
+ end
diff --git a/www-apps/redmine/files/redmine-2.initd b/www-apps/redmine/files/redmine-2.initd
new file mode 100644
index 0000000..55fd8d3
--- /dev/null
+++ b/www-apps/redmine/files/redmine-2.initd
@@ -0,0 +1,49 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-apps/redmine/files/redmine-2.initd,v 1.1 2013/01/07 13:39:26 matsuu Exp $
+
+RAILS_ENV=${RAILS_ENV:-production}
+REDMINE_DIR=${REDMINE_DIR:-/var/lib/redmine}
+REDMINE_ADDRESS=${REDMINE_ADDRESS:-localhost}
+REDMINE_PORT=${REDMINE_PORT:-3000}
+REDMINE_USER=${REDMINE_USER:-redmine}
+REDMINE_GROUP=${REDMINE_GROUP:-redmine}
+REDMINE_PIDFILE="/var/run/redmine/server.pid"
+
+depend() {
+ use apache2 git-daemon mysql net postgresql svnserve
+}
+
+start_pre() {
+ if [ ! -e "${REDMINE_DIR}/config/initializers/secret_token.rb" ] ; then
+ eerror "Execute the following command to initlize environment:"
+ eerror
+ eerror "# emerge --config www-apps/redmine"
+ eerror
+ return 1
+ fi
+ if [ ! -d /var/run/redmine ]; then
+ checkpath -q -d -m 0755 -o redmine:redmine /var/run/redmine
+ fi
+}
+
+start() {
+ ebegin "Starting redmine"
+ cd "${REDMINE_DIR}"
+ start-stop-daemon --start --quiet --user ${REDMINE_USER}:${REDMINE_GROUP} \
+ --pidfile "${REDMINE_PIDFILE}" \
+ --exec /usr/bin/ruby "${REDMINE_DIR}"/script/rails server -- \
+ --daemon --environment=${RAILS_ENV} \
+ --binding=${REDMINE_ADDRESS} --port=${REDMINE_PORT} \
+ --pid /var/run/redmine/server.pid \
+ ${REDMINE_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping redmine"
+ cd "${REDMINE_DIR}"
+ start-stop-daemon --signal INT --quiet --pidfile "${REDMINE_PIDFILE}"
+ eend $?
+}
diff --git a/www-apps/redmine/files/redmine-rubytree-r8214.patch b/www-apps/redmine/files/redmine-rubytree-r8214.patch
new file mode 100644
index 0000000..af325ec
--- /dev/null
+++ b/www-apps/redmine/files/redmine-rubytree-r8214.patch
@@ -0,0 +1,261 @@
+Index: test/unit/lib/redmine/menu_manager/menu_item_test.rb
+===================================================================
+--- test/unit/lib/redmine/menu_manager/menu_item_test.rb (リビジョン 8213)
++++ test/unit/lib/redmine/menu_manager/menu_item_test.rb (リビジョン 8214)
+@@ -114,7 +114,7 @@
+
+ def test_has_children
+ parent_item = get_menu_item(:test_menu, :parent)
+- assert parent_item.hasChildren?
++ assert parent_item.children.present?
+ assert_equal 2, parent_item.children.size
+ assert_equal get_menu_item(:test_menu, :child_menu), parent_item.children[0]
+ assert_equal get_menu_item(:test_menu, :child2_menu), parent_item.children[1]
+Index: config/environment.rb
+===================================================================
+--- config/environment.rb (リビジョン 8213)
++++ config/environment.rb (リビジョン 8214)
+@@ -54,7 +54,6 @@
+ # It will automatically turn deliveries on
+ config.action_mailer.perform_deliveries = false
+
+- config.gem 'rubytree', :lib => 'tree'
+ config.gem 'coderay', :version => '~>1.0.0'
+
+ # Load any local configuration that is kept out of source control
+Index: lib/redmine/menu_manager.rb
+===================================================================
+--- lib/redmine/menu_manager.rb (リビジョン 8213)
++++ lib/redmine/menu_manager.rb (リビジョン 8214)
+@@ -15,93 +15,6 @@
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+-require 'tree' # gem install rubytree
+-
+-# Monkey patch the TreeNode to add on a few more methods :nodoc:
+-module TreeNodePatch
+- def self.included(base)
+- base.class_eval do
+- attr_reader :last_items_count
+-
+- alias :old_initilize :initialize
+- def initialize(name, content = nil)
+- old_initilize(name, content)
+- @childrenHash ||= {}
+- @last_items_count = 0
+- extend(InstanceMethods)
+- end
+- end
+- end
+-
+- module InstanceMethods
+- # Adds the specified child node to the receiver node. The child node's
+- # parent is set to be the receiver. The child is added as the first child in
+- # the current list of children for the receiver node.
+- def prepend(child)
+- raise "Child already added" if @childrenHash.has_key?(child.name)
+-
+- @childrenHash[child.name] = child
+- @children = [child] + @children
+- child.parent = self
+- return child
+-
+- end
+-
+- # Adds the specified child node to the receiver node. The child node's
+- # parent is set to be the receiver. The child is added at the position
+- # into the current list of children for the receiver node.
+- def add_at(child, position)
+- raise "Child already added" if @childrenHash.has_key?(child.name)
+-
+- @childrenHash[child.name] = child
+- @children = @children.insert(position, child)
+- child.parent = self
+- return child
+-
+- end
+-
+- def add_last(child)
+- raise "Child already added" if @childrenHash.has_key?(child.name)
+-
+- @childrenHash[child.name] = child
+- @children << child
+- @last_items_count += 1
+- child.parent = self
+- return child
+-
+- end
+-
+- # Adds the specified child node to the receiver node. The child node's
+- # parent is set to be the receiver. The child is added as the last child in
+- # the current list of children for the receiver node.
+- def add(child)
+- raise "Child already added" if @childrenHash.has_key?(child.name)
+-
+- @childrenHash[child.name] = child
+- position = @children.size - @last_items_count
+- @children.insert(position, child)
+- child.parent = self
+- return child
+-
+- end
+-
+- # Wrapp remove! making sure to decrement the last_items counter if
+- # the removed child was a last item
+- def remove!(child)
+- @last_items_count -= +1 if child && child.last
+- super
+- end
+-
+-
+- # Will return the position (zero-based) of the current child in
+- # it's parent
+- def position
+- self.parent.children.index(self)
+- end
+- end
+-end
+-Tree::TreeNode.send(:include, TreeNodePatch)
+-
+ module Redmine
+ module MenuManager
+ class MenuError < StandardError #:nodoc:
+@@ -169,7 +82,7 @@
+
+ def display_main_menu?(project)
+ menu_name = project && !project.new_record? ? :project_menu : :application_menu
+- Redmine::MenuManager.items(menu_name).size > 1 # 1 element is the root
++ Redmine::MenuManager.items(menu_name).children.present?
+ end
+
+ def render_menu(menu, project=nil)
+@@ -181,7 +94,7 @@
+ end
+
+ def render_menu_node(node, project=nil)
+- if node.hasChildren? || !node.child_menus.nil?
++ if node.children.present? || !node.child_menus.nil?
+ return render_menu_node_with_children(node, project)
+ else
+ caption, url, selected = extract_node_details(node, project)
+@@ -306,13 +219,13 @@
+ end
+
+ def items(menu_name)
+- @items[menu_name.to_sym] || Tree::TreeNode.new(:root, {})
++ @items[menu_name.to_sym] || MenuNode.new(:root, {})
+ end
+ end
+
+ class Mapper
+ def initialize(menu, items)
+- items[menu] ||= Tree::TreeNode.new(:root, {})
++ items[menu] ||= MenuNode.new(:root, {})
+ @menu = menu
+ @menu_items = items[menu]
+ end
+@@ -398,7 +311,102 @@
+ end
+ end
+
+- class MenuItem < Tree::TreeNode
++ class MenuNode
++ include Enumerable
++ attr_accessor :parent
++ attr_reader :last_items_count, :name
++
++ def initialize(name, content = nil)
++ @name = name
++ @childrenHash ||= {}
++ @children = []
++ @last_items_count = 0
++ end
++
++ def children
++ if block_given?
++ @children.each {|child| yield child}
++ else
++ @children
++ end
++ end
++
++ # Returns the number of descendants + 1
++ def size
++ @children.inject(1) {|sum, node| sum + node.size}
++ end
++
++ def each &block
++ yield self
++ children { |child| child.each(&block) }
++ end
++
++ # Adds a child at first position
++ def prepend(child)
++ raise "Child already added" if @childrenHash.has_key?(child.name)
++
++ @childrenHash[child.name] = child
++ @children = [child] + @children
++ child.parent = self
++ return child
++ end
++
++ # Adds a child at given position
++ def add_at(child, position)
++ raise "Child already added" if @childrenHash.has_key?(child.name)
++
++ @childrenHash[child.name] = child
++ @children = @children.insert(position, child)
++ child.parent = self
++ return child
++ end
++
++ # Adds a child as last child
++ def add_last(child)
++ raise "Child already added" if @childrenHash.has_key?(child.name)
++
++ @childrenHash[child.name] = child
++ @children << child
++ @last_items_count += 1
++ child.parent = self
++ return child
++ end
++
++ # Adds a child
++ def add(child)
++ raise "Child already added" if @childrenHash.has_key?(child.name)
++
++ @childrenHash[child.name] = child
++ position = @children.size - @last_items_count
++ @children.insert(position, child)
++ child.parent = self
++ return child
++ end
++ alias :<< :add
++
++ # Removes a child
++ def remove!(child)
++ @childrenHash.delete(child.name)
++ @children.delete(child)
++ @last_items_count -= +1 if child && child.last
++ child.parent = nil
++ child
++ end
++
++ # Returns the position for this node in it's parent
++ def position
++ self.parent.children.index(self)
++ end
++
++ # Returns the root for this node
++ def root
++ root = self
++ root = root.parent while root.parent
++ root
++ end
++ end
++
++ class MenuItem < MenuNode
+ include Redmine::I18n
+ attr_reader :name, :url, :param, :condition, :parent, :child_menus, :last
+
diff --git a/www-apps/redmine/files/redmine.confd b/www-apps/redmine/files/redmine.confd
new file mode 100644
index 0000000..1c3830a
--- /dev/null
+++ b/www-apps/redmine/files/redmine.confd
@@ -0,0 +1,13 @@
+# /etc/conf.d/redmine: config file for /etc/init.d/redmine
+# Bind to specified address
+# You can set to 0.0.0.0 to accept requests anywhere
+#REDMINE_ADDRESS="localhost"
+
+# Port
+#REDMINE_PORT=3000
+
+# RAILS_ENV
+#RAILS_ENV=production
+
+# additional opts
+#REDMINE_OPTS=""
diff --git a/www-apps/redmine/files/redmine.initd b/www-apps/redmine/files/redmine.initd
new file mode 100644
index 0000000..1368da6
--- /dev/null
+++ b/www-apps/redmine/files/redmine.initd
@@ -0,0 +1,45 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-apps/redmine/files/redmine.initd,v 1.4 2012/03/12 16:41:05 matsuu Exp $
+
+RAILS_ENV=${RAILS_ENV:-production}
+REDMINE_DIR=${REDMINE_DIR:-/var/lib/redmine}
+REDMINE_ADDRESS=${REDMINE_ADDRESS:-localhost}
+REDMINE_PORT=${REDMINE_PORT:-3000}
+REDMINE_USER=${REDMINE_USER:-redmine}
+REDMINE_GROUP=${REDMINE_GROUP:-redmine}
+REDMINE_PIDFILE="${REDMINE_DIR}/tmp/pids/server.pid"
+
+depend() {
+ use apache2 git-daemon mysql net postgresql svnserve
+}
+
+start_pre() {
+ if [ ! -e "${REDMINE_DIR}/config/initializers/session_store.rb" ] ; then
+ eerror "Execute the following command to initlize environment:"
+ eerror
+ eerror "# emerge --config www-apps/redmine"
+ eerror
+ return 1
+ fi
+}
+
+start() {
+ ebegin "Starting redmine"
+ cd "${REDMINE_DIR}"
+ start-stop-daemon --start --quiet --user ${REDMINE_USER}:${REDMINE_GROUP} \
+ --pidfile "${REDMINE_PIDFILE}" \
+ --exec /usr/bin/ruby "${REDMINE_DIR}"/script/server -- \
+ --daemon --environment=${RAILS_ENV} \
+ --binding=${REDMINE_ADDRESS} --port=${REDMINE_PORT} \
+ ${REDMINE_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping redmine"
+ cd "${REDMINE_DIR}"
+ start-stop-daemon --signal INT --quiet --pidfile "${REDMINE_PIDFILE}"
+ eend $?
+}
diff --git a/www-apps/redmine/metadata.xml b/www-apps/redmine/metadata.xml
new file mode 100644
index 0000000..7dbf569
--- /dev/null
+++ b/www-apps/redmine/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>matsuu@gentoo.org</email>
+</maintainer>
+<longdescription lang="en">
+</longdescription>
+<use>
+ <flag name='openid'>Enable support for OpenID</flag>
+ <flag name='passenger'>Enable support for <pkg>www-apache/passenger</pkg></flag>
+</use>
+</pkgmetadata>
+
diff --git a/www-apps/redmine/redmine-1.4.7.ebuild b/www-apps/redmine/redmine-1.4.7.ebuild
new file mode 100644
index 0000000..8486964
--- /dev/null
+++ b/www-apps/redmine/redmine-1.4.7.ebuild
@@ -0,0 +1,201 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="4"
+# rails:2.3 isn't available for ruby19 on Gentoo
+#USE_RUBY="ruby18 ruby19"
+USE_RUBY="ruby18"
+inherit eutils depend.apache ruby-ng
+
+DESCRIPTION="Redmine is a flexible project management web application written using Ruby on Rails framework"
+HOMEPAGE="http://www.redmine.org/"
+SRC_URI="mirror://rubyforge/${PN}/${P}.tar.gz"
+
+KEYWORDS="~amd64 ~x86"
+LICENSE="GPL-2"
+SLOT="0"
+# All db-related USEs are ineffective since we depend on rails
+# which depends on activerecord which depends on all ruby's db bindings
+#IUSE="ldap openid imagemagick postgres sqlite mysql fastcgi passenger"
+IUSE="ldap openid imagemagick fastcgi passenger"
+
+#RDEPEND="$(ruby_implementation_depend jruby '>=' -1.6.7)[ssl]"
+
+ruby_add_rdepend "virtual/ruby-ssl
+ virtual/rubygems
+ >=dev-ruby/rails-2.3.15:2.3
+ dev-ruby/i18n:0.4
+ >=dev-ruby/coderay-1.0.6
+ >=dev-ruby/tzinfo-0.3.31
+ dev-ruby/rake
+ ldap? ( >=dev-ruby/ruby-net-ldap-0.3.1 )
+ openid? ( >=dev-ruby/ruby-openid-2.1.4 )
+ imagemagick? ( >=dev-ruby/rmagick-2 )
+ fastcgi? ( dev-ruby/fcgi )
+ passenger? ( www-apache/passenger )
+ ruby_targets_ruby18? (
+ >=dev-ruby/fastercsv-1.5
+ )"
+# ruby_targets_ruby18? (
+# >=dev-ruby/fastercsv-1.5
+# postgres? ( >=dev-ruby/pg-0.11 )
+# sqlite3? ( dev-ruby/sqlite3 )
+# mysql? ( >=dev-ruby/mysql-ruby-2.8.1 )
+# )
+# ruby_targets_ruby19? (
+# postgres? ( >=dev-ruby/pg-0.11 )
+# sqlite3? ( dev-ruby/sqlite3 )
+# mysql? ( dev-ruby/mysql2:0.2 )
+# )
+# ruby_targets_jruby? (
+# dev-ruby/jruby-openssl
+# >=dev-ruby/fastercsv-1.5
+# mysql? ( dev-ruby/activerecord-jdbcmysql-adapter )
+# postgres? ( dev-ruby/activerecord-jdbcpostgresql-adapter )
+# sqlite3? ( dev-ruby/activerecord-jdbcsqlite3-adapter )
+# )
+
+#ruby_add_bdepend ">=dev-ruby/rdoc-2.4.2
+# test? (
+# !ruby_targets_ruby19? (
+# >=dev-ruby/shoulda-2.11
+# )
+# ruby_targets_ruby19? (
+# dev-ruby/test-unit
+# )
+# ruby_targets_jruby? (
+# dev-ruby/test-unit
+# )
+# >=dev-ruby/edavis10-object_daddy
+# =dev-ruby/mocha-0.12*
+# )"
+
+REDMINE_DIR="/var/lib/${PN}"
+
+pkg_setup() {
+ enewgroup redmine
+ enewuser redmine -1 -1 "${REDMINE_DIR}" redmine
+}
+
+all_ruby_prepare() {
+ rm -r log files/delete.me || die
+
+ # bug #406605
+ rm .gitignore .hgignore || die
+
+ rm Gemfile config/preinitializer.rb || die
+ epatch "${FILESDIR}/${PN}-1.4.1-bundler.patch"
+
+ echo "CONFIG_PROTECT=\"${EPREFIX}${REDMINE_DIR}/config\"" > "${T}/50${PN}"
+ echo "CONFIG_PROTECT_MASK=\"${EPREFIX}${REDMINE_DIR}/config/locales ${EPREFIX}${REDMINE_DIR}/config/settings.yml\"" >> "${T}/50${PN}"
+}
+
+all_ruby_install() {
+ dodoc doc/{CHANGELOG,INSTALL,README_FOR_APP,RUNNING_TESTS,UPGRADING}
+ rm -fr doc || die
+ dodoc README.rdoc
+ rm README.rdoc || die
+
+ keepdir /var/log/${PN}
+ dosym /var/log/${PN}/ "${REDMINE_DIR}/log"
+
+ insinto "${REDMINE_DIR}"
+ doins -r .
+ keepdir "${REDMINE_DIR}/files"
+ keepdir "${REDMINE_DIR}/public/plugin_assets"
+
+ fowners -R redmine:redmine \
+ "${REDMINE_DIR}/config" \
+ "${REDMINE_DIR}/files" \
+ "${REDMINE_DIR}/public/plugin_assets" \
+ "${REDMINE_DIR}/tmp" \
+ /var/log/${PN}
+
+ fowners redmine:redmine "${REDMINE_DIR}"
+
+ # protect sensitive data, see bug #406605
+ fperms -R go-rwx \
+ "${REDMINE_DIR}/config" \
+ "${REDMINE_DIR}/files" \
+ "${REDMINE_DIR}/tmp" \
+ /var/log/${PN}
+
+ if use passenger ; then
+ has_apache
+ insinto "${APACHE_VHOSTS_CONFDIR}"
+ doins "${FILESDIR}/10_redmine_vhost.conf"
+ else
+ newconfd "${FILESDIR}/${PN}.confd" ${PN}
+ newinitd "${FILESDIR}/${PN}.initd" ${PN}
+ fi
+ doenvd "${T}/50${PN}"
+}
+
+pkg_postinst() {
+ einfo
+ if [ -e "${EPREFIX}${REDMINE_DIR}/config/initializers/session_store.rb" ] ; then
+ elog "Execute the following command to upgrade environment:"
+ elog
+ elog "# emerge --config \"=${CATEGORY}/${PF}\""
+ elog
+ elog "For upgrade instructions take a look at:"
+ elog "http://www.redmine.org/wiki/redmine/RedmineUpgrade"
+ else
+ elog "Execute the following command to initlize environment:"
+ elog
+ elog "# cd ${EPREFIX}${REDMINE_DIR}"
+ elog "# cp config/database.yml.example config/database.yml"
+ elog "# \${EDITOR} config/database.yml"
+ elog "# chown redmine:redmine config/database.yml"
+ elog "# emerge --config \"=${CATEGORY}/${PF}\""
+ elog
+ elog "Installation notes are at official site"
+ elog "http://www.redmine.org/wiki/redmine/RedmineInstall"
+ fi
+ einfo
+}
+
+pkg_config() {
+ if [ ! -e "${EPREFIX}${REDMINE_DIR}/config/database.yml" ] ; then
+ eerror "Copy ${EPREFIX}${REDMINE_DIR}/config/database.yml.example to ${EPREFIX}${REDMINE_DIR}/config/database.yml"
+ eerror "then edit this file in order to configure your database settings for \"production\" environment."
+ die
+ fi
+
+ local RAILS_ENV=${RAILS_ENV:-production}
+ local RUBY=${RUBY:-ruby18}
+
+ cd "${EPREFIX}${REDMINE_DIR}" || die
+ if [ -e "${EPREFIX}${REDMINE_DIR}/config/initializers/session_store.rb" ] ; then
+ einfo
+ einfo "Upgrading database."
+ einfo
+
+ einfo "Migrating database."
+ RAILS_ENV="${RAILS_ENV}" ${RUBY} -S rake db:migrate || die
+ einfo "Upgrading the plugin migrations."
+ RAILS_ENV="${RAILS_ENV}" ${RUBY} -S rake db:migrate:upgrade_plugin_migrations # || die
+ RAILS_ENV="${RAILS_ENV}" ${RUBY} -S rake db:migrate_plugins || die
+ einfo "Clear the cache and the existing sessions."
+ ${RUBY} -S rake tmp:cache:clear || die
+ ${RUBY} -S rake tmp:sessions:clear || die
+ else
+ einfo
+ einfo "Initializing database."
+ einfo
+
+ einfo "Generating a session store secret."
+ ${RUBY} -S rake generate_session_store || die
+ einfo "Creating the database structure."
+ RAILS_ENV="${RAILS_ENV}" ${RUBY} -S rake db:migrate || die
+ einfo "Populating database with default configuration dat."
+ RAILS_ENV="${RAILS_ENV}" ${RUBY} -S rake redmine:load_default_data || die
+ einfo
+ einfo "If you use sqlite3, please do not forget to change the ownership of the sqlite files."
+ einfo
+ einfo "# cd \"${EPREFIX}${REDMINE_DIR}\""
+ einfo "# chown redmine:redmine db/ db/*.sqlite3"
+ einfo
+ fi
+}
diff --git a/www-apps/redmine/redmine-2.2.0.ebuild b/www-apps/redmine/redmine-2.2.0.ebuild
new file mode 100644
index 0000000..7612b6e
--- /dev/null
+++ b/www-apps/redmine/redmine-2.2.0.ebuild
@@ -0,0 +1,218 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-apps/redmine/redmine-2.2.0.ebuild,v 1.1 2013/01/07 13:39:26 matsuu Exp $
+
+EAPI="3"
+# ruby19: dev-ruby/rack has no ruby19
+# jruby: dev-ruby/rails has no jruby
+# rbx: dev-ruby/rails has no rbx
+#USE_RUBY="ruby18 ree18"
+USE_RUBY="ruby18 ruby19"
+inherit eutils depend.apache ruby-ng
+
+DESCRIPTION="Redmine is a flexible project management web application written using Ruby on Rails framework"
+HOMEPAGE="http://www.redmine.org/"
+SRC_URI="mirror://rubyforge/${PN}/${P}.tar.gz"
+
+KEYWORDS="~amd64 ~x86"
+LICENSE="GPL-2"
+SLOT="0"
+#IUSE="bazaar cvs darcs fastcgi git imagemagick mercurial mysql openid passenger postgres sqlite3 subversion"
+IUSE="fastcgi imagemagick ldap openid passenger"
+
+#RDEPEND="$(ruby_implementation_depend ruby18 '>=' -1.8.6)[ssl]"
+
+ruby_add_rdepend "virtual/ruby-ssl
+ virtual/rubygems
+ >=dev-ruby/coderay-1.0.6
+ dev-ruby/i18n:0.6
+ dev-ruby/rake
+ ~dev-ruby/rails-3.2.9:3.2
+ >=dev-ruby/jquery-rails-2.0.2
+ dev-ruby/builder:3
+ fastcgi? ( dev-ruby/fcgi )
+ imagemagick? ( >=dev-ruby/rmagick-2 )
+ ldap? ( >=dev-ruby/ruby-net-ldap-0.3.1 )
+ openid? (
+ >=dev-ruby/ruby-openid-2.1.4
+ >=dev-ruby/rack-openid-0.2.1
+ )
+ passenger? ( www-apache/passenger )
+ "
+# ruby_targets_ruby18? (
+# >=dev-ruby/fastercsv-1.5
+# postgres? ( >=dev-ruby/pg-0.11 )
+# sqlite3? ( dev-ruby/sqlite3 )
+# mysql? ( >=dev-ruby/mysql-ruby-2.8.1 )
+# )
+# ruby_targets_ruby19? (
+# postgres? ( >=dev-ruby/pg-0.11 )
+# sqlite3? ( dev-ruby/sqlite3 )
+# mysql? ( dev-ruby/mysql2:0.3 )
+# )
+# ruby_targets_jruby? (
+# dev-ruby/jruby-openssl
+# >=dev-ruby/fastercsv-1.5
+# mysql? ( dev-ruby/activerecord-jdbcmysql-adapter )
+# postgres? ( dev-ruby/activerecord-jdbcpostgresql-adapter )
+# sqlite3? ( dev-ruby/activerecord-jdbcsqlite3-adapter )
+# )
+
+#ruby_add_bdepend ">=dev-ruby/rdoc-2.4.2
+# yard
+# test? (
+# !ruby_targets_ruby19? (
+# >=dev-ruby/shoulda-2.11
+# )
+# ruby_targets_ruby19? (
+# dev-ruby/test-unit
+# )
+# ruby_targets_jruby? (
+# dev-ruby/test-unit
+# )
+# >=dev-ruby/mocha-0.12.3
+# )"
+
+#RDEPEND="${RDEPEND}
+# bazaar ( dev-vcs/bazaar )
+# cvs? ( >=dev-vcs/cvs-1.12 )
+# darcs? ( dev-vcs/darcs )
+# git? ( dev-vcs/git )
+# mercurial? ( dev-vcs/mercurial )
+# subversion? ( >=dev-vcs/subversion-1.3 )"
+
+REDMINE_DIR="/var/lib/${PN}"
+
+pkg_setup() {
+ enewgroup redmine
+ # home directory is required for SCM.
+ enewuser redmine -1 -1 "${REDMINE_DIR}" redmine
+}
+
+all_ruby_prepare() {
+ rm -r log files/delete.me || die
+
+ # bug #406605
+ rm .gitignore .hgignore || die
+
+ rm Gemfile config/preinitializer.rb || die
+
+ echo "CONFIG_PROTECT=\"${EPREFIX}${REDMINE_DIR}/config\"" > "${T}/50${PN}"
+ echo "CONFIG_PROTECT_MASK=\"${EPREFIX}${REDMINE_DIR}/config/locales ${EPREFIX}${REDMINE_DIR}/config/settings.yml\"" >> "${T}/50${PN}"
+}
+
+all_ruby_install() {
+ dodoc doc/{CHANGELOG,INSTALL,README_FOR_APP,RUNNING_TESTS,UPGRADING} || die
+ rm -fr doc || die
+ dodoc README.rdoc || die
+ rm README.rdoc || die
+
+ keepdir /var/log/${PN} || die
+ dosym /var/log/${PN}/ "${REDMINE_DIR}/log" || die
+
+ insinto "${REDMINE_DIR}"
+ doins -r . || die
+ keepdir "${REDMINE_DIR}/files" || die
+ keepdir "${REDMINE_DIR}/public/plugin_assets" || die
+
+ fowners -R redmine:redmine \
+ "${REDMINE_DIR}/config" \
+ "${REDMINE_DIR}/files" \
+ "${REDMINE_DIR}/public/plugin_assets" \
+ "${REDMINE_DIR}/tmp" \
+ /var/log/${PN} || die
+ # for SCM
+ fowners redmine:redmine "${REDMINE_DIR}" || die
+ # bug #406605
+ fperms -R go-rwx \
+ "${REDMINE_DIR}/config" \
+ "${REDMINE_DIR}/files" \
+ "${REDMINE_DIR}/tmp" \
+ /var/log/${PN} || die
+
+ if use passenger ; then
+ has_apache
+ insinto "${APACHE_VHOSTS_CONFDIR}"
+ doins "${FILESDIR}/10_redmine_vhost.conf" || die
+ else
+ newconfd "${FILESDIR}/${PN}.confd" ${PN} || die
+ newinitd "${FILESDIR}/${PN}-2.initd" ${PN} || die
+ keepdir /var/run/${PN} || die
+ fowners -R redmine:redmine /var/run/${PN} || die
+ dosym /var/run/${PN}/ "${REDMINE_DIR}/tmp/pids" || die
+ fi
+ doenvd "${T}/50${PN}" || die
+}
+
+pkg_postinst() {
+ einfo
+ if [ -e "${EPREFIX}${REDMINE_DIR}/config/initializers/session_store.rb" -o -e "${EPREFIX}${REDMINE_DIR}/config/initializers/secret_token.rb" ] ; then
+ elog "Execute the following command to upgrade environment:"
+ elog
+ elog "# emerge --config \"=${CATEGORY}/${PF}\""
+ elog
+ elog "For upgrade instructions take a look at:"
+ elog "http://www.redmine.org/wiki/redmine/RedmineUpgrade"
+ else
+ elog "Execute the following command to initlize environment:"
+ elog
+ elog "# cd ${EPREFIX}${REDMINE_DIR}"
+ elog "# cp config/database.yml.example config/database.yml"
+ elog "# \${EDITOR} config/database.yml"
+ elog "# chown redmine:redmine config/database.yml"
+ elog "# emerge --config \"=${CATEGORY}/${PF}\""
+ elog
+ elog "Installation notes are at official site"
+ elog "http://www.redmine.org/wiki/redmine/RedmineInstall"
+ fi
+ einfo
+}
+
+pkg_config() {
+ if [ ! -e "${EPREFIX}${REDMINE_DIR}/config/database.yml" ] ; then
+ eerror "Copy ${EPREFIX}${REDMINE_DIR}/config/database.yml.example to ${EPREFIX}${REDMINE_DIR}/config/database.yml and edit this file in order to configure your database settings for \"production\" environment."
+ die
+ fi
+
+ local RAILS_ENV=${RAILS_ENV:-production}
+ local RUBY=${RUBY:-ruby18}
+
+ cd "${EPREFIX}${REDMINE_DIR}"
+ if [ -e "${EPREFIX}${REDMINE_DIR}/config/initializers/session_store.rb" ] ; then
+ einfo
+ einfo "Generate secret token."
+ einfo
+ rm config/initializers/session_store.rb || die
+ RAILS_ENV="${RAILS_ENV}" ${RUBY} -S rake generate_secret_token || die
+ fi
+ if [ -e "${EPREFIX}${REDMINE_DIR}/config/initializers/secret_token.rb" ] ; then
+ einfo
+ einfo "Upgrade database."
+ einfo
+
+ einfo "Migrate database."
+ RAILS_ENV="${RAILS_ENV}" ${RUBY} -S rake db:migrate || die
+ einfo "Upgrade the plugin migrations."
+ RAILS_ENV="${RAILS_ENV}" ${RUBY} -S rake redmine:plugins:migrate || die
+ einfo "Clear the cache and the existing sessions."
+ ${RUBY} -S rake tmp:cache:clear || die
+ ${RUBY} -S rake tmp:sessions:clear || die
+ else
+ einfo
+ einfo "Initialize database."
+ einfo
+
+ einfo "Generate a session store secret."
+ ${RUBY} -S rake generate_secret_token || die
+ einfo "Create the database structure."
+ RAILS_ENV="${RAILS_ENV}" ${RUBY} -S rake db:migrate || die
+ einfo "Insert default configuration data in database."
+ RAILS_ENV="${RAILS_ENV}" ${RUBY} -S rake redmine:load_default_data || die
+ einfo
+ einfo "If you use sqlite3. please do not forget to change the ownership of the sqlite files."
+ einfo
+ einfo "# cd \"${EPREFIX}${REDMINE_DIR}\""
+ einfo "# chown redmine:redmine db/ db/*.sqlite3"
+ einfo
+ fi
+}
diff --git a/www-apps/redmine/redmine-2.2.4.ebuild b/www-apps/redmine/redmine-2.2.4.ebuild
new file mode 100644
index 0000000..96ff1da
--- /dev/null
+++ b/www-apps/redmine/redmine-2.2.4.ebuild
@@ -0,0 +1,219 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="4"
+USE_RUBY="ruby18 ruby19"
+inherit eutils depend.apache ruby-ng
+
+DESCRIPTION="Redmine is a flexible project management web application written using Ruby on Rails framework"
+HOMEPAGE="http://www.redmine.org/"
+SRC_URI="mirror://rubyforge/${PN}/${P}.tar.gz"
+
+KEYWORDS="~amd64 ~x86"
+LICENSE="GPL-2"
+SLOT="0"
+# All db-related USEs are ineffective since we depend on rails
+# which depends on activerecord which depends on all ruby's db bindings
+#IUSE="ldap openid imagemagick postgres sqlite mysql fastcgi passenger"
+IUSE="ldap openid imagemagick fastcgi passenger"
+
+#RDEPEND="$(ruby_implementation_depend jruby '>=' -1.6.7)[ssl]"
+RDEPEND="
+ ruby_targets_ruby18? (
+ >=dev-ruby/fastercsv-1.5[ruby_targets_ruby18]
+ )"
+
+ruby_add_rdepend "virtual/ruby-ssl
+ virtual/rubygems
+ >=dev-ruby/rails-3.2.13:3.2
+ >=dev-ruby/jquery-rails-2.0.2
+ dev-ruby/i18n:0.6
+ >=dev-ruby/coderay-1.0.6
+ dev-ruby/builder:3
+ dev-ruby/rake
+ ldap? ( >=dev-ruby/ruby-net-ldap-0.3.1 )
+ openid? (
+ >=dev-ruby/ruby-openid-2.1.4
+ >=dev-ruby/rack-openid-0.2.1
+ )
+ imagemagick? ( >=dev-ruby/rmagick-2 )
+ fastcgi? ( dev-ruby/fcgi )
+ passenger? ( www-apache/passenger )"
+# ruby_targets_ruby18? (
+# >=dev-ruby/fastercsv-1.5
+# postgres? ( >=dev-ruby/pg-0.11 )
+# sqlite3? ( dev-ruby/sqlite3 )
+# mysql? ( >=dev-ruby/mysql-ruby-2.8.1 )
+# )
+# ruby_targets_ruby19? (
+# postgres? ( >=dev-ruby/pg-0.11 )
+# sqlite3? ( dev-ruby/sqlite3 )
+# mysql? ( dev-ruby/mysql2:0.3 )
+# )
+# ruby_targets_jruby? (
+# dev-ruby/jruby-openssl
+# >=dev-ruby/fastercsv-1.5
+# mysql? ( dev-ruby/activerecord-jdbcmysql-adapter )
+# postgres? ( dev-ruby/activerecord-jdbcpostgresql-adapter )
+# sqlite3? ( dev-ruby/activerecord-jdbcsqlite3-adapter )
+# )
+
+#ruby_add_bdepend ">=dev-ruby/rdoc-2.4.2
+# yard
+# test? (
+# !ruby_targets_ruby19? (
+# >=dev-ruby/shoulda-2.11
+# )
+# ruby_targets_ruby19? (
+# dev-ruby/test-unit
+# )
+# ruby_targets_jruby? (
+# dev-ruby/test-unit
+# )
+# =dev-ruby/mocha-0.12*
+# )"
+
+REDMINE_DIR="/var/lib/${PN}"
+
+pkg_setup() {
+ enewgroup redmine
+ enewuser redmine -1 -1 "${REDMINE_DIR}" redmine
+}
+
+all_ruby_prepare() {
+ rm -r log files/delete.me || die
+
+ # bug #406605
+ rm .gitignore .hgignore || die
+
+ rm Gemfile config/preinitializer.rb || die
+
+ echo "CONFIG_PROTECT=\"${EPREFIX}${REDMINE_DIR}/config\"" > "${T}/50${PN}"
+ echo "CONFIG_PROTECT_MASK=\"${EPREFIX}${REDMINE_DIR}/config/locales ${EPREFIX}${REDMINE_DIR}/config/settings.yml\"" >> "${T}/50${PN}"
+
+ # remove openid module in case openid is disabled
+ use openid || rm -r lib/plugins/open_id_authentication || die
+ # remove ldap staff module to avoid #413779
+ use ldap || rm app/models/auth_source_ldap.rb || die
+}
+
+all_ruby_install() {
+ dodoc doc/{CHANGELOG,INSTALL,README_FOR_APP,RUNNING_TESTS,UPGRADING}
+ rm -fr doc || die
+ dodoc README.rdoc
+ rm README.rdoc || die
+
+ keepdir /var/log/${PN}
+ dosym /var/log/${PN}/ "${REDMINE_DIR}/log"
+
+ insinto "${REDMINE_DIR}"
+ doins -r .
+ keepdir "${REDMINE_DIR}/files"
+ keepdir "${REDMINE_DIR}/public/plugin_assets"
+
+ fowners -R redmine:redmine \
+ "${REDMINE_DIR}/config" \
+ "${REDMINE_DIR}/files" \
+ "${REDMINE_DIR}/public/plugin_assets" \
+ "${REDMINE_DIR}/tmp" \
+ /var/log/${PN}
+
+ fowners redmine:redmine "${REDMINE_DIR}"
+
+ # protect sensitive data, see bug #406605
+ fperms -R go-rwx \
+ "${REDMINE_DIR}/config" \
+ "${REDMINE_DIR}/files" \
+ "${REDMINE_DIR}/tmp" \
+ /var/log/${PN}
+
+ if use passenger; then
+ has_apache
+ insinto "${APACHE_VHOSTS_CONFDIR}"
+ doins "${FILESDIR}/10_redmine_vhost.conf"
+ else
+ newconfd "${FILESDIR}/${PN}.confd" ${PN}
+ newinitd "${FILESDIR}/${PN}-2.initd" ${PN}
+ fi
+ doenvd "${T}/50${PN}"
+}
+
+pkg_postinst() {
+ einfo
+ if [ -e "${EPREFIX}${REDMINE_DIR}/config/initializers/session_store.rb" -o -e "${EPREFIX}${REDMINE_DIR}/config/initializers/secret_token.rb" ]; then
+ elog "Execute the following command to upgrade environment:"
+ elog
+ elog "# emerge --config \"=${CATEGORY}/${PF}\""
+ elog
+ elog "For upgrade instructions take a look at:"
+ elog "http://www.redmine.org/wiki/redmine/RedmineUpgrade"
+ else
+ elog "Execute the following command to initlize environment:"
+ elog
+ elog "# cd ${EPREFIX}${REDMINE_DIR}"
+ elog "# cp config/database.yml.example config/database.yml"
+ elog "# \${EDITOR} config/database.yml"
+ elog "# chown redmine:redmine config/database.yml"
+ elog "# emerge --config \"=${CATEGORY}/${PF}\""
+ elog
+ elog "Installation notes are at official site"
+ elog "http://www.redmine.org/wiki/redmine/RedmineInstall"
+ fi
+ einfo
+}
+
+pkg_config() {
+ if [ ! -e "${EPREFIX}${REDMINE_DIR}/config/database.yml" ]; then
+ eerror "Copy ${EPREFIX}${REDMINE_DIR}/config/database.yml.example to ${EPREFIX}${REDMINE_DIR}/config/database.yml"
+ eerror "then edit this file in order to configure your database settings for \"production\" environment."
+ die
+ fi
+
+ local RAILS_ENV=${RAILS_ENV:-production}
+ if [ ! -L /usr/bin/ruby ]; then
+ eerror "/usr/bin/ruby is not a valid symlink to any ruby implementation."
+ eerror "Please update it via `eselect ruby`"
+ die
+ fi
+ local RUBY=${RUBY:-ruby}
+
+ cd "${EPREFIX}${REDMINE_DIR}" || die
+ if [ -e "${EPREFIX}${REDMINE_DIR}/config/initializers/session_store.rb" ]; then
+ einfo
+ einfo "Generating secret token."
+ einfo
+ rm config/initializers/session_store.rb || die
+ RAILS_ENV="${RAILS_ENV}" ${RUBY} -S rake generate_secret_token || die
+ fi
+ if [ -e "${EPREFIX}${REDMINE_DIR}/config/initializers/secret_token.rb" ]; then
+ einfo
+ einfo "Upgrading database."
+ einfo
+
+ einfo "Migrating database."
+ RAILS_ENV="${RAILS_ENV}" ${RUBY} -S rake db:migrate || die
+ einfo "Upgrading the plugin migrations."
+ RAILS_ENV="${RAILS_ENV}" ${RUBY} -S rake redmine:plugins:migrate || die
+ einfo "Clear the cache and the existing sessions."
+ ${RUBY} -S rake tmp:cache:clear || die
+ ${RUBY} -S rake tmp:sessions:clear || die
+ else
+ einfo
+ einfo "Initializing database."
+ einfo
+
+ einfo "Generating a session store secret."
+ ${RUBY} -S rake generate_secret_token || die
+ einfo "Creating the database structure."
+ RAILS_ENV="${RAILS_ENV}" ${RUBY} -S rake db:migrate || die
+ einfo "Populating database with default configuration dat."
+ RAILS_ENV="${RAILS_ENV}" ${RUBY} -S rake redmine:load_default_data || die
+ einfo
+ einfo "If you use sqlite3, please do not forget to change the ownership of the sqlite files."
+ einfo
+ einfo "# cd \"${EPREFIX}${REDMINE_DIR}\""
+ einfo "# chown redmine:redmine db/ db/*.sqlite3"
+ einfo
+ fi
+}