Advertisement
Guest User

Untitled

a guest
Jun 6th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Name:       carbonapi
  2. Version:    1.0
  3. Release:    1
  4. Summary:    CarbonAPI
  5. License:    BSD-2
  6.  
  7. Source0:    %{name}-%{version}.tar.gz
  8. Source1:    %{name}.service
  9.  
  10. Requires:   cairo, systemd-units
  11. Requires(post): systemd
  12. Requires(preun):  systemd
  13. Requires(postun): systemd
  14.  
  15. Provides:   %{name}-%{version}-%{release}
  16.  
  17. BuildArch:  x86_64
  18.  
  19.  
  20. %description
  21. CarbonAPI - replacement graphite API server.
  22.  
  23. %prep
  24. %setup -q -n carbonapi
  25.  
  26. %build
  27.  
  28. %install
  29. mkdir -p %{buildroot}/opt/%{name}
  30. cp -rfa * %{buildroot}/opt/%{name}
  31. mkdir -p %{buildroot}%{_unitdir}
  32. install -m 644 %{SOURCE1} %{buildroot}%{_unitdir}
  33.  
  34. %files
  35. %dir /opt/%{name}
  36. /opt/%{name}/conf/config.yaml
  37. /opt/%{name}/bin/carbonapi
  38. %{_unitdir}/%{name}.service
  39.  
  40. %post
  41. %systemd_post %{name}.service
  42.  
  43. %preun
  44. %systemd_preun %{name}.service
  45.  
  46. %postun
  47. %systemd_postun_with_restart %{name}.service
  48.  
  49. %changelog
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement