[uw-imap] _with_system_libc_client option (el6+) tight deps via %?_isa drop extraneous Requires(post, postun):

Rex Dieter rdieter at fedoraproject.org
Mon Jun 13 19:39:26 UTC 2011


commit 7b45f21dfdfd879cba0e1dd225015e5d9b46917f
Author: Rex Dieter <rdieter at fedoraproject.org>
Date:   Mon Jun 13 14:43:49 2011 -0500

    _with_system_libc_client option (el6+)
    tight deps via %?_isa
    drop extraneous Requires(post,postun): xinetd

 uw-imap.spec |   49 ++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 38 insertions(+), 11 deletions(-)
---
diff --git a/uw-imap.spec b/uw-imap.spec
index bb8224b..6e1ecbc 100644
--- a/uw-imap.spec
+++ b/uw-imap.spec
@@ -9,10 +9,14 @@
 %define _with_static 1
 %endif
 
+%if 0%{?rhel} > 5
+%define _with_system_libc_client 1
+%endif
+
 Summary: UW Server daemons for IMAP and POP network mail protocols
 Name:	 uw-imap 
 Version: 2007e
-Release: 12%{?dist}
+Release: 13%{?dist}
 
 # See LICENSE.txt, http://www.apache.org/licenses/LICENSE-2.0
 License: ASL 2.0 
@@ -59,17 +63,18 @@ Patch2: imap-2004a-doc.patch
 Patch5: imap-2007e-overflow.patch
 Patch9: imap-2007e-shared.patch
 Patch10: imap-2007e-authmd5.patch
+Patch11: imap-2007e-system_c_client.patch
 
 BuildRequires: krb5-devel
 BuildRequires: openssl-devel
 BuildRequires: pam-devel
 
 Requires: xinetd
-Requires(post): xinetd
-Requires(postun): xinetd
 Requires(post): openssl
 
-Requires: %{imap_libs} = %{version}-%{release}
+%if ! 0%{?_with_system_libc_client}
+Requires: %{imap_libs}%{?_isa} = %{version}-%{release}
+%endif
 
 %description
 The %{name} package provides UW server daemons for both the IMAP (Internet
@@ -95,7 +100,7 @@ Provides a common API for accessing mailboxes.
 %package devel
 Summary: Development tools for programs which will use the UW IMAP library
 Group: 	 Development/Libraries
-Requires: %{imap_libs} = %{version}-%{release}
+Requires: %{imap_libs}%{?_isa} = %{version}-%{release}
 # imap -> uw-imap rename
 Obsoletes: imap-devel < 1:%{version}
 %if "%{imap_libs}" == "libc-client"
@@ -121,7 +126,9 @@ which will use the UW C-client common API.
 %package utils
 Summary: UW IMAP Utilities to make managing your email simpler
 Group: 	 Applications/System 
-Requires: %{imap_libs} = %{version}-%{release}
+%if ! 0%{?_with_system_libc_client}
+Requires: %{imap_libs}%{?_isa} = %{version}-%{release}
+%endif
 # imap -> uw-imap rename
 Obsoletes: imap-utils < 1:%{version}
 %description utils
@@ -155,6 +162,10 @@ install -p -m644 %{SOURCE22} imap.pam
 %endif
 %endif
 
+%if 0%{?_with_system_libc_client}
+%patch11 -p1 -b .system_c_client
+%endif
+
 
 %build
 
@@ -181,9 +192,15 @@ EXTRALDFLAGS="$EXTRALDFLAGS" \
 EXTRAAUTHENTICATORS=gss \
 SPECIALS="GSSDIR=${GSSDIR} LOCKPGM=%{_sbindir}/mlock SSLCERTS=%{ssldir}/certs SSLDIR=%{ssldir} SSLINCLUDE=%{_includedir}/openssl SSLKEYS=%{ssldir}/private SSLLIB=%{_libdir}" \
 SSLTYPE=unix \
+%if 0%{?_with_system_libc_client}
+CCLIENTLIB=%{_libdir}/%{shlibname} \
+%else
 CCLIENTLIB=$(pwd)/c-client/%{shlibname} \
+%endif
 SHLIBBASE=%{soname} \
-SHLIBNAME=%{shlibname}
+SHLIBNAME=%{shlibname} \
+%if 0%{?_with_system_libc_client}
+%endif
 # Blank line
 
 
@@ -192,6 +209,7 @@ rm -rf $RPM_BUILD_ROOT
 
 mkdir -p $RPM_BUILD_ROOT%{_libdir}/
 
+%if ! 0%{?_with_system_libc_client}
 %if 0%{?_with_static:1}
 install -p -m644 ./c-client/c-client.a $RPM_BUILD_ROOT%{_libdir}/
 ln -s c-client.a $RPM_BUILD_ROOT%{_libdir}/libc-client.a
@@ -199,6 +217,11 @@ ln -s c-client.a $RPM_BUILD_ROOT%{_libdir}/libc-client.a
 
 install -p -m755 ./c-client/%{shlibname} $RPM_BUILD_ROOT%{_libdir}/
 
+# %%ghost'd c-client.cf
+touch c-client.cf
+install -p -m644 -D c-client.cf $RPM_BUILD_ROOT%{_sysconfdir}/c-client.cf
+%endif
+
 %if 0%{?_with_devel:1}
 ln -s %{shlibname} $RPM_BUILD_ROOT%{_libdir}/lib%{soname}.so
 
@@ -231,12 +254,9 @@ install -p -m644 -D %{SOURCE33} $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/ipop2
 install -p -m644 -D %{SOURCE34} $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/ipop3
 install -p -m644 -D %{SOURCE35} $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/pop3s
 
-## %ghost'd items 
-# *.pem files
+# %ghost'd *.pem files
 mkdir -p $RPM_BUILD_ROOT%{ssldir}/certs
 touch $RPM_BUILD_ROOT%{ssldir}/certs/{imapd,ipop3d}.pem
-# c-client.cf
-touch $RPM_BUILD_ROOT%{_sysconfdir}/c-client.cf
 
 
 # FIXME, do on first launch (or not at all?), not here -- Rex
@@ -300,12 +320,14 @@ rm -rf $RPM_BUILD_ROOT
 %attr(2755, root, mail) %{_sbindir}/mlock
 %{_mandir}/man1/*
 
+%if ! 0%{?_with_system_libc_client}
 %files -n %{imap_libs} 
 %defattr(-,root,root)
 %doc LICENSE.txt NOTICE SUPPORT 
 %doc docs/RELNOTES docs/*.txt
 %ghost %config(missingok,noreplace) %{_sysconfdir}/c-client.cf
 %{_libdir}/lib%{soname}.so.*
+%endif
 
 %if 0%{?_with_devel:1}
 %files devel
@@ -323,6 +345,11 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Mon Jun 13 2011 Rex Dieter <rdieter at fedoraproject.org> 2007e-13
+- _with_system_libc_client option (el6+) 
+- tight deps via %%?_isa
+- drop extraneous Requires(post,postun): xinetd
+
 * Mon Feb 07 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2007e-12
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 


More information about the scm-commits mailing list