rpms/cyrus-sasl/devel cyrus-sasl.spec,1.91,1.92
Jan F. Chadima
jfch2222 at fedoraproject.org
Wed Mar 10 06:37:35 UTC 2010
Author: jfch2222
Update of /cvs/pkgs/rpms/cyrus-sasl/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv2478
Modified Files:
cyrus-sasl.spec
Log Message:
Rewrite spec file, make corect CFLAGS, CPPFLAGS and LDFLAGS
Index: cyrus-sasl.spec
===================================================================
RCS file: /cvs/pkgs/rpms/cyrus-sasl/devel/cyrus-sasl.spec,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -p -r1.91 -r1.92
--- cyrus-sasl.spec 22 Feb 2010 09:23:38 -0000 1.91
+++ cyrus-sasl.spec 10 Mar 2010 06:37:35 -0000 1.92
@@ -9,7 +9,7 @@
Summary: The Cyrus SASL library
Name: cyrus-sasl
Version: 2.1.23
-Release: 9%{?dist}
+Release: 10%{?dist}
License: BSD
Group: System Environment/Libraries
# Source0 originally comes from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/;
@@ -190,41 +190,42 @@ krb5_prefix=`krb5-config --prefix`
if test x$krb5_prefix = x%{_prefix} ; then
krb5_prefix=
else
- CPPFLAGS="-I${krb5_prefix}/include"; export CPPFLAGS
- CFLAGS="-I${krb5_prefix}/include $CFLAGS"
- LDFLAGS="-L${krb5_prefix}/%{_lib}"; export LDFLAGS
+ CPPFLAGS="-I${krb5_prefix}/include $CPPFLAGS"; export CPPFLAGS
+ LDFLAGS="-L${krb5_prefix}/%{_lib} $LDFLAGS"; export LDFLAGS
fi
# Find OpenSSL.
LIBS="-lcrypt"; export LIBS
if pkg-config openssl ; then
CPPFLAGS="`pkg-config --cflags-only-I openssl` $CPPFLAGS"; export CPPFLAGS
- CFLAGS="`pkg-config --cflags openssl` $CFLAGS"; export CFLAGS
LDFLAGS="`pkg-config --libs-only-L openssl` $LDFLAGS"; export LDFLAGS
fi
-# Find the SQL libraries used needed by the SQL auxprop plugin.
-mysql_config=mysql_config
-pg_config=pg_config
-SQL_CFLAGS=`${mysql_config} --cflags`" -I"`${pg_config} --includedir`
-SQL_LIBS=`${mysql_config} --libs`" -L"`${pg_config} --libdir`" -lpq"
-SQL_CFLAGS=`eval echo "$SQL_CFLAGS" | sed -e 's,-I%{_includedir}[^/],,g' -e 's,-I%{_includedir}$,,g' -e 's,[[:blank:]]+, ,g'`
-SQL_LIBS=`eval echo "$SQL_LIBS" | sed -e 's,-L%{_libdir}[^/],,g' -e 's,-L%{_libdir}$,,g' -e 's,[[:blank:]]+, ,g'`
-SQL_LDFLAGS=`eval echo "$SQL_LIBS" | sed -e 's,-[^L][^ ]*,,g'`
-echo $SQL_LDFLAGS
-SQL_LIBS=`eval echo "$SQL_LIBS" | sed -e 's,-[^l][^ ]*,,g'`
-echo $SQL_LIBS
-
-cleanup_flags() {
- sed -r -e 's,-D_GNU_SOURCE(=[^[:blank:]]+)?,,g' \
- -e 's,-D_FILE_OFFSET_BITS=[[:digit:]]+,,g' \
- -e 's,-D_LARGEFILE_SOURCE(=[^[:blank:]]+)?,,g' \
- -e 's,[[:blank:]]+, ,g'
-}
-CFLAGS=`echo $CFLAGS $SQL_CFLAGS | cleanup_flags`; export CFLAGS
-CPPFLAGS=`echo $CPPFLAGS $SQL_CFLAGS | cleanup_flags`; export CPPFLAGS
-LDFLAGS=`echo $LDFLAGS $SQL_LDFLAGS | cleanup_flags`; export LDFLAGS
+# Find the MySQL libraries used needed by the SQL auxprop plugin.
+INC_DIR="`mysql_config --include`"
+if test x"$INC_DIR" != "x-I%{_includedir}"; then
+ CPPFLAGS="$INC_DIR $CPPFLAGS"; export CPPFLAGS
+fi
+LIB_DIR="`mysql_config --libs | sed -e 's,-[^L][^ ]*,,g' -e 's,^ *,,' -e 's, *$,,' -e 's, *, ,g'`"
+if test x"$LIB_DIR" != "x-L%{_libdir}"; then
+ LDFLAGS="$LIB_DIR $LDFLAGS"; export LDFLAGS
+fi
+# Find the PostgreSQL libraries used needed by the SQL auxprop plugin.
+INC_DIR="-I`pg_config --includedir`"
+if test x"$INC_DIR" != "x-I%{_includedir}"; then
+ CPPFLAGS="$INC_DIR $CPPFLAGS"; export CPPFLAGS
+fi
+LIB_DIR="-L`pg_config --libdir`"
+if test x"$LIB_DIR" != "x-L%{_libdir}"; then
+ LDFLAGS="$LIB_DIR $LDFLAGS"; export LDFLAGS
+fi
+
+CFLAGS="$CFLAGS $CPPFLAGS"; export CFLAGS
+
+echo "$CFLAGS"
+echo "$CPPFLAGS"
+echo "$LDFLAGS"
%configure \
--enable-shared --disable-static \
@@ -395,6 +396,9 @@ fi
%{_sbindir}/sasl2-shared-mechlist
%changelog
+* Wed Mar 10 2010 Jan F. Chadima <jchadima at redhat.com> - 2.1.23-10
+- Rewrite spec file, make corect CFLAGS, CPPFLAGS and LDFLAGS
+
* Mon Feb 22 2010 Jan F. Chadima <jchadima at redhat.com> - 2.1.23-9
- solve race condition (#566875)
More information about the scm-commits
mailing list