source: projects/specs/trunk/d/dbmail/dbmail-vl.spec @ 6424

Revision 6424, 14.2 KB checked in by Takemikaduchi, 12 years ago (diff)

new upstream release

Line 
1# http://trac.vinelinux.org/wiki/WellKnownUigGid
2%define         registry_uid  38
3%define         registry_name dbmail
4
5%define         services dbmail-imapd dbmail-pop3d dbmail-lmtpd dbmail-timsieved
6
7Name:           dbmail
8Version:        2.2.18
9Release:        1%{?_dist_release}
10Summary:        A database backend mail storage system
11Summary(ja):    メールストレージシステムのデータベースバックエンド
12
13Group:          System Environment/Daemons
14# db_getopot.c is licensed MIT
15License:        GPLv2+ and MIT
16URL:            http://www.dbmail.org
17Source0:        http://www.dbmail.org/download/2.2/dbmail-%{version}.tar.gz
18Source1:        dbmail-imapd
19Source2:        dbmail-pop3d
20Source3:        dbmail-lmtpd
21Source4:        dbmail-timsieved
22Source5:        dbmail.cron
23Source6:        dbmail.logrotate
24Source7:        README.dbmail
25Source10:       find-provides-dbmail.sh
26
27Patch0:         0001-backport-fix-to-prevent-showing-mailboxes-more-than.patch
28
29BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
30
31BuildRequires:  gmime22-devel >= 2.2.0
32
33BuildRequires:  fileutils, openssl-devel >= 0.9.7a
34BuildRequires:  glib2-devel >= 2.8
35BuildRequires:  libsieve-devel >= 2.1.13
36BuildRequires:  mysql-devel >= 4.1.3, postgresql-devel
37BuildRequires:  openldap-devel
38BuildRequires:  sqlite3-devel
39BuildRequires:  zlib-devel
40
41Requires:       glib2
42Requires:       initscripts
43Requires:       /usr/sbin/sendmail
44Requires(pre):  shadow-utils
45Requires(postun):shadow-utils
46Requires:       sqlite3
47Obsoletes:      dbmail-sqlite < 2.2.5
48Provides:       dbmail-sqlite = %{version}
49
50
51%description
52Dbmail is the name of a group of programs that enable the possiblilty of
53storing and retrieving mail messages from a database.
54
55Currently dbmail supports the following database backends:
56MySQL
57PostgreSQL
58SQLite
59
60Please see /usr/share/doc/dbmail-*/README.dbmail for specific information on
61installation and configuration.
62
63%prep
64%setup -q
65
66## %patch0 -p 1 -b .duplicate-email-boxes
67
68# we don't need README.solaris and we don't want it caught up in the %%doc
69# README* wildcard - but we do want our shiny new README.dbmail file to be
70# installed
71rm -f README.solaris
72install -p -m 644 %SOURCE7 .
73
74# make a couple of changes to the default dbmail.conf file:
75# 1. default driver/authdriver sqlite/sql (sqlite, if supported)
76# 2. effective uid/gid to dbmail/dbmail
77sed -i 's/\(^driver\W*=\)\(\W*$\)/\1 sqlite/' dbmail.conf
78sed -i -e 's,\(^db\W*=\)\(.*$\),\1 %{_localstatedir}/lib/dbmail/dbmail.db,'   \
79       -e 's/\(^authdriver\W*=\)\(\W*$\)/\1 sql/'                             \
80       -e 's/\(^EFFECTIVE_USER\W*=\)\(.*$\)/\1 dbmail/'                       \
81       -e 's/\(^EFFECTIVE_GROUP\W*=\)\(.*$\)/\1 dbmail/' dbmail.conf
82
83%define _use_internal_dependency_generator 0
84%define __find_provides %{SOURCE10}
85chmod +x %{__find_provides}
86
87%build
88%configure --disable-rpath \
89           --disable-static \
90           --with-ldap \
91           --with-mysql \
92           --with-pgsql \
93           --with-sqlite \
94           --with-sieve
95
96make %{?_smp_mflags}
97
98%install
99rm -rf $RPM_BUILD_ROOT
100make install DESTDIR=$RPM_BUILD_ROOT
101mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man{1,5,8}
102mkdir -p $RPM_BUILD_ROOT/%{_initrddir}
103mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/cron.daily
104mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d
105mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/lib/dbmail
106install -p -m 755 %SOURCE1 $RPM_BUILD_ROOT/%{_initrddir}
107install -p -m 755 %SOURCE2 $RPM_BUILD_ROOT/%{_initrddir}
108install -p -m 755 %SOURCE3 $RPM_BUILD_ROOT/%{_initrddir}
109install -p -m 755 %SOURCE4 $RPM_BUILD_ROOT/%{_initrddir}
110install -p -m 755 %SOURCE5 $RPM_BUILD_ROOT/%{_sysconfdir}/cron.daily/dbmail
111install -p -m 644 %SOURCE6 $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/dbmail
112install -p -m 600 dbmail.conf $RPM_BUILD_ROOT/%{_sysconfdir}/
113install -p -m 644 man/*1 $RPM_BUILD_ROOT/%{_mandir}/man1/
114install -p -m 644 man/*5 $RPM_BUILD_ROOT/%{_mandir}/man5/
115install -p -m 644 man/*8 $RPM_BUILD_ROOT/%{_mandir}/man8/
116# remove libtool archives and -devel type stuff (but leave loadable modules)
117find $RPM_BUILD_ROOT -name \*\.la -print | xargs rm -f
118rm -f $RPM_BUILD_ROOT/%{_libdir}/dbmail/libdbmail.so
119
120%clean
121rm -rf $RPM_BUILD_ROOT
122
123%pre
124/usr/sbin/groupadd -g %registry_uid -r %registry_name &> /dev/null || :
125/usr/sbin/useradd -u %registry_uid -r -s /sbin/nologin -d / -M           \
126                  -c "DBMail Daemon Account" -g %registry_name %registry_name    \
127                  &> /dev/null || :
128
129%post
130for s in %services; do
131  /sbin/chkconfig --add $s &> /dev/null || :
132done
133/sbin/ldconfig
134
135%preun
136if [ $1 = 0 ]; then
137  for s in %services; do
138    /sbin/service $s stop &> /dev/null || :
139    /sbin/chkconfig --del $s &> /dev/null || :
140  done
141fi
142exit 0
143
144%postun
145if [ "$1" -eq "0" ]; then
146  /sbin/ldconfig
147  /usr/sbin/userdel  %registry_name &> /dev/null || :
148  /usr/sbin/groupdel %registry_name &> /dev/null || :
149elif [ "$1" -ge "1" ]; then
150  for s in %services; do
151    /sbin/service $s condrestart &> /dev/null || :
152  done
153fi     
154
155%files
156%defattr(-,root,root,-)
157%doc AUTHORS BUGS ChangeLog COPYING INSTALL README* THANKS
158%{_sbindir}/*
159%{_mandir}/man1/*
160%{_mandir}/man5/*
161%{_mandir}/man8/*
162%dir %{_libdir}/dbmail
163%{_libdir}/dbmail/libauth_sql*
164%{_libdir}/dbmail/libdbmail*
165%{_libdir}/dbmail/libsort_sieve*
166%config(noreplace) %{_sysconfdir}/dbmail.conf
167%{_initrddir}/dbmail-*
168%config(noreplace) %{_sysconfdir}/cron.daily/dbmail
169%config(noreplace) %{_sysconfdir}/logrotate.d/dbmail
170%doc sql/sqlite/*
171%{_libdir}/dbmail/libsqlite*
172%dir %attr(0775,root,dbmail) /var/lib/dbmail
173
174%package auth-ldap
175Summary:        A database backed mail storage system - ldap authentication plugin
176Summary(ja):        A database backed mail storage system - ldap authentication plugin
177Group:          System Environment/Daemons
178Requires:       dbmail = %{version}-%{release}, openldap
179
180%description auth-ldap
181This is the auth-ldap libraries for authentication against a ldap server with
182dbmail.
183
184%files auth-ldap
185%defattr(-,root,root,-)
186%attr(-,root,root) %{_libdir}/dbmail/libauth_ldap*
187
188%package mysql
189Summary:        A database backed mail storage system - mysql backend
190Summary(ja):        A database backed mail storage system - mysql backend
191Group:          System Environment/Daemons
192Requires:       dbmail = %{version}-%{release}, mysql-server
193
194%description mysql
195This is the mysql libraries for dbmail.
196
197%files mysql
198%defattr(-,root,root,-)
199%doc sql/mysql/*
200%{_libdir}/dbmail/libmysql*
201
202%package pgsql
203Summary:        A database backed mail storage system - postgresql backend
204Summary(ja):        A database backed mail storage system - postgresql backend
205Group:          System Environment/Daemons
206Requires:       dbmail = %{version}-%{release}, postgresql-server
207
208%description pgsql
209This is the postgresql libraries for dbmail.
210
211%files pgsql
212%defattr(-,root,root,-)
213%doc sql/postgresql/*
214%{_libdir}/dbmail/libpgsql*
215
216%changelog
217* Sat Jun 16 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.2.18-1
218- update to 2.2.18
219
220* Sun Apr 11 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.2.15-1
221- new upstream release
222- add BuildRequires: zlib-devel
223- change BuildRequires: gmime-devel -> gmime22-devel
224- drop Patch0
225
226* Mon Sep 14 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.2.11-1
227- initial build for Vine Linux
228
229* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 2.2.11-9
230- rebuilt with new openssl
231
232* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.11-8
233- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
234
235* Mon Jul 06 2009 Bernard Johnson <bjohnson@symetrix.com> - 2.2.11-7
236- fix left out ? in comparison
237
238* Sun Jul 05 2009 Bernard Johnson <bjohnson@symetrix.com> - 2.2.11-6
239- fix conditional comparison to be 0 for no value
240
241* Sun Jul 05 2009 Bernard Johnson <bjohnson@symetrix.com> - 2.2.11-5
242- patch to remove duplicate email boxes from being listed
243- consider cron file a config file
244- add -b option to cron job to rebuild body/header/envelope cache tables
245- change order of redirection in cron job
246- fix typo in dbmail-pop3d that causes LSB info to not be recognized
247- add provides for dbmail-sqlite
248- conditional to compile with gmime22 when needed
249
250* Thu Mar 19 2009 Bernard Johnson <bjohnson@symetrix.com> - 2.2.11-4
251- build agaist old gmime22 (bz #490316)
252
253* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.11-3
254- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
255
256* Thu Feb 05 2009 Bernard Johnson <bjohnson@symetrix.com> - 2.2.11-2
257- change BR from openssl to openssl-devel
258
259* Tue Feb 03 2009 Bernard Johnson <bjohnson@symetrix.com> - 2.2.11-1
260- v 2.2.11
261- updated summaries
262- fix bug in dbmail-pop3d init script
263
264* Mon Jul  7 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 2.2.9-2
265- fix conditional comparison
266
267* Thu Apr 24 2008 Bernard Johnson <bjohnson@symetrix.com> - 2.2.9-1
268- v 2.2.9
269
270* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.2.8-2
271- Autorebuild for GCC 4.3
272
273* Fri Jan 18 2008 Bernard Johnson <bjohnson@symetrix.com> - 2.2.8-1
274- 2.2.8-1
275
276* Thu Dec 06 2007 Release Engineering <rel-eng at fedoraproject dot org> - 2.2.7-2
277 - Rebuild for deps
278
279* Wed Oct 31 2007 Bernard Johnson <bjohnson@symetrix.com> - 2.2.7-1
280- 2.2.7-1
281- removed unused thread references patch
282- removed unused hup patch
283- removed unused gmime segv patch
284- license clarification
285- dbmail: Initscript Review (bz #246901)
286
287* Tue Aug 28 2007 Fedora Release Engineering <rel-eng at fedoraproject dot org> - 2.2.5-7
288- Rebuild for selinux ppc32 issue.
289
290* Tue Jul 03 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.5-6
291- patch to fix SEGV in dbmail-imapd
292
293* Sat Jun 23 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.5-5
294- patch to reopen logs files on -HUP
295- patch to send error when thread references requested
296- don't filter libdbmail.so*
297
298* Sat Jun 23 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.5-4
299- kill ld.so config
300- filter private libraries from provides (bz#245326)
301
302* Wed Jun 20 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.5-3
303- assign uid from package user registry (bz#244611)
304
305* Tue Jun 05 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.5-2
306- fix %%setup directory
307
308* Tue Jun 05 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.5-1
309- 2.2.5
310- change method of restarting daemons to that suggested in dbmail bug #600
311
312* Wed May 23 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.5-0.1.rc3
313- update to svn 2.2.5rc3
314- remove unneccessary patches
315- make sqlite default driver for better out of the box experience
316
317* Thu Mar 23 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.4-4
318- actually APPLY the short write patch
319
320* Thu Mar 22 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.4-3
321- patch to eliminate short write messages
322- use /sbin/service instead of running init scripts directly
323- requires for initscripts because daemon function in initfile requires it
324- modern tarballs do not require xmlto and asciidoc to build the docs
325- change conditionals to give everything sqlite support unless it's built in
326  the fedora buildsystem and %%{fedora} < 4
327
328* Tue Mar 20 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.4-2
329- patch to fix expunge bug
330
331* Tue Mar 13 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.4-1
332- v. 2.2.4
333- remove umask patch as it's included upstream now
334
335* Wed Feb 28 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.3-1
336- v. 2.2.3
337- tab removal in dbmail.conf no longer required
338- libsqlite.so in not built anymore unless specified, remove fix
339- libauth-ldap.so wasn't be built properly, fixed
340- rework umask patch, still want a stronger umask on log files
341
342* Tue Feb 20 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.2-9
343- fix source0 location
344
345* Tue Feb 20 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.2-8
346- change /etc/dbmail.conf to mode 0600
347- remove README.solaris, create README.fedora
348- add ref to README.fedora in %%desc
349
350* Tue Feb 20 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.2-7
351- make macro tests a little more readable
352- change dbmail-database to dbmail-database-driver; more descriptive
353- reduce gmime reqs to 2.1.19
354- specify sqlite req at 3 or greater
355
356* Sun Feb 18 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.2-6
357- remove bogus require for main package on mysql
358- virtual depend with exact %%{version}-%%{release}
359- remove extra mysql-devel BR
360- update description to include sqlite if built with sqlite
361- for mysql, 4.1.3 is required, not just 4.1
362- add requires for vixie-cron
363- move database specific docs to database subpackages
364
365* Sun Feb 18 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.2-5
366- fix perms on man pages
367
368* Sat Feb 17 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.2-4
369- fix a few things in scriptlets for consistency
370- send error output from logrotate HUP to /dev/null
371- explicitly require initscripts since they all use the daemon function
372- use explicit %%{version}-%%{release} for provides
373
374* Mon Feb 05 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.2-3
375- fix typo in logrotate script
376- patch umask for log files to be something more reasonable
377
378* Sat Jan 31 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.2-2
379- add some conditionals for not building sqlite on some product releases
380- substitude \t for tab in sed so that rpmlint doesn't complain about mixing
381  tabs and spaces
382
383* Sat Jan 31 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.2-1
384- add logrotate for dbmail.err
385- sub packages depend on %%{version}-%%{release}
386- update to 2.2.2
387- remove mailbox2dbmail patch
388- translate tabs to space in dbmail.conf
389- remove errno race patch
390
391* Sat Jan 13 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.1-7
392- revert to older fedora-usermgmt macros so rpm will work with older os
393
394* Fri Jan 12 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.1-6
395- add patch to fix errno race condition
396- don't delete libsort_sieve.so, it's a module
397
398* Thu Dec 14 2006 Bernard Johnson <bjohnson@symetrix.com> 2.2.1-5
399- fix my local svn that caused x bit on init files to sneak in
400
401* Thu Dec 14 2006 Bernard Johnson <bjohnson@symetrix.com> 2.2.1-4
402- cleanup of spec file
403- use fedora-usermgmt hooks
404- split and build all database libraries
405- kill modules/.libs from the module load path
406
407* Tue Dec 05 2006 Bernard Johnson <bjohnson@symetrix.com> 2.2.1-3
408- leave the right .so files for modules
409
410* Mon Nov 27 2006 Bernard Johnson <bjohnson@symetrix.com> 2.2.1-2
411- update with Fedora Extras style spec file
412
413* Sat Nov 18 2006 Bernard Johnson <bjohnson@symetrix.com> 2.2.1-1.sc
414- version 2.2.1
415
416* Mon Nov 15 2006 Bernard Johnson <bjohnson@symetrix.com> 2.2.0-4.sc
417- release 2.2.0-1.sc
Note: See TracBrowser for help on using the repository browser.