-
Notifications
You must be signed in to change notification settings - Fork 1
/
maildrop-toaster.spec
276 lines (238 loc) · 10.1 KB
/
maildrop-toaster.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
%define name maildrop
%define pversion 2.0.3
%define bversion 1.3
%define rpmrelease 11.kng%{?dist}
%define release %{bversion}.%{rpmrelease}
%define ccflags %{optflags}
%define ldflags %{optflags}
############### RPM ################################
%define debug_package %{nil}
%define vtoaster %{pversion}
%define builddate Fri Jun 12 2009
Summary: Maildrop mail filter/mail delivery agent
Name: maildrop-toaster
Version: %{vtoaster}
Release: %{release}
License: GPL
Group: System/Servers
Source0: maildrop-%{pversion}.tar.bz2
Source1: mailfilter.bz2
Source2: subscribeIMAP.sh.bz2
Url: http://www.flounder.net/~mrsam/maildrop/
BuildRoot: %{_tmppath}/%{name}-buildroot
BuildRequires: vpopmail-toaster >= 5.3.8, pcre-devel
#BuildRequires: courier-imap-toaster
BuildRequires: make
BuildRequires: gcc
BuildRequires: perl
BuildRequires: gcc-c++
Packager: Jake Vickers <[email protected]>
#-------------------------------------------------------------
%package devel
#-------------------------------------------------------------
Summary: Development tools for handling E-mail messages
Group: Development/C
Requires: %{name} >= %{pversion}-%{release}
#-------------------------------------------------------------
%description
#-------------------------------------------------------------
Maildrop is a combination mail filter/mail delivery agent.
Maildrop reads the message to be delivered to your mailbox,
optionally reads instructions from a file how filter incoming
mail, then based on these instructions may deliver mail to an
alternate mailbox, or forward it, instead of dropping the
message into your mailbox.
Maildrop uses a structured, real, meta-programming language in
order to define filtering instructions. Its basic features are
fast and efficient. At sites which carry a light load, the
more advanced, CPU-demanding, features can be used to build
very sophisticated mail filters. Maildrop deployments have
been reported at sites that support as many as 30,000
mailboxes.
#-------------------------------------------------------------
%description devel
#-------------------------------------------------------------
The maildrop-devel package contains the libraries and header
files that can be useful in developing software that works
with or processes E-mail messages.
Install the maildrop-devel package if you want to develop
applications which use or process E-mail messages.
%define name maildrop
#-------------------------------------------------------------
%prep
#-------------------------------------------------------------
%setup -q -n %{name}-%{pversion}
# Cleanup for gcc
#-------------------------------------------------------------
[ -f %{_tmppath}/%{name}-%{pversion}-gcc ] && rm -f %{_tmppath}/%{name}-%{pversion}-gcc
echo "gcc" > %{_tmppath}/%{name}-%{pversion}-gcc
# We have gcc written in a temp file
#-------------------------------------------------------------
export CC="`cat %{_tmppath}/%{name}-%{pversion}-gcc` %{ccflags}"
export CPPFLAGS="%{ccflags}"
#-------------------------------------------------------------
# Configure
#-------------------------------------------------------------
%configure --enable-maildrop-uid=root \
--enable-maildrop-gid=vchkpw \
--enable-maildirquota \
--with-devel
#-------------------------------------------------------------
%build
#-------------------------------------------------------------
make
#-------------------------------------------------------------
%install
#-------------------------------------------------------------
[ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot}
mkdir -p %{buildroot}
make install-strip DESTDIR=%{buildroot}
find %{buildroot}%{_mandir} ! -type d -print | perl -e '
while (<>)
{
$f=$_;
chop $f;
next if $f =~ /\.gz$/;
if (-l $f)
{
$f2=readlink($f);
unlink($f);
symlink "$f2.gz", "$f.gz";
}
else
{
system("gzip <$f >$f.gz");
unlink($f);
}
} '
mkdir htmldoc
cp %{buildroot}%{_datadir}/maildrop/html/* htmldoc
rm -rf %{buildroot}%{_datadir}/maildrop/html
rm -rf %{buildroot}%{_bindir}/deliverquota
rm -rf %{buildroot}%{_bindir}/mailbot
rm -rf %{buildroot}%{_bindir}/maildirmake
rm -rf %{buildroot}%{_mandir}/man1
rm -rf %{buildroot}%{_mandir}/man5
rm -rf %{buildroot}%{_mandir}/man7
rm -rf %{buildroot}%{_mandir}/man8
mkdir -p %{buildroot}%{_localstatedir}/log/maildrop
mkdir -p %{buildroot}%{_sysconfdir}/mail
install -m755 %{SOURCE1} %{buildroot}%{_sysconfdir}/mail/mailfilter.bz2
bunzip2 %{buildroot}%{_sysconfdir}/mail/mailfilter.bz2
install -m755 %{SOURCE2} %{buildroot}%{_bindir}/subscribeIMAP.sh.bz2
bunzip2 %{buildroot}%{_bindir}/subscribeIMAP.sh.bz2
#-------------------------------------------------------------
%files
#-------------------------------------------------------------
%defattr(-, bin, bin)
%{_datadir}/maildrop
%attr(0755,vpopmail,vchkpw) %dir %{_localstatedir}/log/maildrop
%attr(04755, root, vchkpw) %{_bindir}/maildrop
%attr(0755, root, vchkpw) %{_bindir}/lockmail
%attr(0755, root, root) %{_bindir}/makemime
%attr(0755, root, root) %{_bindir}/reformime
%attr(0755, root, root) %{_bindir}/reformail
%attr(0755, vpopmail, vchkpw) %{_bindir}/subscribeIMAP.sh
%attr(0600, vpopmail, vchkpw) %{_sysconfdir}/mail/mailfilter
%doc maildir/README.maildirquota.html maildir/README.maildirquota.txt
%doc COPYING README README.postfix INSTALL NEWS UPGRADE ChangeLog maildroptips.txt
%doc htmldoc/*
#-------------------------------------------------------------
%files devel
#-------------------------------------------------------------
%defattr(-, bin, bin)
%{_mandir}/man3/*
%{_includedir}/*
%{_libdir}/*
#-------------------------------------------------------------
%clean
#-------------------------------------------------------------
[ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot}
[ -d $RPM_BUILD_DIR/%{name}-%{pversion} ] && rm -rf $RPM_BUILD_DIR/%{name}-%{pversion}
[ -f %{_tmppath}/%{name}-%{pversion}-gcc ] && rm -f %{_tmppath}/%{name}-%{pversion}-gcc
#-------------------------------------------------------------
%changelog
#-------------------------------------------------------------
* Tue Dec 10 2019 John Pierce <[email protected]> - 2.0.3-1.3.11.kng
- Add pcre-devel to BuildRequires
* Fri Jun 17 2016 Mustafa Ramadhan <[email protected]> - 2.0.3-1.3.10.mr
- disable BuildRequires to courier-imap-toaster because use by dovecot-toaster also
* Sat Dec 20 2014 Mustafa Ramadhan <[email protected]> 2.0.3-1.3.9.mr
- cleanup spec based on toaster github (without define like build_cnt_60)
* Sat Jan 12 2013 Mustafa Ramadhan <[email protected]> 2.0.3-1.3.8.mr
- add build_cnt_60 and build_cnt_6064
* Fri Jun 12 2009 Jake Vickers <[email protected]> 2.0.3-1.3.8
- Added Fedora 11 support
- Added Fedora 11 x86_64 support
* Wed Jun 10 2009 Jake Vickers <[email protected]> 2.0.3-1.3.8
- Added Mandriva 2009 support
* Thu Apr 23 2009 Jake Vickers <[email protected]> 2.0.3-1.3.7
- Added Fedora 9 x86_64 and Fedora 10 x86_64 support
* Sat Feb 14 2009 Jake Vickers <[email protected]> 2.0.3-1.3.6
- Added Suse 11.1 support
* Mon Feb 09 2009 Jake Vickers <[email protected]> 2.0.3-1.3.6
- Added Fedora 9 and 10 support
* Sat Apr 14 2007 Nick Hemmesch <[email protected]> 2.0.3-1.3.5
- Add CentOS 5 i386 support
- Add CentOS 5 x86_64 support
* Tue Jan 02 2007 Erik A. Espinoza <[email protected]> 2.0.3-1.3.4
- Upgraded to maildrop 2.0.3
* Wed Nov 01 2006 Erik A. Espinoza <[email protected]> 2.0.2-1.3.3
- Added Fedora Core 6 support
* Sat Oct 28 2006 Erik A. Espinoza <[email protected]> 2.0.2-1.3.2
- Included fixed mailfilter script from Mark Samples
* Mon Jun 05 2006 Erik A. Espinoza <[email protected]> 2.0.2-1.3.1
- Upgraded to maildrop 2.0.2
- Added SuSE 10.1 support
* Sat May 13 2006 Nick Hemmesch <[email protected]> 1.8.1-1.2.11
- Add Fedora Core 5 support
* Sun Nov 20 2005 Nick Hemmesch <[email protected]> 1.8.1-1.2.10
- Add SuSE 10.0 and Mandrivs 2006.0 support
* Sat Oct 15 2005 Nick Hemmesch <[email protected]> 1.8.1-1.2.9
- Add Fedora Core 4 x86_64 support
* Sat Oct 01 2005 Nick Hemmesch <[email protected]> 1.8.1-1.2.8
- Add CentOS 4 x86_64 support
* Thu Aug 25 2005 Nick Hemmesch <[email protected]> 1.8.1-1.2.7
- Change file permissions for qmailtoaster
- Add preconfigured message filtering
* Fri Jul 01 2005 Nick Hemmesch <[email protected]> 1.8.1-1.2.6
- Add Fedora Core 4 support
* Fri Jun 03 2005 Torbjorn Turpeinen <[email protected]> 1.8.1-1.2.5
- Gnu/Linux Mandrake 10.0,10.1,10.2 support
* Tue May 31 2005 Nick Hemmesch <[email protected]> 1.8.1-1.2.4
- Update to maildrop-1.8.1
- Update to support CentOS 4 and Fedora Core 3
* Sun Jun 13 2004 Nick Hemmesch <[email protected]> 1.6.3-1.2.3
- Fix file permissions and ownerships so this actually works
- with qmail-scanner
* Thu Jun 03 2004 Nick Hemmesch <[email protected]> 1.6.3-1.2.2
- Add Fedora Core 2 support
* Thu Jun 03 2004 Nick Hemmesch <[email protected]> 1.6.3-1.2.1
- Update to maildrop-1.6.3
* Mon Dec 29 2003 Nick Hemmesch <[email protected]> 1.5.3-1.0.3
- Add Fedora Core 1 support
* Sun Nov 23 2003 Nick Hemmesch <[email protected]> 1.5.3-1.0.2
- Add Trustix 2.0 support
* Sat Apr 26 2003 Miguel Beccari <[email protected]> 1.5.3-1.0.1
- Last version 1.5.3
- Clean-ups on SPEC compilation banner, better gcc detects
- Detect gcc-3.2.3
- Red Hat Linux 9.0 support ([email protected])
- Gnu/Linux Mandrake 9.2 support
* Wed Apr 02 2003 Miguel Beccari <[email protected]> 1.5.2-1.0.1
- Conectiva 7.0 support
- Cleans up
* Sat Feb 15 2003 Nick Hemmesch <[email protected]> 1.4.0-1.0.3
- Support for Red Hat 8.0
* Sat Feb 01 2003 Miguel Beccari <[email protected]> 1.4.0-1.0.2
- Redo Macros to prepare supporting larger RPM OS.
We could be able to compile (and use) packages under every RPM based
distribution: we just need to write right requirements.
- Improved files section with right permissions and owners.
* Sat Jan 25 2003 Miguel Beccari <[email protected]> 1.4.0-1.0.1
- Added MDK 9.1 support
- Try to use gcc-3.2.1
- Added very little patch to compile with newest GLIBC
- Support dor new RPM-4.0.4
* Tue Oct 22 2002 Miguel Beccari <[email protected]> 1.4.0-1.0.0beta
- Toaster release