Lines 1-16
Link Here
|
1 |
# Copyright 1999-2013 Gentoo Foundation |
1 |
# Copyright 1999-2013 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/www-apps/trac/trac-1.0.1.ebuild,v 1.5 2013/05/03 13:30:51 ago Exp $ |
3 |
# $Header: $ |
4 |
|
4 |
|
5 |
EAPI="4" |
5 |
EAPI=5 |
6 |
PYTHON_DEPEND="2" |
|
|
7 |
SUPPORT_PYTHON_ABIS="1" |
8 |
RESTRICT_PYTHON_ABIS="3.* *-jython" |
9 |
|
6 |
|
10 |
inherit distutils eutils user webapp |
7 |
PYTHON_COMPAT=( python{2_6,2_7} ) |
|
|
8 |
PYTHON_REQ_USE="sqlite?" |
11 |
|
9 |
|
12 |
MY_PV=${PV/_beta/b} |
10 |
DISTUTILS_SINGLE_IMPL=Yes |
13 |
MY_P=Trac-${MY_PV} |
11 |
|
|
|
12 |
inherit distutils-r1 eutils user webapp |
13 |
|
14 |
MY_PV="${PV/_beta/b}" |
15 |
MY_P="Trac-${MY_PV}" |
14 |
|
16 |
|
15 |
DESCRIPTION="Trac is a minimalistic web-based project management, wiki and bug/issue tracking system." |
17 |
DESCRIPTION="Trac is a minimalistic web-based project management, wiki and bug/issue tracking system." |
16 |
HOMEPAGE="http://trac.edgewall.com/ http://pypi.python.org/pypi/Trac" |
18 |
HOMEPAGE="http://trac.edgewall.com/ http://pypi.python.org/pypi/Trac" |
Lines 18-52
Link Here
|
18 |
|
20 |
|
19 |
LICENSE="BSD" |
21 |
LICENSE="BSD" |
20 |
SLOT="0" |
22 |
SLOT="0" |
21 |
KEYWORDS="amd64 ppc ~ppc64 ~sparc x86 ~x86-fbsd" |
23 |
KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd" |
22 |
IUSE="cgi fastcgi i18n mysql postgres +sqlite subversion" |
24 |
IUSE="cgi fastcgi i18n mysql postgres +sqlite subversion test" |
23 |
REQUIRED_USE="|| ( mysql postgres sqlite )" |
25 |
REQUIRED_USE="|| ( mysql postgres sqlite )" |
24 |
|
26 |
|
25 |
RDEPEND=" |
27 |
RDEPEND=" |
26 |
dev-python/setuptools |
28 |
dev-python/setuptools:0[${PYTHON_USEDEP}] |
27 |
dev-python/docutils |
29 |
dev-python/docutils:0[${PYTHON_USEDEP}] |
28 |
dev-python/genshi |
30 |
dev-python/genshi:0[${PYTHON_USEDEP}] |
29 |
dev-python/pygments |
31 |
dev-python/pygments:0[${PYTHON_USEDEP}] |
30 |
dev-python/pytz |
32 |
dev-python/pytz:0[${PYTHON_USEDEP}] |
31 |
i18n? ( >=dev-python/Babel-0.9.5 ) |
33 |
i18n? ( >=dev-python/Babel-0.9.5:0[${PYTHON_USEDEP}] ) |
32 |
cgi? ( virtual/httpd-cgi ) |
34 |
cgi? ( virtual/httpd-cgi:0 ) |
33 |
fastcgi? ( virtual/httpd-fastcgi ) |
35 |
fastcgi? ( virtual/httpd-fastcgi:0 ) |
34 |
mysql? ( dev-python/mysql-python ) |
36 |
mysql? ( dev-python/mysql-python:0[${PYTHON_USEDEP}] ) |
35 |
postgres? ( >=dev-python/psycopg-2 ) |
37 |
postgres? ( dev-python/psycopg:2[${PYTHON_USEDEP}] ) |
36 |
sqlite? ( |
38 |
sqlite? ( >=dev-db/sqlite-3.3.4:3 ) |
37 |
>=dev-db/sqlite-3.3.4 |
39 |
subversion? ( dev-vcs/subversion:0[python,${PYTHON_USEDEP}] ) |
38 |
|| ( dev-lang/python:2.7[sqlite] dev-lang/python:2.6[sqlite] dev-lang/python:2.5[sqlite] >=dev-python/pysqlite-2.3.2 ) |
|
|
39 |
) |
40 |
subversion? ( dev-vcs/subversion[python] ) |
41 |
" |
40 |
" |
42 |
DEPEND="${RDEPEND}" |
41 |
DEPEND="${RDEPEND} |
|
|
42 |
test? ( |
43 |
dev-python/twill:0[${PYTHON_USEDEP}] |
44 |
dev-python/lxml:0[${PYTHON_USEDEP}] |
45 |
dev-python/configobj:0[${PYTHON_USEDEP}] |
46 |
)" |
43 |
|
47 |
|
44 |
S="${WORKDIR}/${MY_P}" |
48 |
S="${WORKDIR}/${MY_P}" |
45 |
|
49 |
|
46 |
WEBAPP_MANUAL_SLOT="yes" |
50 |
WEBAPP_MANUAL_SLOT="yes" |
47 |
|
51 |
|
48 |
pkg_setup() { |
52 |
pkg_setup() { |
49 |
python_pkg_setup |
53 |
python-single-r1_pkg_setup |
50 |
webapp_pkg_setup |
54 |
webapp_pkg_setup |
51 |
|
55 |
|
52 |
enewgroup tracd |
56 |
enewgroup tracd |
Lines 55-79
Link Here
|
55 |
|
59 |
|
56 |
src_prepare() { |
60 |
src_prepare() { |
57 |
epatch "${FILESDIR}/${PV}-git-identity.patch" |
61 |
epatch "${FILESDIR}/${PV}-git-identity.patch" |
|
|
62 |
# http://trac.edgewall.org/ticket/11258 |
63 |
# http://trac.edgewall.org/changeset/11933 |
64 |
epatch "${FILESDIR}/${P}-changeset_11933.diff" |
58 |
} |
65 |
} |
59 |
|
66 |
|
60 |
src_test() { |
67 |
python_test() { |
61 |
testing() { |
68 |
einfo "Running ${PYTHON} trac/test.py -v" |
62 |
PYTHONPATH=. "$(PYTHON)" trac/test.py |
69 |
PYTHONPATH=. "${PYTHON}" trac/test.py -v || die |
63 |
} |
|
|
64 |
python_execute_function testing |
65 |
|
70 |
|
66 |
if use i18n; then |
71 |
if use i18n ; then |
67 |
make check |
72 |
emake check |
68 |
fi |
73 |
fi |
69 |
} |
74 |
} |
70 |
|
75 |
|
71 |
# the default src_compile just calls setup.py build |
76 |
# the default src_compile just calls setup.py build |
72 |
# currently, this switches i18n catalog compilation based on presence of Babel |
77 |
# currently, this switches i18n catalog compilation based on presence of Babel |
73 |
|
|
|
74 |
src_install() { |
78 |
src_install() { |
75 |
webapp_src_preinst |
79 |
webapp_src_preinst |
76 |
distutils_src_install |
80 |
distutils-r1_src_install |
77 |
|
81 |
|
78 |
# project environments might go in here |
82 |
# project environments might go in here |
79 |
keepdir /var/lib/trac |
83 |
keepdir /var/lib/trac |
Lines 91-100
Link Here
|
91 |
newinitd "${FILESDIR}"/tracd.initd tracd |
95 |
newinitd "${FILESDIR}"/tracd.initd tracd |
92 |
|
96 |
|
93 |
if use cgi; then |
97 |
if use cgi; then |
94 |
cp contrib/cgi-bin/trac.cgi "${ED}${MY_CGIBINDIR}" || die |
98 |
python_scriptinto "${MY_CGIBINDIR}" |
|
|
99 |
python_doscript contrib/cgi-bin/trac.cgi |
95 |
fi |
100 |
fi |
96 |
if use fastcgi; then |
101 |
if use fastcgi; then |
97 |
cp contrib/cgi-bin/trac.fcgi "${ED}${MY_CGIBINDIR}" || die |
102 |
python_scriptinto "${MY_CGIBINDIR}" |
|
|
103 |
python_doscript contrib/cgi-bin/trac.fcgi |
98 |
fi |
104 |
fi |
99 |
|
105 |
|
100 |
for lang in en; do |
106 |
for lang in en; do |
Lines 106-111
Link Here
|
106 |
} |
112 |
} |
107 |
|
113 |
|
108 |
pkg_postinst() { |
114 |
pkg_postinst() { |
109 |
distutils_pkg_postinst |
|
|
110 |
webapp_pkg_postinst |
115 |
webapp_pkg_postinst |
111 |
} |
116 |
} |