hdp_mon_ganglia_addons.spec 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. ##
  2. #
  3. #/*
  4. # * Licensed to the Apache Software Foundation (ASF) under one
  5. # * or more contributor license agreements. See the NOTICE file
  6. # * distributed with this work for additional information
  7. # * regarding copyright ownership. The ASF licenses this file
  8. # * to you under the Apache License, Version 2.0 (the
  9. # * "License"); you may not use this file except in compliance
  10. # * with the License. You may obtain a copy of the License at
  11. # *
  12. # * http://www.apache.org/licenses/LICENSE-2.0
  13. # *
  14. # * Unless required by applicable law or agreed to in writing, software
  15. # * distributed under the License is distributed on an "AS IS" BASIS,
  16. # * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17. # * See the License for the specific language governing permissions and
  18. # * limitations under the License.
  19. # */
  20. #
  21. # RPM Spec file for Ganglia Add-ons for HDP Monitoring Dashboard
  22. #
  23. %define name hdp_mon_ganglia_addons
  24. %define release %(cat %{_sourcedir}/release.txt)
  25. %define version %(cat %{_sourcedir}/version.txt)
  26. %define buildroot %{_tmppath}/%{name}-%{version}-buildroot
  27. Summary: Ganglia Add-ons for HDP Monitoring Dashboard
  28. Name: %{name}
  29. Version: %{version}
  30. URL: http://incubator.apache.org/ambari
  31. Release: %{release}%{?dist}
  32. License: Apache License, Version 2.0
  33. Group: System Environment/Base
  34. Source: %{name}-%{version}.tar.gz
  35. Buildroot: %{buildroot}
  36. Requires: gweb >= 2.2
  37. %if 0%{?suse_version}
  38. %define graphd_dir /srv/www/htdocs/ganglia/graph.d/
  39. %else
  40. %define graphd_dir /var/www/html/ganglia/graph.d/
  41. %endif
  42. %define gconf_dir /var/lib/ganglia/conf/
  43. BuildArchitectures: noarch
  44. %description
  45. This package provides add-on graphs and configurations for ganglia to provide
  46. for a better monitoring integration with a Hadoop Cluster
  47. %prep
  48. %setup -q -n %{name}-%{version}
  49. %build
  50. %install
  51. # Flush any old RPM build root
  52. %__rm -rf $RPM_BUILD_ROOT
  53. %__mkdir -p $RPM_BUILD_ROOT/%{graphd_dir}/
  54. %__mkdir -p $RPM_BUILD_ROOT/%{gconf_dir}/
  55. %__cp -rf conf/* $RPM_BUILD_ROOT/%{gconf_dir}/
  56. %__cp -rf graph.d/* $RPM_BUILD_ROOT/%{graphd_dir}/
  57. %files
  58. %defattr(-,root,root)
  59. %{graphd_dir}/*
  60. %{gconf_dir}/*
  61. %clean
  62. %__rm -rf $RPM_BUILD_ROOT
  63. %changelog
  64. * Fri Feb 17 2011 Hortonworks <ambari-group@hortonworks.com>
  65. - Initial version