|
1 ## |
|
2 ## postfix-mailgraph.spec -- OpenPKG RPM Package Specification |
|
3 ## Copyright (c) 2000-2009 OpenPKG Foundation e.V. <http://openpkg.net/> |
|
4 ## |
|
5 ## Permission to use, copy, modify, and distribute this software for |
|
6 ## any purpose with or without fee is hereby granted, provided that |
|
7 ## the above copyright notice and this permission notice appear in all |
|
8 ## copies. |
|
9 ## |
|
10 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
|
11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
|
12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
|
13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
|
14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
|
15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
|
16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
|
17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
|
18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
|
19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
|
20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
|
21 ## SUCH DAMAGE. |
|
22 ## |
|
23 |
|
24 # package information |
|
25 Name: postfix-mailgraph |
|
26 Summary: Postfix Mail Graphing |
|
27 URL: http://mailgraph.schweikert.ch/ |
|
28 Vendor: David Schweikert |
|
29 Packager: OpenPKG Foundation e.V. |
|
30 Distribution: OpenPKG Community |
|
31 Class: EVAL |
|
32 Group: Mail |
|
33 License: GPL |
|
34 Version: 1.14 |
|
35 Release: 20080101 |
|
36 |
|
37 # list of sources |
|
38 Source0: http://mailgraph.schweikert.ch/pub/mailgraph-%{version}.tar.gz |
|
39 Source1: rc.postfix-mailgraph |
|
40 Patch0: postfix-mailgraph.patch |
|
41 |
|
42 # build information |
|
43 Prefix: %{l_prefix} |
|
44 BuildRoot: %{l_buildroot} |
|
45 BuildPreReq: OpenPKG, openpkg >= 20060823 |
|
46 PreReq: OpenPKG, openpkg >= 20060823, perl, perl-sys, rrdtool, postfix |
|
47 AutoReq: no |
|
48 AutoReqProv: no |
|
49 |
|
50 %description |
|
51 Mailgraph is a very simple mail statistics RRDtool frontend for the |
|
52 Postfix MTA that produces daily, weekly, monthly and yearly graphs |
|
53 of received/sent and bounced/rejected mail. |
|
54 |
|
55 %track |
|
56 prog postfix-mailgraph = { |
|
57 version = %{version} |
|
58 url = http://mailgraph.schweikert.ch/pub/ |
|
59 regex = mailgraph-(__VER__)\.tar\.gz |
|
60 } |
|
61 |
|
62 %prep |
|
63 %setup -q -n mailgraph-%{version} |
|
64 %patch -p0 |
|
65 |
|
66 %build |
|
67 |
|
68 %install |
|
69 rm -rf $RPM_BUILD_ROOT |
|
70 %{l_shtool} mkdir -f -p -m 755 \ |
|
71 $RPM_BUILD_ROOT%{l_prefix}/sbin \ |
|
72 $RPM_BUILD_ROOT%{l_prefix}/cgi \ |
|
73 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \ |
|
74 $RPM_BUILD_ROOT%{l_prefix}/var/postfix-mailgraph/rrd \ |
|
75 $RPM_BUILD_ROOT%{l_prefix}/var/postfix-mailgraph/img \ |
|
76 $RPM_BUILD_ROOT%{l_prefix}/var/postfix-mailgraph/run |
|
77 %{l_shtool} install -c -m 755 \ |
|
78 -e 's;#!/usr/bin/perl;#!%{l_prefix}/bin/perl;' \ |
|
79 -e 's;/var/log/mailgraph\.log;%{l_prefix}/var/postfix-mailgraph/run/mailgraph.log;' \ |
|
80 -e 's;/var/run/mailgraph\.pid;%{l_prefix}/var/postfix-mailgraph/run/mailgraph.pid;' \ |
|
81 -e 's;/var/log/syslog;%{l_prefix}/var/postfix/log/postfix.log;' \ |
|
82 -e 's;/var/log;%{l_prefix}/var/postfix-mailgraph/rrd;' \ |
|
83 mailgraph.pl $RPM_BUILD_ROOT%{l_prefix}/sbin/mailgraph |
|
84 %{l_shtool} install -c -m 755 \ |
|
85 -e 's;#!/usr/bin/perl;#!%{l_prefix}/bin/perl;' \ |
|
86 -e 's;mailgraph\.cgi;mailgraph;' \ |
|
87 -e 's;mailgraph\.rrd;%{l_prefix}/var/postfix-mailgraph/rrd/mailgraph.rrd;' \ |
|
88 -e 's;mailgraph_virus\.rrd;%{l_prefix}/var/postfix-mailgraph/rrd/mailgraph_virus.rrd;' \ |
|
89 -e 's;/tmp/mailgraph;%{l_prefix}/var/postfix-mailgraph/img;' \ |
|
90 mailgraph.cgi $RPM_BUILD_ROOT%{l_prefix}/cgi/mailgraph |
|
91 %{l_shtool} install -c -m 755 %{l_value -s -a} \ |
|
92 %{SOURCE rc.postfix-mailgraph} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ |
|
93 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
|
94 %{l_files_std} \ |
|
95 '%attr(755,%{l_nusr},%{l_ngrp}) %{l_prefix}/var/postfix-mailgraph/img' |
|
96 |
|
97 %files -f files |
|
98 |
|
99 %clean |
|
100 rm -rf $RPM_BUILD_ROOT |
|
101 |