/[smecontribs]/rpms/isoqlog/contribs9/isoqlog.spec
ViewVC logotype

Contents of /rpms/isoqlog/contribs9/isoqlog.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Sat Jul 2 12:09:54 2016 UTC (8 years, 5 months ago) by unnilennium
Branch: MAIN
CVS Tags: isoqlog-2_2_1-1_1_el6_sme, HEAD
Error occurred while calculating annotation data.
Initial import

1 #
2 # spec file for package isoqlog
3 #
4 # This file and all modifications and additions to the pristine
5 # package are under the same license as the package itself.
6 #
7 # norootforbuild
8
9 Name: isoqlog
10 Summary: Isoqlog is an MTA log analysis program written in C.
11 Version: 2.2.1
12 Release: 1.1%{?dist}
13 License: BSD
14 Group: Monitoring
15 URL: http://www.enderunix.org/isoqlog/
16 Source0: isoqlog-%{version}.tar.gz
17 BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
18
19 Obsoletes: isoqlog-toaster-doc isoqlog-toaster
20 Provides: isoqlog-toaster
21
22 Requires: qmail
23
24 %define qmailtools_share_dir %{_datadir}/qmailtools
25 %define package_share_dir %{_datadir}/isoqlog
26 %define package_var_dir /var/lib/qmailtools/isoqlog
27
28 %if 0%{?suse_version}
29 Requires: apache2 cron
30 BuildRequires: apache2 cron
31 %define apache_confd %{_sysconfdir}/apache2/conf.d
32 %else
33 Requires: vixie-cron crontabs
34 BuildRequires: crontabs
35 %define apache_confd %{_sysconfdir}/httpd/conf.d
36 %endif
37
38 %if 0%{?rhel_version} || 0%{?centos_version} || 0%{?fedora_version}
39 Requires: httpd
40 BuildRequires: httpd
41 %endif
42
43 %if 0%{?mandriva_version}
44 Requires: apache-base
45 BuildRequires: apache-base
46 %endif
47
48 #----------------------------------------------------------------------------
49 %description
50 Isoqlog is an MTA log analysis program written in C. It is designed to
51 scan qmail, postfix, sendmail logfiles and produce usage statistics in
52 HTML format. for viewing through a browser. It produces Top domains
53 output according to Incoming, Outgoing, total mails and bytes, it keeps
54 your main domain mail statistics with Days Top Domain, Top Users values
55 for per day, per month, and years.
56
57 #----------------------------------------------------------------------------
58 %prep
59 %setup -q -n %{name}-%{version}
60
61 for i in `find . -type d -name CVS` `find . -type f -name .cvs\*` `find . -type f -name .#\*`; do
62 if [ -e "$i" ]; then rm -r $i; fi >&/dev/null
63 done
64
65 #----------------------------------------------------------------------------
66 %build
67 %{configure} \
68 --sysconfdir=%{_sysconfdir} \
69
70 %{__make}
71
72 #----------------------------------------------------------------------------
73 %install
74 %{__mkdir_p} \
75 %{buildroot}%{_sysconfdir}/cron.d \
76 %{buildroot}%{_docdir}/%{name} \
77 %{buildroot}%{package_var_dir}/htdocs \
78 %{buildroot}%{package_share_dir}/include \
79 %{buildroot}%{_defaultdocdir}/isoqlog
80
81 %{makeinstall}
82
83 if [ "/usr/share/doc/isoqlog" != "%{_defaultdocdir}/isoqlog" ] ; then
84 mv %{buildroot}/usr/share/doc/isoqlog/* %{buildroot}%{_defaultdocdir}/isoqlog/
85 fi
86 mv %{buildroot}/usr/etc/* %{buildroot}%{_sysconfdir}
87 rm -f %{buildroot}%{_sysconfdir}/isoqlog.domains-dist
88 cp -ar %{buildroot}%{package_share_dir}/htmltemp/images %{buildroot}%{package_var_dir}/htdocs
89
90 # cronjob to run
91 echo "SHELL=/bin/sh
92 MAILTO=root
93
94 58 * * * * root (ls /home/vpopmail/domains | grep -v '^\.') > %{package_var_dir}/isoqlog.domains && \
95 %{_bindir}/isoqlog -f %{_sysconfdir}/isoqlog.conf 2>&1 > /dev/null
96 " > %{buildroot}%{_sysconfdir}/cron.d/isoqlog
97
98 # default configuration
99 echo "
100 # isoqlog 2.1 Toaster Configuration
101
102 logtype = \"qmail-multilog\"
103 logstore = \"/var/log/qmail/send\"
104 domainsfile = \"%{package_var_dir}/isoqlog.domains\"
105 outputdir = \"%{package_var_dir}/htdocs\"
106 htmldir = \"%{package_share_dir}/htmltemp\"
107 langfile = \"%{package_share_dir}/lang/english\"
108 hostname = \"localhost\"
109 maxsender = 100
110 maxreceiver = 100
111 maxtotal = 100
112 maxbyte = 100
113 " > %{buildroot}%{_sysconfdir}/isoqlog.conf
114
115 # module to be inserted into toaster-web-admin
116 echo "
117 <!-- isoqlog.module -->
118 <tr>
119 <td align=\"right\" width=\"47%\">Usage Statistics per Domain</td>
120 <td width=\"6%\">&nbsp;</td>
121 <td align=\"left\" width=47%\"><input type=\"button\" value=\"%{name}-%{version}\" class=\"inputs\" onClick=\"location.href='qlogs';\"></td>
122 </tr>
123 <!-- isoqlog.module -->
124 " > %{buildroot}%{package_share_dir}/isoqlog.module
125
126 # apache configuration file
127 mkdir -p %{buildroot}/%{apache_confd}
128 echo "# configuration to serve qmailmrtg
129 Alias /qmail/log %{package_var_dir}/htdocs
130 <Directory %{package_var_dir}/htdocs>
131 AllowOverride All
132 Order allow,deny
133 Allow from all
134 AuthType Basic
135 AuthName "Qmail_Toaster"
136 AuthUserFile /etc/qmailtoaster-admin.htpasswd
137 require valid-user
138 </Directory>
139 " > %{buildroot}/%{apache_confd}/%{name}.conf
140
141 #-------------------------------------------------------------------
142 %triggerin -- control-panel-toaster
143 # Insert into toaster-web-admin
144 if [ -d %{qmailtools_share_dir}/include ] ; then
145 ln -fs %{package_share_dir}/isoqlog.module %{qmailtools_share_dir}/include
146 fi
147
148 #-------------------------------------------------------------------
149 %triggerun -- control-panel-toaster
150 # Delete from toaster-web-admin
151 if [ -e %{qmailtools_share_dir}/include/isoqlog.module ] ; then
152 rm %{qmailtools_share_dir}/include/isoqlog.module
153 fi
154
155 #------------------------------------------------------------------------------------
156 %clean
157 [ -d %{buildroot} ] && %{__rm} -rf %{buildroot}
158
159 #----------------------------------------------------------------------------
160 %files
161 %defattr(-,root,root)
162 %dir %{package_var_dir}
163 %{package_share_dir}
164
165 %attr(0755,root,root) %{_bindir}/isoqlog
166
167 %defattr(0644,root,root)
168 %{package_share_dir}/htmltemp/*
169 %{package_share_dir}/lang/*
170 %{package_var_dir}/htdocs/images/*
171
172 %config(noreplace) %{_sysconfdir}/isoqlog.conf
173 %config(noreplace) %{apache_confd}/%{name}.conf
174 %config %{_sysconfdir}/isoqlog.conf-dist
175 %config %{_sysconfdir}/cron.d/*
176
177 %doc %{_defaultdocdir}/isoqlog/*
178
179 #----------------------------------------------------------------------------
180 %changelog
181 * Mon Sep 15 2008 Johannes Weberhofer <linux@weberhofer.at> 2.2.1
182 - Fixed attributes
183 - Cleaned spec
184 - Updated to latest version
185 * Sat Apr 14 2007 Nick Hemmesch <nick@ndhsoft.com> 2.1-1.3.4
186 - Added CentOS 5 i386 support
187 - Added CentOS 5 x86_64 support
188 * Fri Feb 23 2007 Nick Hemmesch <nick@ndhsoft.com> 2.1-1.3.3
189 - Fix ownership of cron.sh to root:root
190 * Wed Nov 01 2006 Erik A. Espinoza <espinoza@forcenetworks.com> 2.1-1.3.2
191 - Added Fedora Core 6 support
192 * Mon Jun 05 2006 Nick Hemmesch <nick@ndhsoft.com> 2.1-1.3.1
193 - Add SuSE 10.1 support
194 - Set apacheuser and apachegroup correctly in cron.sh
195 * Sat May 13 2006 Nick Hemmesch <nick@ndhsoft.com> 2.1-1.2.10
196 - Add Fedora Core 5 support
197 * Sun Nov 20 2005 Nick Hemmesch <nick@ndhsoft.com> 2.1-1.2.9
198 - Add SuSE 10.0 and Mandriva 2006.0 support
199 * Sat Oct 15 2005 Nick Hemmesch <nick@ndhsoft.com> 2.1-1.2.8
200 - Add Fedora Core 4 x86_64 support
201 * Sat Oct 01 2005 Nick Hemmesch <nick@ndhsoft.com> 2.1-1.2.7
202 - Add CentOS 4 x86_64 support
203 * Fri Sep 22 2005 Nick Hemmesch <nick@ndhsoft.com> 2.1-1.2.6
204 - Remove automake config for Mandrake acct build failures
205 * Fri Jul 01 2005 Nick Hemmesch <nick@ndhsoft.com> 2.1-1.2.5
206 - Add Fedora Core 4 support
207 * Fri Jun 03 2005 Torbjorn Turpeinen <tobbe@nyvalls.se> 2.1-1.2.4
208 - Gnu/Linux Mandrake 10.0,10.1,10.2 support
209 * Fri May 27 2005 Nick Hemmesch <nick@ndhsoft.com> 2.1-1.2.3
210 - Remove doc rpm
211 * Sun Feb 27 2005 Nick Hemmesch <nick@ndhsoft.com> 2.1-1.2.2
212 - Add Fedora Core 3 support
213 - Add CentOS 4 support
214 * Thu Jun 03 2004 Nick Hemmesch <nick@ndhsoft.com> 2.1-1.2.1
215 - Add Fedora Core 2 support
216 * Wed Feb 11 2004 Nick Hemmesch <nick@ndhsoft.com> 2.1-1.1.5
217 - Fix Trustix 2.0 crontab call to fcrontab
218 - Define crontab
219 - Define appacheuser and apachegroup
220 * Mon Dec 29 2003 Nick Hemmesch <nick@ndhsoft.com> 2.1-1.1.4
221 - Add Fedora Core 1 support
222 * Tue Nov 25 2003 Nick Hemmesch <nick@ndhsoft.com> 2.1-1.1.3
223 - Add Red Hat 9 support
224 - Add Trustix 2.0 support
225 - Add Mandrake 9.2 support
226 - Fix images to images-toaster
227 * Sun Mar 30 2003 Miguel Beccari <miguel.beccari@clikka.com> 2.1-1.1.2
228 - Toaster HTML templates (alpha status)
229 * Sat Mar 29 2003 Miguel Beccari <miguel.beccari@clikka.com> 2.1-1.1.1
230 - First rpm: everything is OK. Templates are NOT ok.

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed