1 |
commit: a91187579584c042cdb7de09df71dcdbff5813fc |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jan 31 16:26:53 2016 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 31 16:27:22 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a9118757 |
7 |
|
8 |
net-analyzer/graphite-web: revbump for changed examples installation, bug #556852 |
9 |
|
10 |
Package-Manager: portage-2.2.26 |
11 |
|
12 |
.../graphite-web/graphite-web-0.9.13-r2.ebuild | 99 ++++++++++++++++++++++ |
13 |
1 file changed, 99 insertions(+) |
14 |
|
15 |
diff --git a/net-analyzer/graphite-web/graphite-web-0.9.13-r2.ebuild b/net-analyzer/graphite-web/graphite-web-0.9.13-r2.ebuild |
16 |
new file mode 100644 |
17 |
index 0000000..134bc3f |
18 |
--- /dev/null |
19 |
+++ b/net-analyzer/graphite-web/graphite-web-0.9.13-r2.ebuild |
20 |
@@ -0,0 +1,99 @@ |
21 |
+# Copyright 1999-2015 Gentoo Foundation |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+# $Id$ |
24 |
+ |
25 |
+EAPI=5 |
26 |
+PYTHON_COMPAT=( python2_7 ) |
27 |
+ |
28 |
+inherit distutils-r1 python-utils-r1 prefix |
29 |
+ |
30 |
+DESCRIPTION="Enterprise scalable realtime graphing" |
31 |
+HOMEPAGE="http://graphite.readthedocs.org/" |
32 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz |
33 |
+ https://raw.githubusercontent.com/graphite-project/graphite-web/522d84fed687bd946878e48d85982d59f7bd1267/webapp/content/img/share.png -> ${P}-share.png" |
34 |
+ |
35 |
+LICENSE="Apache-2.0" |
36 |
+SLOT="0" |
37 |
+KEYWORDS="~amd64 ~x86" |
38 |
+IUSE="ldap mysql memcached +sqlite" |
39 |
+ |
40 |
+DEPEND="" |
41 |
+RDEPEND="dev-lang/python[sqlite?] |
42 |
+ || ( >=dev-python/django-1.4[sqlite?,mysql?,${PYTHON_USEDEP}] |
43 |
+ ( >=dev-python/django-1.6[sqlite?,${PYTHON_USEDEP}] |
44 |
+ mysql? ( || ( dev-python/mysql-python dev-python/mysqlclient ) ) ) ) |
45 |
+ >=dev-python/twisted-core-10.0[${PYTHON_USEDEP}] |
46 |
+ >=dev-python/django-tagging-0.3.1[${PYTHON_USEDEP}] |
47 |
+ dev-python/pycairo[${PYTHON_USEDEP}] |
48 |
+ dev-python/zope-interface[${PYTHON_USEDEP}] |
49 |
+ dev-python/pytz[${PYTHON_USEDEP}] |
50 |
+ dev-python/pyparsing[${PYTHON_USEDEP}] |
51 |
+ dev-python/txAMQP[${PYTHON_USEDEP}] |
52 |
+ dev-python/carbon[${PYTHON_USEDEP}] |
53 |
+ dev-python/whisper[${PYTHON_USEDEP}] |
54 |
+ media-libs/fontconfig |
55 |
+ memcached? ( dev-python/python-memcached[${PYTHON_USEDEP}] ) |
56 |
+ ldap? ( dev-python/python-ldap[${PYTHON_USEDEP}] )" |
57 |
+ |
58 |
+PATCHES=( |
59 |
+ # Do not install the configuration and data files. We install them |
60 |
+ # somewhere sensible by hand. |
61 |
+ "${FILESDIR}"/${P}-fhs-paths.patch |
62 |
+ "${FILESDIR}"/${P}-system-libs.patch |
63 |
+) |
64 |
+ |
65 |
+EXAMPLES=( |
66 |
+ examples/example-graphite-vhost.conf |
67 |
+ conf/dashboard.conf.example |
68 |
+ conf/graphite.wsgi.example |
69 |
+) |
70 |
+ |
71 |
+src_prepare() { |
72 |
+ # use FHS-style paths |
73 |
+ rm setup.cfg || die |
74 |
+ # make sure we don't use bundled stuff |
75 |
+ rm -Rf webapp/graphite/thirdparty |
76 |
+ distutils-r1_src_prepare |
77 |
+ eprefixify \ |
78 |
+ conf/graphite.wsgi.example \ |
79 |
+ webapp/graphite/local_settings.py.example |
80 |
+} |
81 |
+ |
82 |
+python_install() { |
83 |
+ distutils-r1_python_install \ |
84 |
+ --install-data="${EPREFIX}"/usr/share/${PN} |
85 |
+ |
86 |
+ # make manage.py available from an easier location/name |
87 |
+ dodir /usr/bin |
88 |
+ mv "${D}"/$(python_get_sitedir)/graphite/manage.py \ |
89 |
+ "${ED}"/usr/bin/${PN}-manage || die |
90 |
+ chmod 0755 "${ED}"/usr/bin/${PN}-manage || die |
91 |
+ python_fix_shebang "${ED}"/usr/bin/${PN}-manage |
92 |
+ |
93 |
+ # shortener image isn't included for some reason |
94 |
+ cp "${DISTDIR}"/"${P}"-share.png "${ED}"/usr/share/${PN}/webapp/content/img/ |
95 |
+ |
96 |
+ insinto /etc/${PN} |
97 |
+ newins webapp/graphite/local_settings.py.example local_settings.py |
98 |
+ pushd "${D}"/$(python_get_sitedir)/graphite > /dev/null || die |
99 |
+ ln -s ../../../../../etc/${PN}/local_settings.py local_settings.py |
100 |
+ popd > /dev/null || die |
101 |
+} |
102 |
+ |
103 |
+pkg_config() { |
104 |
+ "${ROOT}"/usr/bin/${PN}-manage syncdb --noinput |
105 |
+ local idx=$(grep 'INDEX_FILE =' "${EROOT}"/etc/local_settings.py 2>/dev/null) |
106 |
+ if [[ -n ${idx} ]] ; then |
107 |
+ idx=${idx##*=} |
108 |
+ idx=$(echo ${idx}) |
109 |
+ eval "idx=${idx}" |
110 |
+ touch "${ROOT}"/"${idx}"/index |
111 |
+ fi |
112 |
+} |
113 |
+ |
114 |
+pkg_postinst() { |
115 |
+ einfo "You will need to ${PN} it with Apache (mod_wsgi) or nginx (uwsgi)." |
116 |
+ einfo "Don't forget to edit local_settings.py in ${EPREFIX}/etc/${PN}" |
117 |
+ einfo "See http://graphite.readthedocs.org/en/latest/config-local-settings.html" |
118 |
+ einfo "Run emerge --config =${PN}-${PVR} if this is a fresh install." |
119 |
+} |