/[smecontribs]/rpms/smeserver-cacti/contribs8/smeserver-cacti.spec
ViewVC logotype

Diff of /rpms/smeserver-cacti/contribs8/smeserver-cacti.spec

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

Revision 1.1 by unnilennium, Tue Feb 12 04:16:59 2013 UTC Revision 1.12 by unnilennium, Tue Jun 17 18:35:32 2014 UTC
# Line 1  Line 1 
1  # $Id: smeserver-cacti.spec,v 1.3 2008/11/25 16:20:19 slords Exp $  # $Id: smeserver-cacti.spec,v 1.11 2013/11/21 22:31:24 unnilennium Exp $
2  # Authority: nocvs  # Authority: nocvs
3  # Name: Michel Van hees  # Name: Michel Van hees
4    
5  Summary: Cacti for smeserver  Summary: Cacti for smeserver
6  %define name smeserver-cacti  %define name smeserver-cacti
7  Name: %{name}  Name: %{name}
8  %define version 0.8.7a  %define version 0.8.8b1
9  %define release 1  %define release 1
10  Version: %{version}  Version: %{version}
11  Release: %{release}%{?dist}  Release: %{release}%{?dist}
12  License: Freely distributable  License: Freely distributable
13  Group: Apache  Group: Apache
14  Source: %{name}-%{version}.tar.gz  Source: %{name}-%{version}.tar.gz
15  #Patch0: %{name}-%{version}.patch.yyyymmddnn  #REM contribs9 Patch0: smeserver-cacti-0.8.8b1-patch0.patch
16    #REM contribs9 Patch1: smeserver-cacti-0.8.8b1-patch1.patch
17    #REM contribs9 Patch2: smeserver-cacti-0.8.8b1-patch2.patch
18    #REM contribs9 Patch3: smeserver-cacti-0.8.8b1-patch3.patch
19    #REM contribs9 Patch4: smeserver-cacti-0.8.8b1-patch4.patch
20    #REM contribs9 Patch5: smeserver-cacti-0.8.8b1-patch5.patch
21    #REM contribs9 Patch6: smeserver-cacti-0.8.8b1-patch6.patch
22    #REM contribs9 Patch7: smeserver-cacti-0.8.8b1-patch7.patch
23    #REM contribs9 Patch8: smeserver-cacti-0.8.8b1-poller.patch
24    #REM contribs9 Patch9: smeserver-cacti-0.8.8b1-disenabled.patch
25    #Patch:%{name}-%{version}.patch.yyyymmddnn
26  BuildRoot: /var/tmp/e-smith-buildroot  BuildRoot: /var/tmp/e-smith-buildroot
27  BuildRequires: e-smith-devtools  BuildRequires: e-smith-devtools
28  BuildArchitectures: noarch  BuildArchitectures: noarch
29  Requires: smeserver-release >= 7, rrdtool >= 1  Requires: smeserver-release >= 8 , rrdtool >= 1
30    Requires: cacti = 0.8.8b-2.el5
31  AutoReqProv: no  AutoReqProv: no
32    
33  %changelog  %changelog
34    * Mon Jun 16 2014 JP Pialasse <tests@pialasse.com> 0.8.8b1-1.sme
35    - initial import to SME9 contribs
36    
37    * Thu Nov 21 2013 Jean-Philippe Pialasse <tests@pialasse.com> 0.8.8b-12.sme
38    - fixed poller not running in cron , added to crontab
39    - fixed wrong ownership for db.php, now cacti:www
40    - added status enabled by default
41    - user cacti to run in cron
42    
43    * Tue Nov 14 2013 Jean-Philippe Pialasse <tests@pialasse.com> 0.8.8b-10.sme
44    - typo fix in last patch (7)
45    
46    * Sun Nov 10 2013 Jean-Philippe Pialasse <tests@pialasse.com> 0.8.8b-9.sme
47    - fix paths in sql dump  [SME: 7419]
48    
49    * Mon Oct 21 2013 Jean-Philippe Pialasse <tests@pialasse.com> 0.8.8b-8.sme
50    - fixing last template path error in createlinks
51    
52    * Fri Oct 18 2013 Jean-Philippe Pialasse <tests@pialasse.com> 0.8.8b-7.sme
53    - fix missing type
54    - fix wrong path in Virtualhost template
55    - fix DB not creating
56    - fix extra file in template
57    - updated db mysql default
58    
59    * Tue Oct 15 2013 Jean-Philippe Pialasse <tests@pialasse.com> 0.8.8b-3.sme
60    - initial release for SME 8
61    - use el5 repo cacti
62    - fix dependencies
63    
64  * Tue Dec  4 2007 Michel Van hees <michel@vanhees.cc>  * Tue Dec  4 2007 Michel Van hees <michel@vanhees.cc>
65  - Update contrib to 0.8.7a version  - Update contrib to 0.8.7a version
66  - Adding access limitation  - Adding access limitation
# Line 35  SME server - Cacti Line 76  SME server - Cacti
76    
77  %prep  %prep
78  %setup  %setup
79  #%patch0 -p1  #REM contribs9 %patch0 -p1
80  #%patch1 -p1  #REM contribs9 %patch1 -p1
81    #REM contribs9 %patch2 -p1
82    #REM contribs9 %patch3 -p1
83    #REM contribs9 %patch4 -p1
84    #REM contribs9 %patch5 -p1
85    #REM contribs9 %patch6 -p1
86    #REM contribs9 %patch7 -p1
87    #REM contribs9 %patch8 -p1
88    #REM contribs9 %patch9 -p1
89    
90  %build  %build
91  perl createlinks  perl createlinks
# Line 52  echo "%doc COPYING"          >> %{name}- Line 101  echo "%doc COPYING"          >> %{name}-
101  rm -rf $RPM_BUILD_ROOT  rm -rf $RPM_BUILD_ROOT
102    
103  %pre  %pre
104  /sbin/e-smith/db accounts set cacti reserved  #/sbin/e-smith/db accounts set cacti reserved
105    
106  %preun  %preun
107    
108  %post  %post
109  /sbin/e-smith/db configuration set cacti service  #/sbin/e-smith/db configuration set cacti service
110  /sbin/e-smith/db configuration setprop cacti access private  #/sbin/e-smith/db configuration setprop cacti access private
111    
112  /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf  #/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
113  /sbin/e-smith/expand-template /opt/cacti/include/config.php  #/sbin/e-smith/expand-template /opt/cacti/include/config.php
114  service httpd-e-smith sigusr1  #service httpd-e-smith sigusr1
115    
116    
117  cactiVersion=`mysql cacti_sme -N -s -e"select * from version"`  #cactiVersion=`mysql cacti_sme -N -s -e"select * from version"`
118  case "$cactiVersion" in  #case "$cactiVersion" in
119      0.8.6j)  #    0.8.6j)
120          echo ""  #       echo ""
121          echo "Upgrade process !!!!!!"      #        echo "Upgrade process !!!!!!"    
122          mysql cacti_sme < /opt/cacti/cacti_upg086j.sql  #       mysql cacti_sme < /opt/cacti/cacti_upg086j.sql
123          rm -f /opt/cacti/cacti_sme.sql  #       rm -f /opt/cacti/cacti_sme.sql
124          rm -f /opt/cacti/cacti_upg086j.sql  #       rm -f /opt/cacti/cacti_upg086j.sql
125          echo "Upgrade complete ..."  #       echo "Upgrade complete ..."
126          echo ""  #       echo ""
127      ;;  #    ;;
128      0.8.7a)  #    0.8.7a)
129          # Shoul not be here for the moment  #        # Shoul not be here for the moment
130      ;;  #    ;;
131      *)  #    *)
132          # Fresh install  #        # Fresh install
133          echo ""  #       echo ""
134          echo "fresh install..."  #       echo "fresh install..."
135          mysqladmin create cacti_sme  #       mysqladmin create cacti_sme
136          mysql cacti_sme < /opt/cacti/cacti_sme.sql  #       mysql cacti_sme < /opt/cacti/cacti_sme.sql
137          rm -Rf /opt/cacti/install  #       rm -Rf /opt/cacti/install
138          rm -f /opt/cacti/cacti_sme.sql  #       rm -f /opt/cacti/cacti_sme.sql
139          rm -f /opt/cacti/cacti_upg086j.sql  #       rm -f /opt/cacti/cacti_upg086j.sql
140          echo "Install complete ..."  #        echo "Install complete ..."
141          echo ""  #       echo ""
142  esac  #esac
   
 case "${LANG:0:2}" in  
     fr)  
         echo ""  
         echo "Vous pouvez maintenant acceder à cacti via un browser web de la maniere suivante https://nom_server/cacti"  
         echo "Vous pourrez vous loger sous admin avec comme mot de pass admin."  
         echo "Si vous mettez à jour, le mot de passe admin n'aura pas changer!"  
         echo ""  
         echo "Attention !!!!!"  
         echo "Cacti est limité en accès au réseau interne, donc pas depuis internet"  
         echo "Vous pouvez changer cette option avec les commandes :"  
         echo "db configuration setprop cacti access public"  
         echo "signal-events console-save"  
         echo ""  
     ;;  
     *)  
         echo ""  
         echo "Now you can access cacti though your browser at  https://server_name/cacti"  
         echo "You can connect using login admin and password admin."  
         echo "If you update a 2.1 version of this contribs, admin password don't change!"  
         echo ""  
         echo "BEWARE !!!"  
         echo "Cacti is now limited to internal network, so it couldn't be access from internet"  
         echo "You can change this with the following command :"  
         echo "db configuration setprop cacti access public"  
         echo "signal-events console-save"  
         echo ""  
143    
     ;;  
 esac  
144    
145  %postun  %postun
 /sbin/e-smith/db accounts delete cacti  
 /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf  
 service httpd-e-smith sigusr1  
 if [ $1 = 0 ] ; then  
 # action to been done if remove  
 case "${LANG:0:2}" in  
     fr)  
         echo ""  
         echo "La base de donnée ne sera pas effacé"  
         echo "Si vous voulez supprimer la base de donnée lancé la commande suivante :"  
         echo "mysqladmin drop cacti_sme"  
     ;;  
     *)  
         echo ""  
         echo "Database will not be removed"  
         echo "If you want to remove completly the database launch"  
         echo "mysqladmin drop cacti_sme"  
     ;;  
 esac  
   
 fi  
146    
147  %files -f %{name}-%{version}-filelist  %files -f %{name}-%{version}-filelist
148  %defattr(-,root,root)  %defattr(-,root,root)


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed