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

Revision 11867, 13.9 KB checked in by tomop, 5 years ago (diff)

uw-imap-2007f-3

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