/[nagraffiti]/nagraffiti.spec
ViewVC logotype

Diff of /nagraffiti.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 45 by racvision, Thu Apr 26 11:55:10 2012 UTC revision 46 by racvision, Wed Apr 24 10:31:34 2013 UTC
# Line 1  Line 1 
1  # release number:  # release number:
2  %define rel %(date '+%Y%m%d%H%M')  %define rel %(date '+%Y%m%d%H%M')
3    
4  %define wwwpath /var/www/html/nagraffiti  %define wwwpath /var/www/html
5  %define nagraffiti_user nagraffiti  %define nagraffiti_user nagraffiti
6    
7  Summary:                Nagios grapher  Summary:                Nagios grapher
8  Name:                   nagraffiti  Name:                   nagraffiti
9  Version:                1.6  Version:                2.2
10  Release:                %{rel}  Release:                %{rel}
11  Source0:                %{name}-www.tar.bz2  Source0:                %{name}-www.tar.bz2
12  Source1:                %{name}-backend.tar.bz2  Source1:                %{name}-backend.tar.bz2
13  Source2:                %{name}-po.tar.bz2  Source2:                %{name}-po.tar.bz2
14  License:                GPL  License:                GPL
15  Group:                  Applications/System  Group:                  Applications/System
16  Requires:               rrdtool-perl  Requires:               rrdtool-perl, check_mk-livestatus, dejavu-sans-mono-fonts, perl-JSON-XS
17  Provides:               perl(Nagraffiti::Nagraph)  Provides:               perl(Nagraffiti::Nagraph)
18  BuildRoot:              %{_tmppath}/%{name}-%{version}-buildroot  BuildRoot:              %{_tmppath}/%{name}-%{version}-buildroot
19  BuildArch:              noarch  BuildArch:              noarch
# Line 23  BuildArch: noarch Line 23  BuildArch: noarch
23    
24    
25  %description  %description
26  Nagraffiti is a performance data grapher for Nagios. It can use NDO utils or Livestatus to collect data.  Nagraffiti is a performance data grapher for Nagios. It use Livestatus to collect data.
27    
28    
29  %description -l fr  %description -l fr
# Line 43  Nagraffiti est un traceur de donnée de Line 43  Nagraffiti est un traceur de donnée de
43    
44    
45  # Racvision index info  # Racvision index info
46  %{__install} -d $RPM_BUILD_ROOT/%{wwwpath}/../racvision/  %{__install} -d $RPM_BUILD_ROOT/%{wwwpath}/racvision/
47  %{__install} -p -m0644 www/nagraffiti.php $RPM_BUILD_ROOT/%{wwwpath}/../racvision/  %{__install} -p -m0644 www/nagraffiti.php $RPM_BUILD_ROOT/%{wwwpath}/racvision/
48    
49  # www files  # www files
50  %{__install} -d $RPM_BUILD_ROOT/%{wwwpath}/classes  %{__install} -d $RPM_BUILD_ROOT/%{wwwpath}/%{name}/classes
51  %{__install} -p -m0644 www/classes/*.php $RPM_BUILD_ROOT/%{wwwpath}/classes/  %{__install} -p -m0644 www/classes/*.php $RPM_BUILD_ROOT/%{wwwpath}/%{name}/classes/
52    
53  %{__install} -d $RPM_BUILD_ROOT/%{wwwpath}/css  %{__install} -d $RPM_BUILD_ROOT/%{wwwpath}/%{name}/css
54  %{__install} -p -m0644 www/css/*.css $RPM_BUILD_ROOT/%{wwwpath}/css/  %{__install} -p -m0644 www/css/*.css $RPM_BUILD_ROOT/%{wwwpath}/%{name}/css/
55    
56  %{__install} -d $RPM_BUILD_ROOT/%{wwwpath}/img  %{__install} -d $RPM_BUILD_ROOT/%{wwwpath}/%{name}/img
57  %{__install} -p -m0644 www/img/* $RPM_BUILD_ROOT/%{wwwpath}/img/  %{__install} -p -m0644 www/img/* $RPM_BUILD_ROOT/%{wwwpath}/%{name}/img/
58    
59  %{__install} -d $RPM_BUILD_ROOT/%{wwwpath}/js  %{__install} -d $RPM_BUILD_ROOT/%{wwwpath}/%{name}/js
60  %{__install} -p -m0644 www/js/*.js $RPM_BUILD_ROOT/%{wwwpath}/js/  %{__install} -p -m0644 www/js/*.js $RPM_BUILD_ROOT/%{wwwpath}/%{name}/js/
61    
62  %{__install} -d $RPM_BUILD_ROOT/%{wwwpath}/%{name}  %{__install} -d $RPM_BUILD_ROOT/%{wwwpath}/%{name}/%{name}
63  %{__install} -p -m0644 www/%{name}/*.php $RPM_BUILD_ROOT/%{wwwpath}/%{name}/  %{__install} -p -m0644 www/%{name}/*.php $RPM_BUILD_ROOT/%{wwwpath}/%{name}/%{name}/
64    
65  %{__install} -p -m0644 www/index.php $RPM_BUILD_ROOT/%{wwwpath}/  %{__install} -p -m0644 www/index.php $RPM_BUILD_ROOT/%{wwwpath}/%{name}/
66    
67  # Templates  # Templates
68  %{__install} -d $RPM_BUILD_ROOT/%{wwwpath}/templates  %{__install} -d $RPM_BUILD_ROOT/%{wwwpath}/%{name}/templates
69  %{__install} -p -m0644 www/templates/*.php $RPM_BUILD_ROOT/%{wwwpath}/templates/  %{__install} -p -m0644 www/templates/*.php $RPM_BUILD_ROOT/%{wwwpath}/%{name}/templates/
70    
71  # backend  # backend
72  %{__install} -d $RPM_BUILD_ROOT/%{perl_vendorlib}/Nagraffiti/  %{__install} -d $RPM_BUILD_ROOT/%{perl_vendorlib}/Nagraffiti
73  %{__install} -p -m0755 backend/*.pm $RPM_BUILD_ROOT/%{perl_vendorlib}/Nagraffiti/  %{__install} -p -m0755 backend/lib/*.pm $RPM_BUILD_ROOT/%{perl_vendorlib}/Nagraffiti/
74    %{__install} -d $RPM_BUILD_ROOT/%{perl_vendorlib}/Nagraffiti/Input
75    %{__install} -p -m0755 backend/lib/Input/*.pm $RPM_BUILD_ROOT/%{perl_vendorlib}/Nagraffiti/Input
76    
77  %{__install} -d $RPM_BUILD_ROOT/%{_sbindir}  %{__install} -d $RPM_BUILD_ROOT/%{_sbindir}
78  %{__install} -p -m0755 backend/nagraffiti-ndo-daemon.pl $RPM_BUILD_ROOT/%{_sbindir}/  #%{__install} -p -m0755 backend/nagraffiti-ndo-daemon.pl $RPM_BUILD_ROOT/%{_sbindir}/
79  %{__install} -p -m0755 backend/nagraffiti-fifo-daemon.pl $RPM_BUILD_ROOT/%{_sbindir}/  %{__install} -p -m0755 backend/nagraffiti-daemon.pl $RPM_BUILD_ROOT/%{_sbindir}/
80    
81  # Configs files:  # Configs files:
82  %{__install} -d $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}  %{__install} -d $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}
83  %{__install} -p -m0640 backend/config.ini $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/  %{__install} -p -m0640 backend/config.ini $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/
84  %{__install} -p -m0644 backend/rra.cfg $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/  %{__install} -p -m0644 backend/rra.cfg $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/
85    %{__install} -p -m0644 backend/log4p.cfg $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/
86    
87  # Logs files:  # Logs files:
88  %{__install} -d $RPM_BUILD_ROOT/%{_localstatedir}/log/%{name}  %{__install} -d $RPM_BUILD_ROOT/%{_localstatedir}/log/%{name}
# Line 122  fi Line 125  fi
125  %post  %post
126    
127  # Configure database password :  # Configure database password :
128  /usr/bin/mkpasswd -l 10 -s 0 > %{mysql_passwd_path}/%{name}  #/usr/bin/mkpasswd -l 10 -s 0 > %{mysql_passwd_path}/%{name}
129  %{__chmod} 640 %{mysql_passwd_path}/%{name}  #%{__chmod} 640 %{mysql_passwd_path}/%{name}
130    
131  # Add initscript to system V start :  # Add initscript to system V start :
132  if test -x /sbin/chkconfig; then  if test -x /sbin/chkconfig; then
# Line 140  fi Line 143  fi
143  %files -f %{name}_lang  %files -f %{name}_lang
144  %doc backend/README  %doc backend/README
145  %defattr(-,%{nagraffiti_user},%{nagraffiti_user})  %defattr(-,%{nagraffiti_user},%{nagraffiti_user})
 %config %{_sysconfdir}/%{name}/config.ini  
146  %config %{_sysconfdir}/%{name}/rra.cfg  %config %{_sysconfdir}/%{name}/rra.cfg
147    %config %{_sysconfdir}/%{name}/log4p.cfg
148    %attr(-,%{nagraffiti_user} ,apache) %config %{_sysconfdir}/%{name}/config.ini
149    
150  %defattr(-,root,root)  %defattr(-,root,root)
151    
152  %{_initrddir}/%{name}  %{_initrddir}/%{name}
153  %{_sbindir}/nagraffiti-ndo-daemon.pl  #%{_sbindir}/nagraffiti-ndo-daemon.pl
154  %{_sbindir}/nagraffiti-fifo-daemon.pl  %{_sbindir}/nagraffiti-daemon.pl
155  %{wwwpath}  %{wwwpath}
 %{wwwpath}/../racvision/  
156    
157  %dir %{perl_vendorlib}/Nagraffiti  #%dir %{perl_vendorlib}/Nagraffiti
158  %{perl_vendorlib}/Nagraffiti/*.pm  %{perl_vendorlib}/Nagraffiti/
159    
160  %attr(-,%{nagraffiti_user} ,%{nagraffiti_user}) %dir %{_localstatedir}/log/%{name}  %attr(-,%{nagraffiti_user} ,%{nagraffiti_user}) %dir %{_localstatedir}/log/%{name}
161  %attr(-,%{nagraffiti_user} ,%{nagraffiti_user}) %dir %{_localstatedir}/lib/%{name}  %attr(-,%{nagraffiti_user} ,%{nagraffiti_user}) %dir %{_localstatedir}/lib/%{name}

Legend:
Removed from v.45  
changed lines
  Added in v.46

  ViewVC Help
Powered by ViewVC 1.1.8