# $Id: smeserver-awstats.spec,v 1.12 2024/03/01 16:09:10 brianr Exp $ # Authority: dungog # Name: Stephen Noble %define realname smeserver-awstats %define version 1.4 %define release 12 Summary: SME Server integration rpm for awstats Name: %{realname} Version: %{version} Release: %{release}%{?dist} License: GNU GPL (GNU General Public License) Group: SMEserver/addon Source: %{name}-%{version}.tar.xz BuildRoot: /var/tmp/%{name}-%{version} URL: https://wiki.koozali.org/AWStats BuildArchitectures: noarch BuildRequires: smeserver-devtools >= 1.13.1-03 Requires: smeserver-release >= 10 Requires: awstats >= 6.5 Requires: perl(POSIX) AutoReqProv: no %description SME Server integration rpm for awstats. %changelog * Sun Sep 08 2024 fix-e-smith-pkg.sh by Trevor Batley 1.4-12.sme - Fix e-smith references in smeserver-awstats [SME: 12732] * Sat Sep 07 2024 cvs2git.sh aka Brian Read 1.4-11.sme - Roll up patches and move to git repo [SME: 12338] * Sat Sep 07 2024 BogusDateBot - Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday, by assuming the date is correct and changing the weekday. * Fri Mar 01 2024 Brian Read 1.4-10.sme - Edit SM2 Menu entry to conform to new arrangements [SME: 12493] * Fri Mar 24 2023 Michel Begue 1.4-9.sme - fix typo and Requires in .spec file [SME: 12324] - (sm2) consider Daily and Hourly Reported Period - (sm2) remove unnecessary file in templates directory * Mon Mar 20 2023 Michel Begue 1.4-8.sme - Initial release for server-manager (sm2) [SME: 12324] * Sun Feb 12 2023 Michel Begue 1.4-7.sme - add mail stats to panel (ftp stats too) [SME: 5925] * Sat Jul 30 2022 Brian Read 1.4-6.sme - Re-build and link to latest devtools [SME: 11997] * Thu Jul 21 2022 Jean-Philippe Pialasse 1.4-5.sme - add to core backup [SME: 11998] * Mon Feb 22 2021 Jean-Philipe Pialasse 1.4-3.sme - add update event for easy install [SME: 11045] rewrite spec and createlinks to be more smeserver compliant - run actions/awstats-upgrade on update of awstats or smeserver-awstats [SME: 10784] * Tue Oct 20 2020 BogusDateBot - Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday, by assuming the date is correct and changing the weekday. Tue May 27 2001 --> Tue May 22 2001 or Sun May 27 2001 or Tue May 29 2001 or .... * Mon Oct 19 2020 Brian Read 1.4-2.sme - Initial import to SME10 tree [SME: 11045] * Fri Jul 20 2018 John Crisp 1.4-1.sme - Fix SkipHosts incomplete entry [SME: 10160] - Add SkipHosts db key - Update some code to newer API * Mon Sep 7 2015 stephane de Labrusse 1.3-3.sme - added smeserver-awstats-1.3.bz8450.remove_ExternalIP-LocalIP.patch - removed ExternalIP_LocalIP_ExternalNetmask [SME: 8450] * Mon Jun 16 2014 JP Pialasse 1.3-1.sme - initial import to SME9 contribs [SME: 8435] * Sat Sep 20 2008 Stephen Noble 1.2-7 - clarify when domain is added to panel [sme 4543] * Tue Jun 26 2007 Stephen Noble 1.2-5 - awstats upgrade script modified [sme 3087] * Tue Jun 26 2007 Stephen Noble 1.2-4 - awstats upgrade triggers added [sme 2347] * Mon Jan 8 2007 Stephen Noble - old database path fixed, awstats.conf/10conf [sme 2254] - [1.2-3] * Wed Apr 26 2006 Stephen Noble - symlinks to graphics fixed - [1.2-2] * Wed Apr 12 2006 Stephen Noble - update for sme7 - renamed smeserver-awstats - split awstats out of rpm, so it can be updated independently - [1.2-1] * Mon Jan 31 2005 Stephen Noble - AllowFullYearView=3 added to awstats.conf - hostinfo plugin option removed from panel - # to enable - # /sbin/e-smith/db /sbin/e-smith/configuration setprop AWStats Hostinfo yes - # and install perl-Net-XWhois rpm - [6.3-1] * Sat Jan 29 2005 Stephen Noble - update to awstats 6.3 - [6.3-0] * Sat Sep 13 2003 Stephen Noble - delegation defaults to admin can also delegate to everyone, a group or a single user - [2.3.4] * Mon Aug 25 2003 Michael Weinberger - based on AWStats 5.7 - [2.3.3] * Tue Jul 29 2003 stephen noble - everyone options in options - language fixs thanks Pascal Schirrmann - [2.3.2] * Fri Jul 18 2003 stephen noble - remove /sbin/e-smith/config and options link to non admin users - [2.3.1] * Thu Jul 17 2003 Michael Weinberger - based on AWStats 5.6 - supports servermanager navigation of SME6 - [2.3.0] * Tue Jul 15 2003 stephen noble - user-manager support - restrict virtual domains shown to users - [2.2.2] * Tue Jan 07 2003 Michael Weinberger - changed to new commandline syntax (-/sbin/e-smith/config) * Mon Jan 06 2003 Michael Weinberger - based on AWStats 5.3 * Mon Jan 06 2003 Michael Weinberger - set DNSLookup=1 as default * Sat Dec 21 2002 Michael Weinberger - based on AWStats 5.2 * Thu Feb 28 2002 Michael Weinberger - based on AWStats 4.0 BETA * Thu Feb 28 2002 Michael Weinberger - now based on AWStats 3.2 * Fri Oct 05 2001 Michael Weinberger - missing icons issue solved. Path to icons changed. * Thu Oct 04 2001 Michael Weinberger - based on AWStats 2.32 RPM name changed * Sun May 27 2001 Michael Weinberger Tue May 27 2001 --> Tue May 22 2001 or Sun May 27 2001 or Tue May 29 2001 or .... - problems when started by e-smith events awstats pre-processor now runs in background * Tue May 01 2001 Michael Weinberger - owner=admin, group=root for /home/e-smith/files/users/admin/home/awstats and all dirs below, rw for owner and group. (after e-smith upgrade permission set to drwx------, reported by Michael Doerner) awstats_run now checks permissons and correct them if needed. - more /sbin/e-smith/configuration options added, incl. 5 and 10 minute freq. - Warning "Another instance running" suppressed, when launched by cron (-s option) - Warning in the panel removed * Sun Apr 29 2001 Michael Weinberger - awstats_pos was not removed after a log rotate of access_log * Fri Apr 27 2001 Michael Weinberger - beta 1 release %prep %setup -q -n %{realname}-%{version} %build perl createlinks mkdir -p root/home/e-smith/files/users/admin/home/awstats mkdir -p root/etc/e-smith/web/panels/manager/html/awstats/icon mkdir -p root/etc/e-smith/web/panels/manager/cgi-bin/.awstats #user-manager mkdir -p root/etc/e-smith/web/panels/user/html/ mkdir -p root/etc/e-smith/web/panels/user/cgi-bin/ ln -fs /etc/e-smith/web/panels/manager/html/awstats root/etc/e-smith/web/panels/user/html/awstats ln -fs /etc/e-smith/web/panels/manager/cgi-bin/.awstats root/etc/e-smith/web/panels/user/cgi-bin/.awstats echo %{version}-%{release} > root/etc/e-smith/web/panels/manager/cgi-bin/.awstats/version %install rm -rf $RPM_BUILD_ROOT (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ --dir '/home/e-smith/files/users/admin/home/awstats' 'attr(40770,admin,root)' \ --dir '/etc/e-smith/web/panels/manager/cgi-bin/.awstats' 'attr(40770,root,root)' \ > %{name}-%{version}-filelist echo "%doc " >> %{name}-%{version}-filelist %clean cd .. rm -rf %{name}-%{version} %pre %post if (systemctl list-unit-files |grep smanager) then echo "Smanager restart in spec file" /sbin/e-smith/signal-event smanager-refresh; fi %preun %postun if [ $1 = 0 ] ; then /bin/rm -rf /etc/e-smith/web/panels/manager/html/awstats /bin/rm -rf /etc/e-smith/web/panels/manager/cgi-bin/.awstats /bin/rm -rf /etc/e-smith/web/panels/user/html/awstats /bin/rm -rf /etc/e-smith/web/panels/user/cgi-bin/.awstats /bin/rm -f /usr/share/smanager/themes/default/images/awstats/icon /sbin/e-smith/config setprop AWStats status removed /sbin/e-smith/expand-template /etc/crontab fi true %files -f %{name}-%{version}-filelist %defattr(-,root,root)