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

Revision 521, 13.9 KB checked in by daisuke, 14 years ago (diff)

import VineSeed package specs

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