blob: 0d85476d4ad5dd1559ad88e7b372ac390241bd98 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="2"
inherit eutils confutils
DESCRIPTION="Redmine is a flexible project management web application written using Ruby on Rails framework"
HOMEPAGE="http://www.redmine.org/"
if [[ ${PV} = 9999 ]]; then
inherit subversion
ESVN_REPO_URI="svn://rubyforge.org/var/svn/${PN}/trunk"
KEYWORDS=""
else
SRC_URI="mirror://rubyforge/${PN}/${P/rc/RC}.tar.gz"
KEYWORDS="" # 0.8.0rc1 is broken. USE SVN VERSION!.
S=${WORKDIR}/${P/rc/RC}
fi
LICENSE="GPL-2"
SLOT="0"
IUSE="cvs darcs git imagemagick +mysql postgres sqlite3 subversion"
# TODO:
# 1. separate plugins....
# dev-ruby/actionwebservice (rm vendor/plugins/{actionwebservice)
# dev-ruby/coderay - coderay-0.7.6.227 is bundled, it's newer then in tree
DEPEND=">=virtual/ruby-1.8.6_p200
>=dev-ruby/rails-2.1.2:2.1
mysql? ( dev-ruby/activerecord:2.1[mysql] )
postgres? ( dev-ruby/activerecord:2.1[postgres] )
sqlite3? ( dev-ruby/activerecord:2.1[sqlite3] )
www-servers/mongrel
dev-ruby/ruby-net-ldap
imagemagick? ( dev-ruby/rmagick )"
RDEPEND="${DEPEND}
cvs? ( >=dev-util/cvs-1.12 )
darcs? ( dev-util/darcs )
git? ( dev-util/git )
mercurial? ( dev-util/mercurial )
subversion? ( >=dev-util/subversion-1.3 )"
pkg_preinst() {
confutils_require_any mysql postgres sqlite3
enewgroup redmine
enewuser redmine -1 -1 -1 redmine
}
src_install() {
dodoc doc/{UPGRADING,INSTALL,CHANGELOG}
#rm -fr doc vendor/plugins/{coderay-*,ruby-net-ldap-*}
rm -fr doc vendor/plugins/ruby-net-ldap-*
mv config/database.yml{.example,}
mv config/email.yml{.example,}
insinto /etc/${PN}
doins -r config/*
rm -rf config log
dosym /etc/${PN}/ /var/lib/${PN}/config
keepdir /var/log/${PN}
dosym /var/log/${PN} /var/lib/${PN}/log
rm files/delete.me
insinto /var/lib/${PN}
doins -r .
keepdir /var/lib/${PN}/files
fowners -R redmine:redmine /var/lib/${PN}/{files,tmp,public} /var/log/${PN}
newconfd "${FILESDIR}/redmine.confd" redmine
newinitd "${FILESDIR}/redmine.initd" redmine
}
pkg_postinst() {
einfo
elog "Installation notes are at official site"
elog "http://www.redmine.org/wiki/redmine/RedmineInstall"
elog
elog "For upgrade instructions take a look at:"
elog "http://www.redmine.org/wiki/redmine/RedmineUpgrade"
einfo
}
|