/[smecontribs]/rpms/smeserver-awstats/contribs10/smeserver-awstats.spec
ViewVC logotype

Diff of /rpms/smeserver-awstats/contribs10/smeserver-awstats.spec

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

Revision 1.3 by brianr, Tue Oct 20 11:21:15 2020 UTC Revision 1.5 by jpp, Mon Feb 22 20:14:44 2021 UTC
# Line 1  Line 1 
1  # $Id: smeserver-awstats.spec,v 1.2 2020/10/20 11:19:32 brianr Exp $  # $Id: smeserver-awstats.spec,v 1.4 2021/02/22 20:14:09 jpp Exp $
2  # Authority: dungog  # Authority: dungog
3  # Name: Stephen Noble  # Name: Stephen Noble
4    
5  %define realname smeserver-awstats  %define realname smeserver-awstats
6  %define version 1.4  %define version 1.4
7  %define release 2  %define release 3
8    
9  Summary:  SME Server intergration rpm for awstats  Summary:  SME Server intergration rpm for awstats
10  Name: %{realname}  Name: %{realname}
# Line 20  BuildRequires: e-smith-devtools >= 1.13. Line 20  BuildRequires: e-smith-devtools >= 1.13.
20  Requires: e-smith-release >= 9  Requires: e-smith-release >= 9
21  Requires: awstats >= 6.5  Requires: awstats >= 6.5
22  AutoReqProv: no  AutoReqProv: no
23  #Patch0: smeserver-awstats-1.4.  Patch0: smeserver-awstats-1.4-bz11045.patch
24  #Patch1: smeserver-awstats-1.4.  #Patch1: smeserver-awstats-1.4.
25    
26  %description  %description
27  SME Server integration rpm for awstats.  SME Server integration rpm for awstats.
28    
29  %changelog  %changelog
30    * Mon Feb 22 2021 Jean-Philipe Pialasse <tests@pialasse.com> 1.4-3.sme
31    - add update event for easy install [SME: 11045]
32      rewrite spec and createlinks to be more smeserver compliant
33    - run actions/awstats-upgrade on update of awstats or smeserver-awstats [SME: 10784]
34    
35  * Tue Oct 20 2020 BogusDateBot  * Tue Oct 20 2020 BogusDateBot
36  - Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday,  - Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday,
37    by assuming the date is correct and changing the weekday.    by assuming the date is correct and changing the weekday.
# Line 141  SME Server integration rpm for awstats. Line 146  SME Server integration rpm for awstats.
146    
147  %prep  %prep
148  %setup -q -n %{realname}-%{version}  %setup -q -n %{realname}-%{version}
149  #%patch0 -p1  %patch0 -p1
150  #%patch0 -p1  #%patch0 -p1
151    
152  %build  %build
153  perl createlinks  perl createlinks
154    mkdir -p root/home/e-smith/files/users/admin/home/awstats
155  mkdir -p root/etc/e-smith/web/panels/manager/html/awstats/icon  mkdir -p root/etc/e-smith/web/panels/manager/html/awstats/icon
156  mkdir -p root/etc/e-smith/web/panels/manager/cgi-bin/.awstats  mkdir -p root/etc/e-smith/web/panels/manager/cgi-bin/.awstats
157    #user-manager
158    mkdir -p root/etc/e-smith/web/panels/user/html/
159    mkdir -p root/etc/e-smith/web/panels/user/cgi-bin/
160    ln -fs /etc/e-smith/web/panels/manager/html/awstats root/etc/e-smith/web/panels/user/html/awstats
161    ln -fs /etc/e-smith/web/panels/manager/cgi-bin/.awstats root/etc/e-smith/web/panels/user/cgi-bin/.awstats
162    
163  echo %{version}-%{release} > root/etc/e-smith/web/panels/manager/cgi-bin/.awstats/version  echo %{version}-%{release} > root/etc/e-smith/web/panels/manager/cgi-bin/.awstats/version
164    
165  %install  %install
166  rm -rf $RPM_BUILD_ROOT  rm -rf $RPM_BUILD_ROOT
167  (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)  (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
168  /sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist  /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
169            --dir '/home/e-smith/files/users/admin/home/awstats' 'attr(40770,admin,root)' \
170            --dir '/etc/e-smith/web/panels/manager/cgi-bin/.awstats' 'attr(40770,root,root)' \
171    > %{name}-%{version}-filelist
172  echo "%doc " >> %{name}-%{version}-filelist  echo "%doc " >> %{name}-%{version}-filelist
173    
174  %clean  %clean
# Line 162  rm -rf %{name}-%{version} Line 177  rm -rf %{name}-%{version}
177    
178  %pre  %pre
179  %post  %post
 mkdir -p /home/e-smith/files/users/admin/home/awstats  
 chown -R admin.root /home/e-smith/files/users/admin/home/awstats  
 chmod -R u+rw,g+rw /home/e-smith/files/users/admin/home/awstats  
 /sbin/e-smith/config setprop AWStats status enabled  
 /sbin/e-smith/signal-event awstats-update  
180    
 #user-manager  
 /bin/mkdir -p /etc/e-smith/web/panels/user/html/  
 /bin/mkdir -p /etc/e-smith/web/panels/user/cgi-bin/  
 /bin/ln -fs /etc/e-smith/web/panels/manager/html/awstats /etc/e-smith/web/panels/user/html/awstats  
 /bin/ln -fs /etc/e-smith/web/panels/manager/cgi-bin/.awstats /etc/e-smith/web/panels/user/cgi-bin/.awstats  
181    
182  %preun  %preun
183  %postun  %postun
# Line 188  fi Line 193  fi
193  %files -f %{name}-%{version}-filelist  %files -f %{name}-%{version}-filelist
194  %defattr(-,root,root)  %defattr(-,root,root)
195    
 #runs when awstats OR smeserver-awstats is installed or upgraded  
 %triggerin -- awstats  
 /etc/e-smith/events/actions/awstats-upgrade  


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