source: projects/specs/trunk/u/uw-imap/uw-imap-vl.spec @ 521

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

import VineSeed package specs

Line 
1# Change the default connected directory from the user's home directory
2# to the named subdirectory of the user's home directory
3%define mail_subdirectory      Mail
4
5Summary: UW Server daemons for IMAP and POP network mail protocols
6Summary(ja): IMAP/POP ネットワークメールプロトコル用デーモン
7Name:    uw-imap
8Version: 2007e
9Release: 1%{?_dist_release}
10
11# See LICENSE.txt, http://www.apache.org/licenses/LICENSE-2.0
12License: ASL 2.0
13Group:   System Environment/Daemons
14URL:     http://www.washington.edu/imap/
15# Old (non-latest) releases live at  ftp://ftp.cac.washington.edu/imap/old/
16Source0: ftp://ftp.cac.washington.edu/imap/imap-%{version}.tar.gz
17BuildRoot: %{_tmppath}/%{name}-%{version}-root
18
19%define soname    c-client
20%define somajor   2007
21%define shlibname lib%{soname}.so.%{somajor}
22%define imap_libs lib%{soname}
23
24# FC4+ uses %%_sysconfdir/pki/tls/certs, previous releases used %%_datadir/ssl/certs
25%define sslcerts  %{expand:%(if [ -d %{_sysconfdir}/pki/tls/certs ]; then echo "%{_sysconfdir}/pki/tls/certs"; else echo "%{_datadir}/ssl/certs"; fi)}
26
27# imap -> uw-imap rename
28Obsoletes: imap < 1:%{version}
29
30Source10: c-client.cf
31
32# new pam setup, using new "include" feature
33Source21: imap.pam
34# legacy/old pam setup, using pam_stack.so
35Source22: imap-legacy.pam
36
37Source31: imap-xinetd
38Source32: imaps-xinetd
39Source33: ipop2-xinetd
40Source34: ipop3-xinetd
41Source35: pop3s-xinetd
42
43Patch1: imap-2007-paths.patch
44# See http://bugzilla.redhat.com/229781 , http://bugzilla.redhat.com/127271
45Patch2: imap-2004a-doc.patch
46Patch5: imap-2001a-overflow.patch
47Patch9: imap-2002e-shared.patch
48Patch10: imap-2002e-authmd5.patch
49
50BuildRequires: openssl-devel
51BuildRequires: pam-devel
52%if %{?_dist_release} == "vl5"
53BuildRequires: krb5-devel
54%endif
55
56# Prereq is shorter than separate Requires, Requires(post), Requires(postun)
57Prereq: xinetd
58Requires(post): openssl
59Requires: %{imap_libs} = %{version}-%{release}
60
61%description
62The %{name} package provides UW server daemons for both the IMAP (Internet
63Message Access Protocol) and POP (Post Office Protocol) mail access
64protocols.  The POP protocol uses a "post office" machine to collect
65mail for users and allows users to download their mail to their local
66machine for reading. The IMAP protocol allows a user to read mail on a
67remote machine without downloading it to their local machine.
68
69%package -n %{imap_libs}
70Summary: UW C-client mail library
71Summary(ja): UW メールライブラリ
72Group:   System Environment/Libraries
73Obsoletes: libc-client2004d < 1:2004d-2
74Obsoletes: libc-client2004e < 2004e-2
75Obsoletes: libc-client2004g < 2004g-7
76Obsoletes: libc-client2006 < 2006k-2
77
78%description -n %{imap_libs}
79Provides a common API for accessing mailboxes.
80
81%package devel
82Summary: Development tools for programs which will use the UW IMAP library
83Group:   Development/Libraries
84Requires: %{imap_libs} = %{version}-%{release}
85# imap -> uw-imap rename
86Obsoletes: imap-devel < 1:%{version}
87Provides: imap-devel < 1:%{version}
88Conflicts: libc-client-devel
89
90%description devel
91Contains the header files and static libraries for developing programs
92which will use the UW C-client common API.
93
94%package utils
95Summary: UW IMAP Utilities to make managing your email simpler
96Group:   Applications/Internet
97# imap -> uw-imap rename
98Obsoletes: imap-utils < 1:%{version}
99
100%description utils
101This package contains some utilities for managing UW IMAP email,including:
102* dmail : procmail Mail Delivery Module
103* mailutil : mail utility program
104* mtest : C client test program
105* tmail : Mail Delivery Module
106* mlock
107
108
109%prep
110%setup -q -n imap-%{version}
111%patch1 -p1 -b .paths
112%patch2 -p1 -b .doc
113
114%patch5 -p1 -b .overflow
115
116%patch9 -p1 -b .shared
117%patch10 -p1 -b .authmd5
118
119#if 0%{?fedora} > 4 || 0%{?rhel} > 4
120install -p -m644 %{SOURCE21} imap.pam
121#else
122#install -p -m644 %{SOURCE22} imap.pam
123#endif
124
125%build
126# Kerberos setup
127%if %{?_dist_release} == "vl5"
128test -f %{_sysconfdir}/profile.d/krb5-devel.sh && source %{_sysconfdir}/profile.d/krb5-devel.sh
129test -f %{_sysconfdir}/profile.d/krb5.sh && source %{_sysconfdir}/profile.d/krb5.sh
130GSSDIR=$(krb5-config --prefix)
131%endif
132
133# SSL setup, probably legacy-only, but shouldn't hurt -- Rex
134export EXTRACFLAGS="$EXTRACFLAGS $(pkg-config --cflags openssl 2>/dev/null)"
135# $RPM_OPT_FLAGS
136export EXTRACFLAGS="$EXTRACFLAGS $RPM_OPT_FLAGS"
137# jorton added these, I'll assume he knows what he's doing. :) -- Rex
138export EXTRACFLAGS="$EXTRACFLAGS -fno-strict-aliasing"
139%if %{?_dist_release} == "vl5"
140export EXTRACFLAGS="$EXTRACFLAGS -Wno-pointer-sign"
141%endif
142
143echo "y" | \
144make %{?_smp_mflags} lnp \
145EXTRACFLAGS="$EXTRACFLAGS" \
146EXTRALDFLAGS="$EXTRALDFLAGS" \
147%if %{?_dist_release} == "vl5"
148EXTRAAUTHENTICATORS=gss \
149SPECIALS="GSSDIR=${GSSDIR} LOCKPGM=%{_sbindir}/mlock SSLCERTS=%{sslcerts} SSLDIR=%{_datadir}/ssl SSLINCLUDE=%{_includedir}/openssl SSLLIB=%{_libdir}" \
150%else
151SPECIALS="LOCKPGM=%{_sbindir}/mlock SSLCERTS=%{sslcerts} SSLDIR=%{_datadir}/ssl SSLINCLUDE=%{_includedir}/openssl SSLLIB=%{_libdir}" \
152%endif
153SSLTYPE=unix \
154CCLIENTLIB=$(pwd)/c-client/%{shlibname} \
155SHLIBBASE=%{soname} \
156SHLIBNAME=%{shlibname}
157# Blank line
158
159
160%install
161rm -rf $RPM_BUILD_ROOT
162
163mkdir -p $RPM_BUILD_ROOT%{_libdir}/
164
165install -p -m644 ./c-client/c-client.a $RPM_BUILD_ROOT%{_libdir}/
166ln -s c-client.a $RPM_BUILD_ROOT%{_libdir}/libc-client.a
167
168install -p -m755 ./c-client/%{shlibname} $RPM_BUILD_ROOT%{_libdir}/
169ln -s %{shlibname} $RPM_BUILD_ROOT%{_libdir}/lib%{soname}.so
170
171mkdir -p $RPM_BUILD_ROOT%{_includedir}/imap/
172install -m644 ./c-client/*.h $RPM_BUILD_ROOT%{_includedir}/imap
173# Added linkage.c to fix (#34658) <mharris>
174install -m644 ./c-client/linkage.c $RPM_BUILD_ROOT%{_includedir}/imap
175install -m644 ./src/osdep/tops-20/shortsym.h $RPM_BUILD_ROOT%{_includedir}/imap
176
177mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8/
178install -p -m644 src/{ipopd/ipopd,imapd/imapd}.8 $RPM_BUILD_ROOT%{_mandir}/man8/
179mkdir -p $RPM_BUILD_ROOT%{_sbindir}
180install -p -m755 ipopd/ipop{2d,3d} $RPM_BUILD_ROOT%{_sbindir}/
181install -p -m755 imapd/imapd $RPM_BUILD_ROOT%{_sbindir}/
182install -p -m755 mlock/mlock $RPM_BUILD_ROOT%{_sbindir}/
183
184mkdir -p $RPM_BUILD_ROOT%{_bindir}/
185install -p -m755 dmail/dmail mailutil/mailutil mtest/mtest tmail/tmail $RPM_BUILD_ROOT%{_bindir}/
186mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1/
187install -p -m644 src/{dmail/dmail,mailutil/mailutil,tmail/tmail}.1 $RPM_BUILD_ROOT%{_mandir}/man1/
188
189install -p -m644 -D imap.pam $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/imap
190install -p -m644 -D imap.pam $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/pop
191
192install -p -m644 -D %{SOURCE31} $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/imap
193install -p -m644 -D %{SOURCE32} $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/imaps
194install -p -m644 -D %{SOURCE33} $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/ipop2
195install -p -m644 -D %{SOURCE34} $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/ipop3
196install -p -m644 -D %{SOURCE35} $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/pop3s
197
198# Generate ghost *.pem files
199mkdir -p $RPM_BUILD_ROOT%{sslcerts}/
200touch $RPM_BUILD_ROOT%{sslcerts}/{imapd,ipop3d}.pem
201
202# c-client.cf
203touch $RPM_BUILD_ROOT%{_sysconfdir}/c-client.cf
204
205# FIXME, do this on daemon startup -- Rex
206%post
207{
208cd %{sslcerts} &> /dev/null || :
209for CERT in imapd.pem ipop3d.pem ;do
210   if [ ! -e $CERT ];then
211      if [ -e stunnel.pem ];then
212         cp stunnel.pem $CERT &> /dev/null || :
213      elif [ -e Makefile ];then
214         make $CERT << EOF &> /dev/null || :
215--
216SomeState
217SomeCity
218SomeOrganization
219SomeOrganizationalUnit
220localhost.localdomain
221root@localhost.localdomain
222EOF
223      fi
224   fi
225done
226} || :
227/sbin/service xinetd reload > /dev/null 2>&1 || :
228
229%postun
230/sbin/service xinetd reload > /dev/null 2>&1 || :
231
232%post -n %{imap_libs} -p /sbin/ldconfig
233
234%postun -n %{imap_libs} -p /sbin/ldconfig
235
236%triggerpostun -- imap < 1:2004
237#if upgrading from old version, don't change/set (default) MailDir
238if [ -f %{_sysconfdir}/c-client.cf ]; then
239  if grep -q "^set mail-subdirectory %{mail_subdirectory}" %{_sysconfdir}/c-client.cf; then
240    sed -i -e 's/^set mail-subdirectory/\#set mail-subdirectory/g' \
241      %{_sysconfdir}/c-client.cf
242  fi
243fi
244
245%clean
246rm -rf $RPM_BUILD_ROOT
247
248
249%files
250%defattr(-,root,root)
251%doc docs/SSLBUILD
252%config %{_sysconfdir}/pam.d/imap
253%config %{_sysconfdir}/pam.d/pop
254%config(noreplace) %{_sysconfdir}/xinetd.d/imap
255%config(noreplace) %{_sysconfdir}/xinetd.d/ipop2
256%config(noreplace) %{_sysconfdir}/xinetd.d/ipop3
257# These need to be replaced (ie, can't use %%noreplace), or imaps/pop3s will fail after an upgrade
258%config %{_sysconfdir}/xinetd.d/imaps
259%config %{_sysconfdir}/xinetd.d/pop3s
260%attr(0600,root,root) %ghost %config(missingok,noreplace) %verify(not md5 size mtime) %{sslcerts}/imapd.pem
261%attr(0600,root,root) %ghost %config(missingok,noreplace) %verify(not md5 size mtime) %{sslcerts}/ipop3d.pem
262%config(noreplace) %{_sysconfdir}/c-client.cf
263%{_mandir}/man8/*
264%{_sbindir}/ipop2d
265%{_sbindir}/ipop3d
266%{_sbindir}/imapd
267
268%files utils
269%defattr(-,root,root)
270%{_bindir}/*
271%attr(2755, root, mail) %{_sbindir}/mlock
272%{_mandir}/man1/*
273
274%files -n %{imap_libs}
275%defattr(-,root,root)
276%doc docs/RELNOTES docs/*.txt
277%{_libdir}/lib%{soname}.so.*
278
279%files devel
280%defattr(-,root,root)
281%{_includedir}/imap/
282%{_libdir}/c-client.a
283%{_libdir}/libc-client.a
284%{_libdir}/lib%{soname}.so
285
286
287%changelog
288* Sat May 16 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2007e-1
289- new upstream release
290- built with krb5-devel (VineSeed)
291
292* Sun Sep 07 2008 Shu KONNO <owa@bg.wakwak.com> 2006b-2vl5
293- applied new versioning policy, spec in utf-8
294
295* Sat Jun  2 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2006b-1vl2
296- rebuilt with new toolchain
297
298* Fri Oct 20 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2006b-1vl1
299- updated to 2006b based on Fedora development
300
301* Mon May 29 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2004g-4vl2
302- changed package name
303
304* Wed Mar 15 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2004g-4vl1
305- rebuilt for Vine Linux
306
307* Wed Mar 1 2006 Rex Dieter <rexdieter[AT]users.sf.net>
308- fc5: gcc/glibc respin
309
310* Thu Nov 17 2005 Rex Dieter <rexdieter[AT]users.sf.net> 2004g-4
311- use pam's "include" feature on fc5
312- cleanup %%doc handling, remove useless bits
313
314* Thu Nov 17 2005 Rex Dieter <rexdieter[AT]users.sf.net> 2004g-3
315- omit trailing whitespace in default c-client.cf
316
317* Wed Nov 16 2005 Rex Dieter <rexdieter[AT]users.sf.net> 2004g-2
318- rebuild for new openssl
319
320* Mon Sep 26 2005 Rex Dieter <rexdieter[AT]users.sf.net> 2004g-1
321- imap-2004g
322- /etc -> %%_sysconfdir
323- use %%{?_smp_mflags}
324
325* Mon Aug 15 2005 Rex Dieter <rexdieter[AT]users.sf.net> 2004e-1
326- imap-2004e
327- rename: imap -> uw-imap (yay, we get to drop the Epoch)
328- sslcerts=%{_sysconfdir}/pki/tls/certs if exists, else /usr/share/ssl/certs
329
330* Fri Apr 29 2005 Rex Dieter <rexdieter[AT]users.sf.net> 1:2004d-1
331- 2004d
332- imap-libs -> lib%%{soname}%%{version} (ie, libc-client2004d), so we can
333  have multiple versions (shared-lib only) installed
334- move mlock to -utils.
335- revert RFC2301, locks out too many folks where SSL is unavailable
336
337* Thu Apr 28 2005 Rex Dieter <rexdieter[AT]users.sf.net> 1:2004-0.fdr.11.c1
338- change default driver from mbox to mbx
339- comply with RFC 3501 security: Unencrypted plaintext passwords are prohibited
340
341* Fri Jan 28 2005 Rex Dieter <rexdieter[AT]users.sf.net> 1:2004-0.fdr.10.c1
342- imap-2004c1 security release:
343  http://www.kb.cert.org/vuls/id/702777
344
345* Thu Jan 20 2005 Rex Dieter <rexdieter[AT]users.sf.net> 1:2004-0.fdr.9.c
346- imap2004c
347- -utils: dmail,mailutil,tmail
348- -libs: include mlock (so it's available for other imap clients, like pine)
349- remove extraneous patches
350- %%_sysconfigdir/c-client.cf: use to set MailDir (but don't if upgrading from
351  an older version (ie, if folks don't want/expect a change in behavior)
352
353* Mon Sep 13 2004 Rex Dieter <rexdieter at sf.net. 1:2004-0.fdr.8.a
354- don't use mailsubdir patch (for now)
355
356* Wed Aug 11 2004 Rex Dieter <rexdieter at sf.net> 1:2004-0.fdr.7.a
357- mailsubdir patch (default to ~/Mail instead of ~)
358
359* Fri Jul 23 2004 Rex Dieter <rexdieter at sf.net> 1:2004-0.fdr.6.a
360- remove Obsoletes/Provides: libc-client (they can, in fact, co-xist)
361- -devel: remove O/P: libc-client-devel -> Conflicts: libc-client-devel
362
363* Thu Jul 16 2004 Rex Dieter <rexdieter at sf.net> 1:2004-0.fdr.5.a
364- imap2004a
365
366* Tue Jul 13 2004 Rex Dieter <rexdieter at sf.net> 1:2004-0.fdr.4
367- -devel: Req: %%{name}-libs
368
369* Tue Jul 13 2004 Rex Dieter <rexdieter at sf.net> 1:2004-0.fdr.3
370- previous imap pkgs had Epoch: 1, we need it too.
371
372* Wed Jul 07 2004 Rex Dieter <rexdieter at sf.net> 2004-0.fdr.2
373- use %%version as %%somajver (like how openssl does it)
374
375* Wed Jul 07 2004 Rex Dieter <rexdieter at sf.net> 2004-0.fdr.1
376- imap-2004
377- use mlock, if available.
378- Since libc-client is an attrocious name choice, we'll trump it,
379  and provide imap, imap-libs, imap-devel instead (redhat bug #120873)
380
381* Wed Apr 07 2004 Kaj J. Niemi <kajtzu@fi.basen.net> 2002e-4
382- Use CFLAGS (and RPM_OPT_FLAGS) during the compilation
383- Build the .so through gcc instead of directly calling ld
384
385* Fri Mar  5 2004 Joe Orton <jorton@redhat.com> 2002e-3
386- install .so with permissions 0755
387- make auth_md5.c functions static to avoid symbol conflicts
388- remove Epoch: 0
389
390* Tue Mar 02 2004 Kaj J. Niemi <kajtzu@fi.basen.net> 0:2002e-2
391- "lnp" already uses RPM_OPT_FLAGS
392- have us conflict with imap, imap-devel
393
394* Tue Mar  2 2004 Joe Orton <jorton@redhat.com> 0:2002e-1
395- add post/postun, always use -fPIC
396
397* Tue Feb 24 2004 Kaj J. Niemi <kajtzu@fi.basen.net>
398- Name change from c-client to libc-client
399
400* Sat Feb 14 2004 Kaj J. Niemi <kajtzu@fi.basen.net> 0:2002e-0.1
401- c-client 2002e is based on imap-2002d
402- Build shared version, build logic is copied from FreeBSD net/cclient
403
Note: See TracBrowser for help on using the repository browser.