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

Revision 12385, 13.9 KB checked in by tomop, 5 months ago (diff)

updated 3 packages

git-2.26.1-1

jwhois-4.0-8

uw-imap-2007f-4

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