# $Id: smeserver-awstats.spec,v 1.5 2008/09/20 05:43:55 dungog Exp $ # Authority: dungog # Name: Stephen Noble %define realname smeserver-awstats %define version 1.2 %define release 7 Summary: SME Server intergration rpm for awstats Name: %{realname} Version: %{version} Release: %{release}%{?dist} License: GNU GPL (GNU General Public License) Group: SMEserver/addon Source: %{name}-%{version}.tar.gz Patch0: smeserver-awstats-upgrade.patch Patch1: smeserver-awstats-1.2-note.patch BuildRoot: /var/tmp/%{name}-%{version} URL: http://www.dungog.net/sme BuildArchitectures: noarch BuildRequires: e-smith-devtools >= 1.13.1-03 Requires: e-smith-release >= 7 Requires: awstats >= 6.5 AutoReqProv: no %description SME Server intergration rpm for awstats. %changelog * 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 * Tue May 27 2001 Michael Weinberger - 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} %patch0 -p1 %patch1 -p1 %build perl createlinks mkdir -p root/etc/e-smith/web/panels/manager/html/awstats/icon mkdir -p root/etc/e-smith/web/panels/manager/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 > %{name}-%{version}-filelist echo "%doc " >> %{name}-%{version}-filelist %clean cd .. rm -rf %{name}-%{version} %pre %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 #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 %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 /sbin/e-smith/config setprop AWStats status removed /sbin/e-smith/expand-template /etc/crontab fi %files -f %{name}-%{version}-filelist %defattr(-,root,root) #runs when awstats OR smeserver-awstats is installed or upgraded %triggerin -- awstats /etc/e-smith/events/actions/awstats-upgrade