commit 4d46a2bf4068578ccb03cd888917e7887916d171
Author: Jakub Bogusz <[email protected]>
Date:   Sat Sep 21 10:16:56 2024 +0200

    - plainpwd bcond, consistent SSLTYPE passing

 imap.spec | 55 +++++++++++++++++++++++++++++++++++--------------------
 1 file changed, 35 insertions(+), 20 deletions(-)
---
diff --git a/imap.spec b/imap.spec
index 57439ef..b4b48b0 100644
--- a/imap.spec
+++ b/imap.spec
@@ -1,4 +1,8 @@
-%bcond_with    server  # build IMAP/POP servers
+#
+# Conditional build:
+%bcond_with    server          # IMAP/POP2/POP3 servers
+%bcond_with    plainpwd        # allow plaintext authentication in non-SSL/TLS 
sessions (insecure, non RFC-3501 compliant)
+
 Summary:       Support for IMAP network mail protocol
 Summary(es.UTF-8):     Provee soporte para los protocolos de mail IMAP y POP
 Summary(pl.UTF-8):     Obsługa protokołu pocztowego IMAP
@@ -57,6 +61,11 @@ BuildRoot:   %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define                sslcertsdir     /var/lib/openssl/certs
 %define                sslkeysdir      /var/lib/openssl/private
 %endif
+%if %{with plainpwd}
+%define                ssltype         unix
+%else
+%define                ssltype         nopwd
+%endif
 
 %define                skip_post_check_so      libc-client.so.%{version}.0
 
@@ -315,9 +324,14 @@ Statyczna biblioteka IMAP.
 cd docs/rfc
 ls rfc* > ../INDEX.rfc
 cd ../..
-rm -rf docs/{rfc,BUILD}
+%{__rm} -r docs/{rfc,BUILD}
 
 %build
+# configure ANSI build
+%{?with_plainpwd:echo y |} \
+%{__make} an \
+       SSLTYPE=%{ssltype}
+
 %if %{with server}
 %{__make} -j1 lnp \
        CC="%{__cc}" \
@@ -325,41 +339,42 @@ rm -rf docs/{rfc,BUILD}
        LDOPT="%{rpmldflags}" \
        SSLCERTS=%{sslcertsdir} \
        SSLKEYS=%{sslkeysdir} \
+       SSLTYPE=%{ssltype} \
        VERSION="%{version}"
+%else
+%{__make} -C c-client -j1 lnp \
+       CC="%{__cc}" \
+       GCCOPTLEVEL="%{rpmcflags} -pipe -fPIC" \
+       LDOPT="%{rpmldflags}" \
+       SSLTYPE=%{ssltype} \
+       VERSION="%{version}"
+%endif
 
 %{__mv} c-client/c-client.a libc-client.a
 
 %{__make} clean
 
+# configure ANSI build again after clean
+%{?with_plainpwd:echo y |} \
+%{__make} an \
+       SSLTYPE=%{ssltype}
+
+%if %{with server}
 %{__make} -j1 lnps \
        CC="%{__cc}" \
        GCCOPTLEVEL="%{rpmcflags} -pipe -fPIC" \
        LDOPT="%{rpmldflags}" \
        SSLCERTS=%{sslcertsdir} \
        SSLKEYS=%{sslkeysdir} \
+       SSLTYPE=%{ssltype} \
        VERSION="%{version}"
-%endif
-
-%if %{without server}
-%{__make} an SSLTYPE=nopwd
-
-cd c-client
-%{__make} -j1 lnp \
-       CC="%{__cc}" \
-       GCCOPTLEVEL="%{rpmcflags} -pipe -fPIC" \
-       LDOPT="%{rpmldflags}" \
-       VERSION="%{version}"
-
-%{__mv} c-client.a ../libc-client.a
-
-%{__make} clean
-
-%{__make} -j1 lnps \
+%else
+%{__make} -C c-client -j1 lnps \
        CC="%{__cc}" \
        GCCOPTLEVEL="%{rpmcflags} -pipe -fPIC" \
        LDOPT="%{rpmldflags}" \
+       SSLTYPE=%{ssltype} \
        VERSION="%{version}"
-cd ..
 %endif
 
 %install
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/imap.git/commitdiff/4d46a2bf4068578ccb03cd888917e7887916d171

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to