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

Revision 805, 14.1 KB checked in by Takemikaduchi, 14 years ago (diff)

change spec file of gnome-2.30

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.15
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.bz2
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* Sun Apr 11 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.2.15-1
218- new upstream release
219- add BuildRequires: zlib-devel
220- change BuildRequires: gmime-devel -> gmime22-devel
221- drop Patch0
222
223* Mon Sep 14 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.2.11-1
224- initial build for Vine Linux
225
226* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 2.2.11-9
227- rebuilt with new openssl
228
229* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.11-8
230- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
231
232* Mon Jul 06 2009 Bernard Johnson <bjohnson@symetrix.com> - 2.2.11-7
233- fix left out ? in comparison
234
235* Sun Jul 05 2009 Bernard Johnson <bjohnson@symetrix.com> - 2.2.11-6
236- fix conditional comparison to be 0 for no value
237
238* Sun Jul 05 2009 Bernard Johnson <bjohnson@symetrix.com> - 2.2.11-5
239- patch to remove duplicate email boxes from being listed
240- consider cron file a config file
241- add -b option to cron job to rebuild body/header/envelope cache tables
242- change order of redirection in cron job
243- fix typo in dbmail-pop3d that causes LSB info to not be recognized
244- add provides for dbmail-sqlite
245- conditional to compile with gmime22 when needed
246
247* Thu Mar 19 2009 Bernard Johnson <bjohnson@symetrix.com> - 2.2.11-4
248- build agaist old gmime22 (bz #490316)
249
250* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.11-3
251- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
252
253* Thu Feb 05 2009 Bernard Johnson <bjohnson@symetrix.com> - 2.2.11-2
254- change BR from openssl to openssl-devel
255
256* Tue Feb 03 2009 Bernard Johnson <bjohnson@symetrix.com> - 2.2.11-1
257- v 2.2.11
258- updated summaries
259- fix bug in dbmail-pop3d init script
260
261* Mon Jul  7 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 2.2.9-2
262- fix conditional comparison
263
264* Thu Apr 24 2008 Bernard Johnson <bjohnson@symetrix.com> - 2.2.9-1
265- v 2.2.9
266
267* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.2.8-2
268- Autorebuild for GCC 4.3
269
270* Fri Jan 18 2008 Bernard Johnson <bjohnson@symetrix.com> - 2.2.8-1
271- 2.2.8-1
272
273* Thu Dec 06 2007 Release Engineering <rel-eng at fedoraproject dot org> - 2.2.7-2
274 - Rebuild for deps
275
276* Wed Oct 31 2007 Bernard Johnson <bjohnson@symetrix.com> - 2.2.7-1
277- 2.2.7-1
278- removed unused thread references patch
279- removed unused hup patch
280- removed unused gmime segv patch
281- license clarification
282- dbmail: Initscript Review (bz #246901)
283
284* Tue Aug 28 2007 Fedora Release Engineering <rel-eng at fedoraproject dot org> - 2.2.5-7
285- Rebuild for selinux ppc32 issue.
286
287* Tue Jul 03 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.5-6
288- patch to fix SEGV in dbmail-imapd
289
290* Sat Jun 23 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.5-5
291- patch to reopen logs files on -HUP
292- patch to send error when thread references requested
293- don't filter libdbmail.so*
294
295* Sat Jun 23 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.5-4
296- kill ld.so config
297- filter private libraries from provides (bz#245326)
298
299* Wed Jun 20 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.5-3
300- assign uid from package user registry (bz#244611)
301
302* Tue Jun 05 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.5-2
303- fix %%setup directory
304
305* Tue Jun 05 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.5-1
306- 2.2.5
307- change method of restarting daemons to that suggested in dbmail bug #600
308
309* Wed May 23 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.5-0.1.rc3
310- update to svn 2.2.5rc3
311- remove unneccessary patches
312- make sqlite default driver for better out of the box experience
313
314* Thu Mar 23 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.4-4
315- actually APPLY the short write patch
316
317* Thu Mar 22 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.4-3
318- patch to eliminate short write messages
319- use /sbin/service instead of running init scripts directly
320- requires for initscripts because daemon function in initfile requires it
321- modern tarballs do not require xmlto and asciidoc to build the docs
322- change conditionals to give everything sqlite support unless it's built in
323  the fedora buildsystem and %%{fedora} < 4
324
325* Tue Mar 20 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.4-2
326- patch to fix expunge bug
327
328* Tue Mar 13 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.4-1
329- v. 2.2.4
330- remove umask patch as it's included upstream now
331
332* Wed Feb 28 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.3-1
333- v. 2.2.3
334- tab removal in dbmail.conf no longer required
335- libsqlite.so in not built anymore unless specified, remove fix
336- libauth-ldap.so wasn't be built properly, fixed
337- rework umask patch, still want a stronger umask on log files
338
339* Tue Feb 20 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.2-9
340- fix source0 location
341
342* Tue Feb 20 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.2-8
343- change /etc/dbmail.conf to mode 0600
344- remove README.solaris, create README.fedora
345- add ref to README.fedora in %%desc
346
347* Tue Feb 20 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.2-7
348- make macro tests a little more readable
349- change dbmail-database to dbmail-database-driver; more descriptive
350- reduce gmime reqs to 2.1.19
351- specify sqlite req at 3 or greater
352
353* Sun Feb 18 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.2-6
354- remove bogus require for main package on mysql
355- virtual depend with exact %%{version}-%%{release}
356- remove extra mysql-devel BR
357- update description to include sqlite if built with sqlite
358- for mysql, 4.1.3 is required, not just 4.1
359- add requires for vixie-cron
360- move database specific docs to database subpackages
361
362* Sun Feb 18 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.2-5
363- fix perms on man pages
364
365* Sat Feb 17 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.2-4
366- fix a few things in scriptlets for consistency
367- send error output from logrotate HUP to /dev/null
368- explicitly require initscripts since they all use the daemon function
369- use explicit %%{version}-%%{release} for provides
370
371* Mon Feb 05 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.2-3
372- fix typo in logrotate script
373- patch umask for log files to be something more reasonable
374
375* Sat Jan 31 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.2-2
376- add some conditionals for not building sqlite on some product releases
377- substitude \t for tab in sed so that rpmlint doesn't complain about mixing
378  tabs and spaces
379
380* Sat Jan 31 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.2-1
381- add logrotate for dbmail.err
382- sub packages depend on %%{version}-%%{release}
383- update to 2.2.2
384- remove mailbox2dbmail patch
385- translate tabs to space in dbmail.conf
386- remove errno race patch
387
388* Sat Jan 13 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.1-7
389- revert to older fedora-usermgmt macros so rpm will work with older os
390
391* Fri Jan 12 2007 Bernard Johnson <bjohnson@symetrix.com> 2.2.1-6
392- add patch to fix errno race condition
393- don't delete libsort_sieve.so, it's a module
394
395* Thu Dec 14 2006 Bernard Johnson <bjohnson@symetrix.com> 2.2.1-5
396- fix my local svn that caused x bit on init files to sneak in
397
398* Thu Dec 14 2006 Bernard Johnson <bjohnson@symetrix.com> 2.2.1-4
399- cleanup of spec file
400- use fedora-usermgmt hooks
401- split and build all database libraries
402- kill modules/.libs from the module load path
403
404* Tue Dec 05 2006 Bernard Johnson <bjohnson@symetrix.com> 2.2.1-3
405- leave the right .so files for modules
406
407* Mon Nov 27 2006 Bernard Johnson <bjohnson@symetrix.com> 2.2.1-2
408- update with Fedora Extras style spec file
409
410* Sat Nov 18 2006 Bernard Johnson <bjohnson@symetrix.com> 2.2.1-1.sc
411- version 2.2.1
412
413* Mon Nov 15 2006 Bernard Johnson <bjohnson@symetrix.com> 2.2.0-4.sc
414- release 2.2.0-1.sc
Note: See TracBrowser for help on using the repository browser.