]> git.pld-linux.org Git - packages/graphite-web.git/blob - graphite-web.spec
apache 2.4 updates, R: python-whisper not older than self
[packages/graphite-web.git] / graphite-web.spec
1 Summary:        A Django webapp for enterprise scalable realtime graphing
2 Name:           graphite-web
3 Version:        0.9.14
4 Release:        0.3
5 License:        Apache v2.0
6 Group:          Applications/WWW
7 Source0:        https://codeload.github.com/graphite-project/%{name}/tar.gz/%{version}
8 Source1:        apache.conf
9 Source2:        %{name}.logrotate
10 Patch0:         %{name}-kill-thirdparty-modules.patch
11
12 URL:            https://launchpad.net/graphite/
13 BuildRequires:  rpm-pythonprov
14 # for the py_build, py_install macros
15 BuildRequires:  rpmbuild(macros) >= 1.710
16 BuildRequires:  python-devel
17 Requires:       apache-mod_wsgi
18 Requires:       fonts-TTF-DejaVu
19 Requires:       python-django
20 Requires:       python-django_tagging >= 0.3
21 Requires:       python-pycairo
22 Requires:       python-pyparsing
23 Requires:       python-pytz
24 Requires:       python-simplejson
25 Requires:       python-whisper >= %{version}
26 Requires:       webapps
27 Conflicts:      logrotate < 3.8.0
28 BuildArch:      noarch
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %define         _webapps        /etc/webapps
32 %define         _webapp         %{name}
33 %define         _sysconfdir     %{_webapps}/%{_webapp}
34 %define         _appdir         %{_datadir}/%{_webapp}
35
36 %description
37 Graphite consists of a storage backend and a web-based visualization
38 frontend. Client applications send streams of numeric time-series data
39 to the Graphite backend (called carbon), where it gets stored in
40 fixed-size database files similar in design to RRD. The web frontend
41 provides user interfaces for visualizing this data in graphs as well
42 as a simple URL-based API for direct graph generation.
43
44 Graphite's design is focused on providing simple interfaces (both to
45 users and applications), real-time visualization, high-availability,
46 and enterprise scalability.
47
48 %prep
49 %setup -q
50 # Kill strict use of thidparty subdir copies of python modules
51 %patch0 -p1
52
53 %build
54 %py_build %{?with_tests:test}  
55   
56
57 %install
58 rm -rf $RPM_BUILD_ROOT
59 # http://graphite.readthedocs.org/en/latest/install-source.html#installing-in-the-default-location
60 %py_install   \
61   --prefix /usr  \
62   --install-lib %{py_sitescriptdir}   \
63   --install-data %{_datadir}/graphite
64
65 %py_postclean -x manage.py
66
67 # Create directories
68 install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}
69 install -d $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}
70 install -d $RPM_BUILD_ROOT%{_sysconfdir}
71
72 # Install some default configurations and wsgi
73 install -Dp conf/dashboard.conf.example $RPM_BUILD_ROOT%{_sysconfdir}/dashboard.conf
74 mv $RPM_BUILD_ROOT{%{py_sitescriptdir}/graphite/local_settings.py.example,%{_sysconfdir}/local_settings.py}
75 touch $RPM_BUILD_ROOT%{py_sitescriptdir}/graphite/local_settings.py{c,o}
76 install -Dp conf/graphite.wsgi.example $RPM_BUILD_ROOT%{_datadir}/graphite/%{name}.wsgi
77 install -Dp %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
78 install -Dp %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
79
80 # Configure django /media/ location
81 sed -i 's|##PYTHON_SITELIB##|%{py_sitescriptdir}|' $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
82
83 # Create local_settings symlink
84 ln -s %{_sysconfdir}/local_settings.py $RPM_BUILD_ROOT%{py_sitescriptdir}/graphite
85
86 # Don't ship bins that are not needed for prodcution
87 %{__rm} $RPM_BUILD_ROOT%{_bindir}/{build-index.sh,run-graphite-devel-server.py}
88
89 # Add graphite-manage to PATH for easy access
90 install -d $RPM_BUILD_ROOT%{_sbindir}
91 ln -s %{py_sitescriptdir}/graphite/manage.py $RPM_BUILD_ROOT%{_sbindir}/graphite-manage
92
93 # Don't ship thirdparty
94 rm -r $RPM_BUILD_ROOT%{py_sitescriptdir}/graphite/thirdparty
95
96 %clean
97 rm -rf $RPM_BUILD_ROOT
98
99 %triggerin -- apache < 2.2.0, apache-base
100 %webapp_register httpd %{_webapp}
101
102 %triggerun -- apache < 2.2.0, apache-base
103 %webapp_unregister httpd %{_webapp}
104
105 %files
106 %defattr(644,root,root,755)
107 %doc conf/* examples/*
108 %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
109 %dir %attr(750,root,http) %{_sysconfdir}
110 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
111 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dashboard.conf
112 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/local_settings.py
113 %attr(755,root,root) %{_sbindir}/graphite-manage
114
115 %dir %{py_sitescriptdir}/graphite
116 %{py_sitescriptdir}/graphite/[^l]*.py[co]
117 %{py_sitescriptdir}/graphite/logger.py[co]
118 %{py_sitescriptdir}/graphite/local_settings.py
119 %ghost %{py_sitescriptdir}/graphite/local_settings.py[co]
120 %attr(755,root,root) %{py_sitescriptdir}/graphite/manage.py
121 %{py_sitescriptdir}/graphite/account
122 %{py_sitescriptdir}/graphite/browser
123 %{py_sitescriptdir}/graphite/cli
124 %{py_sitescriptdir}/graphite/composer
125 %{py_sitescriptdir}/graphite/dashboard
126 %{py_sitescriptdir}/graphite/events
127 %{py_sitescriptdir}/graphite/metrics
128 %{py_sitescriptdir}/graphite/render
129 %{py_sitescriptdir}/graphite/templates
130 %{py_sitescriptdir}/graphite/version
131 %{py_sitescriptdir}/graphite/url_shortener
132 %{py_sitescriptdir}/graphite/whitelist
133 %{py_sitescriptdir}/graphite_web-%{version}-py*.egg-info
134
135 %dir %{_datadir}/graphite
136 %attr(755,root,root) %{_datadir}/graphite/graphite-web.wsgi
137 %{_datadir}/graphite/webapp
138
139 %attr(775,root,http) %dir %{_localstatedir}/log/%{name}
140 %attr(775,root,http) %dir %{_sharedstatedir}/%{name}
This page took 0.068935 seconds and 4 git commands to generate.