--- rpms/smeserver-awstats/contribs10/smeserver-awstats.spec 2020/10/20 11:19:32 1.2 +++ rpms/smeserver-awstats/contribs10/smeserver-awstats.spec 2024/03/01 16:09:10 1.12 @@ -1,12 +1,12 @@ -# $Id: smeserver-awstats.spec,v 1.1 2020/10/19 15:36:38 brianr Exp $ +# $Id: smeserver-awstats.spec,v 1.11 2023/04/19 14:10:10 michel Exp $ # Authority: dungog # Name: Stephen Noble %define realname smeserver-awstats %define version 1.4 -%define release 2 +%define release 10 -Summary: SME Server intergration rpm for awstats +Summary: SME Server integration rpm for awstats Name: %{realname} Version: %{version} Release: %{release}%{?dist} @@ -14,19 +14,54 @@ License: GNU GPL (GNU General Public Lic Group: SMEserver/addon Source: %{name}-%{version}.tar.gz BuildRoot: /var/tmp/%{name}-%{version} -URL: http://www.dungog.net/sme +URL: https://wiki.koozali.org/AWStats BuildArchitectures: noarch BuildRequires: e-smith-devtools >= 1.13.1-03 -Requires: e-smith-release >= 9 +Requires: e-smith-release >= 10 Requires: awstats >= 6.5 +Requires: perl(POSIX) AutoReqProv: no -#Patch0: smeserver-awstats-1.4. -#Patch1: smeserver-awstats-1.4. +Patch0: smeserver-awstats-1.4-bz11045.patch +Patch1: smeserver-awstats-1.4-bz11998-backup.patch +Patch2: smeserver-awstats-1.4-bz5925_add_qmail_stats.patch +Patch3: smeserver-awstats-1.4-bz12324_sm2_initial.patch +Patch4: smeserver-awstats-1.4-bz12324_sm2_init_bis.patch +Patch5: smeserver-awstats-1.4-Alter-menu-category-for-new-arrangement.patch %description SME Server integration rpm for awstats. %changelog +* 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] @@ -116,7 +151,8 @@ SME Server integration rpm for awstats. * Thu Oct 04 2001 Michael Weinberger - based on AWStats 2.32 RPM name changed -* Tue May 27 2001 Michael Weinberger +* 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 @@ -135,19 +171,32 @@ SME Server integration rpm for awstats. %prep %setup -q -n %{realname}-%{version} -#%patch0 -p1 -#%patch0 -p1 +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 %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 > %{name}-%{version}-filelist +/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 @@ -156,17 +205,12 @@ 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 +if (systemctl list-unit-files |grep smanager) then + echo "Smanager restart in spec file" + /sbin/e-smith/signal-event smanager-refresh; +fi + %preun %postun @@ -175,13 +219,11 @@ if [ $1 = 0 ] ; then /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) - -#runs when awstats OR smeserver-awstats is installed or upgraded -%triggerin -- awstats -/etc/e-smith/events/actions/awstats-upgrade