1 |
# $Id: smeserver-awstats.spec,v 1.2 2020/10/20 11:19:32 brianr Exp $ |
# $Id: smeserver-awstats.spec,v 1.9 2023/02/12 19:07:17 michel 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 8 |
8 |
|
|
9 |
Summary: SME Server intergration rpm for awstats |
Summary: SME Server integration rpm for awstats |
10 |
Name: %{realname} |
Name: %{realname} |
11 |
Version: %{version} |
Version: %{version} |
12 |
Release: %{release}%{?dist} |
Release: %{release}%{?dist} |
14 |
Group: SMEserver/addon |
Group: SMEserver/addon |
15 |
Source: %{name}-%{version}.tar.gz |
Source: %{name}-%{version}.tar.gz |
16 |
BuildRoot: /var/tmp/%{name}-%{version} |
BuildRoot: /var/tmp/%{name}-%{version} |
17 |
URL: http://www.dungog.net/sme |
URL: https://wiki.koozali.org/AWStats |
18 |
BuildArchitectures: noarch |
BuildArchitectures: noarch |
19 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
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-bz11998-backup.patch |
25 |
|
Patch2: smeserver-awstats-1.4-bz5925_add_qmail_stats.patch |
26 |
|
Patch3: smeserver-awstats-1.4-bz12324_sm2_initial.patch |
27 |
|
|
28 |
%description |
%description |
29 |
SME Server integration rpm for awstats. |
SME Server integration rpm for awstats. |
30 |
|
|
31 |
%changelog |
%changelog |
32 |
|
* Mon Mar 20 2023 Michel Begue <mab974@misouk.com> 1.4-8.sme |
33 |
|
- Initial release for server-manager (sm2) [SME: 12324] |
34 |
|
|
35 |
|
* Sun Feb 12 2023 Michel Begue <mab974@misouk.com> 1.4-7.sme |
36 |
|
- add mail stats to panel (ftp stats too) [SME: 5925] |
37 |
|
|
38 |
|
* Sat Jul 30 2022 Brian Read <brianr@bjsystems.co.uk> 1.4-6.sme |
39 |
|
- Re-build and link to latest devtools [SME: 11997] |
40 |
|
|
41 |
|
* Thu Jul 21 2022 Jean-Philippe Pialasse <tests@pialasse.com> 1.4-5.sme |
42 |
|
- add to core backup [SME: 11998] |
43 |
|
|
44 |
|
* Mon Feb 22 2021 Jean-Philipe Pialasse <tests@pialasse.com> 1.4-3.sme |
45 |
|
- add update event for easy install [SME: 11045] |
46 |
|
rewrite spec and createlinks to be more smeserver compliant |
47 |
|
- run actions/awstats-upgrade on update of awstats or smeserver-awstats [SME: 10784] |
48 |
|
|
49 |
* Tue Oct 20 2020 BogusDateBot |
* Tue Oct 20 2020 BogusDateBot |
50 |
- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday, |
- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday, |
51 |
by assuming the date is correct and changing the weekday. |
by assuming the date is correct and changing the weekday. |
160 |
|
|
161 |
%prep |
%prep |
162 |
%setup -q -n %{realname}-%{version} |
%setup -q -n %{realname}-%{version} |
163 |
#%patch0 -p1 |
%patch0 -p1 |
164 |
#%patch0 -p1 |
%patch1 -p1 |
165 |
|
%patch2 -p1 |
166 |
|
%patch3 -p1 |
167 |
|
|
168 |
%build |
%build |
169 |
perl createlinks |
perl createlinks |
170 |
|
mkdir -p root/home/e-smith/files/users/admin/home/awstats |
171 |
mkdir -p root/etc/e-smith/web/panels/manager/html/awstats/icon |
mkdir -p root/etc/e-smith/web/panels/manager/html/awstats/icon |
172 |
mkdir -p root/etc/e-smith/web/panels/manager/cgi-bin/.awstats |
mkdir -p root/etc/e-smith/web/panels/manager/cgi-bin/.awstats |
173 |
|
#user-manager |
174 |
|
mkdir -p root/etc/e-smith/web/panels/user/html/ |
175 |
|
mkdir -p root/etc/e-smith/web/panels/user/cgi-bin/ |
176 |
|
ln -fs /etc/e-smith/web/panels/manager/html/awstats root/etc/e-smith/web/panels/user/html/awstats |
177 |
|
ln -fs /etc/e-smith/web/panels/manager/cgi-bin/.awstats root/etc/e-smith/web/panels/user/cgi-bin/.awstats |
178 |
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 |
179 |
|
|
180 |
%install |
%install |
181 |
rm -rf $RPM_BUILD_ROOT |
rm -rf $RPM_BUILD_ROOT |
182 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
183 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
184 |
|
--dir '/home/e-smith/files/users/admin/home/awstats' 'attr(40770,admin,root)' \ |
185 |
|
--dir '/etc/e-smith/web/panels/manager/cgi-bin/.awstats' 'attr(40770,root,root)' \ |
186 |
|
> %{name}-%{version}-filelist |
187 |
echo "%doc " >> %{name}-%{version}-filelist |
echo "%doc " >> %{name}-%{version}-filelist |
188 |
|
|
189 |
%clean |
%clean |
192 |
|
|
193 |
%pre |
%pre |
194 |
%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 |
|
195 |
|
|
|
#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 |
|
196 |
|
|
197 |
%preun |
%preun |
198 |
%postun |
%postun |
201 |
/bin/rm -rf /etc/e-smith/web/panels/manager/cgi-bin/.awstats |
/bin/rm -rf /etc/e-smith/web/panels/manager/cgi-bin/.awstats |
202 |
/bin/rm -rf /etc/e-smith/web/panels/user/html/awstats |
/bin/rm -rf /etc/e-smith/web/panels/user/html/awstats |
203 |
/bin/rm -rf /etc/e-smith/web/panels/user/cgi-bin/.awstats |
/bin/rm -rf /etc/e-smith/web/panels/user/cgi-bin/.awstats |
204 |
|
/bin/rm -fs /usr/share/smanager/themes/default/images/awstats/icon |
205 |
/sbin/e-smith/config setprop AWStats status removed |
/sbin/e-smith/config setprop AWStats status removed |
206 |
/sbin/e-smith/expand-template /etc/crontab |
/sbin/e-smith/expand-template /etc/crontab |
207 |
fi |
fi |
208 |
|
|
209 |
%files -f %{name}-%{version}-filelist |
%files -f %{name}-%{version}-filelist |
210 |
%defattr(-,root,root) |
%defattr(-,root,root) |
|
|
|
|
#runs when awstats OR smeserver-awstats is installed or upgraded |
|
|
%triggerin -- awstats |
|
|
/etc/e-smith/events/actions/awstats-upgrade |
|