1 |
# $Id: smeserver-awstats.spec,v 1.1 2013/02/06 21:12:01 unnilennium Exp $ |
# $Id: smeserver-awstats.spec,v 1.6 2022/07/21 14:37:45 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 1 |
%define release 5 |
8 |
|
|
9 |
Summary: SME Server intergration rpm for awstats |
Summary: SME Server intergration rpm for awstats |
10 |
Name: %{realname} |
Name: %{realname} |
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 |
|
|
26 |
%description |
%description |
27 |
SME Server intergration rpm for awstats. |
SME Server integration rpm for awstats. |
28 |
|
|
29 |
%changelog |
%changelog |
30 |
|
* Thu Jul 21 2022 Jean-Philippe Pialasse <tests@pialasse.com> 1.4-5.sme |
31 |
|
- add to core backup [SME: 11998] |
32 |
|
|
33 |
|
* Mon Feb 22 2021 Jean-Philipe Pialasse <tests@pialasse.com> 1.4-3.sme |
34 |
|
- add update event for easy install [SME: 11045] |
35 |
|
rewrite spec and createlinks to be more smeserver compliant |
36 |
|
- run actions/awstats-upgrade on update of awstats or smeserver-awstats [SME: 10784] |
37 |
|
|
38 |
|
* Tue Oct 20 2020 BogusDateBot |
39 |
|
- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday, |
40 |
|
by assuming the date is correct and changing the weekday. |
41 |
|
Tue May 27 2001 --> Tue May 22 2001 or Sun May 27 2001 or Tue May 29 2001 or .... |
42 |
|
|
43 |
|
* Mon Oct 19 2020 Brian Read <brianr@bjsystems.co.uk> 1.4-2.sme |
44 |
|
- Initial import to SME10 tree [SME: 11045] |
45 |
|
|
46 |
* Fri Jul 20 2018 John Crisp <jcrisp@safeandsounit.co.uk> 1.4-1.sme |
* Fri Jul 20 2018 John Crisp <jcrisp@safeandsounit.co.uk> 1.4-1.sme |
47 |
- Fix SkipHosts incomplete entry [SME: 10160] |
- Fix SkipHosts incomplete entry [SME: 10160] |
48 |
- Add SkipHosts db key |
- Add SkipHosts db key |
129 |
* Thu Oct 04 2001 Michael Weinberger |
* Thu Oct 04 2001 Michael Weinberger |
130 |
- based on AWStats 2.32 |
- based on AWStats 2.32 |
131 |
RPM name changed |
RPM name changed |
132 |
* Tue May 27 2001 Michael Weinberger |
* Sun May 27 2001 Michael Weinberger |
133 |
|
Tue May 27 2001 --> Tue May 22 2001 or Sun May 27 2001 or Tue May 29 2001 or .... |
134 |
- problems when started by e-smith events |
- problems when started by e-smith events |
135 |
awstats pre-processor now runs in background |
awstats pre-processor now runs in background |
136 |
* Tue May 01 2001 Michael Weinberger |
* Tue May 01 2001 Michael Weinberger |
149 |
|
|
150 |
%prep |
%prep |
151 |
%setup -q -n %{realname}-%{version} |
%setup -q -n %{realname}-%{version} |
152 |
#%patch0 -p1 |
%patch0 -p1 |
153 |
#%patch0 -p1 |
%patch1 -p1 |
154 |
|
|
155 |
%build |
%build |
156 |
perl createlinks |
perl createlinks |
157 |
|
mkdir -p root/home/e-smith/files/users/admin/home/awstats |
158 |
mkdir -p root/etc/e-smith/web/panels/manager/html/awstats/icon |
mkdir -p root/etc/e-smith/web/panels/manager/html/awstats/icon |
159 |
mkdir -p root/etc/e-smith/web/panels/manager/cgi-bin/.awstats |
mkdir -p root/etc/e-smith/web/panels/manager/cgi-bin/.awstats |
160 |
|
#user-manager |
161 |
|
mkdir -p root/etc/e-smith/web/panels/user/html/ |
162 |
|
mkdir -p root/etc/e-smith/web/panels/user/cgi-bin/ |
163 |
|
ln -fs /etc/e-smith/web/panels/manager/html/awstats root/etc/e-smith/web/panels/user/html/awstats |
164 |
|
ln -fs /etc/e-smith/web/panels/manager/cgi-bin/.awstats root/etc/e-smith/web/panels/user/cgi-bin/.awstats |
165 |
|
|
166 |
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 |
167 |
|
|
168 |
%install |
%install |
169 |
rm -rf $RPM_BUILD_ROOT |
rm -rf $RPM_BUILD_ROOT |
170 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
171 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
172 |
|
--dir '/home/e-smith/files/users/admin/home/awstats' 'attr(40770,admin,root)' \ |
173 |
|
--dir '/etc/e-smith/web/panels/manager/cgi-bin/.awstats' 'attr(40770,root,root)' \ |
174 |
|
> %{name}-%{version}-filelist |
175 |
echo "%doc " >> %{name}-%{version}-filelist |
echo "%doc " >> %{name}-%{version}-filelist |
176 |
|
|
177 |
%clean |
%clean |
180 |
|
|
181 |
%pre |
%pre |
182 |
%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 |
|
183 |
|
|
|
#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 |
|
184 |
|
|
185 |
%preun |
%preun |
186 |
%postun |
%postun |
196 |
%files -f %{name}-%{version}-filelist |
%files -f %{name}-%{version}-filelist |
197 |
%defattr(-,root,root) |
%defattr(-,root,root) |
198 |
|
|
|
#runs when awstats OR smeserver-awstats is installed or upgraded |
|
|
%triggerin -- awstats |
|
|
/etc/e-smith/events/actions/awstats-upgrade |
|