Michael van Elst пре 23 година
родитељ
комит
400f4cf1b9
1 измењених фајлова са 25 додато и 2 уклоњено
  1. 25 2
      sasl/sasl.spec

+ 25 - 2
sasl/sasl.spec

@@ -114,7 +114,6 @@ AutoReqProv:  no
     LIBS="$libs" \
     ./configure \
         --prefix=%{l_prefix} \
-        --exec-prefix=%{l_prefix} \
         --with-plugindir=%{l_prefix}/lib/sasl \
         --with-saslauthd=%{l_prefix}/var/sasl/saslauthd \
         --with-dbpath=%{l_prefix}/var/sasl/sasldb \
@@ -141,8 +140,9 @@ AutoReqProv:  no
 %else
         --without-mysql \
 %endif
-        --disable-shared \
+        --enable-shared \
         --enable-static \
+        --enable-staticdlopen \
         --disable-java \
         --disable-sample \
         --disable-krb4 \
@@ -150,6 +150,20 @@ AutoReqProv:  no
         --disable-otp \
         --without-des \
         --without-opie
+
+    #   trust me, libtool, I know what I am doing
+    %{l_shtool} subst \
+        -e 's;^\(deplibs_check_method=\).*;\1"pass_all";' \
+        libtool
+    #   do not reference static plugins
+    %{l_shtool} subst \
+        -e 's;^\(#ifndef PIC\);#define PIC\n\1;' \
+        lib/dlopen.c
+    #   do not pull static plugins into static library
+    %{l_shtool} subst \
+        -e '/^SASL_STATIC_OBJS/s;\.\./plugins/[^ ]* *;;g' \
+        lib/Makefile
+
     %{l_make} %{l_mflags}
     cd saslauthd
     %{l_make} %{l_mflags} testsaslauthd
@@ -157,6 +171,15 @@ AutoReqProv:  no
 %install
     rm -rf $RPM_BUILD_ROOT
     %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
+
+    #   remove libtool cruft
+    rm -f \
+        $RPM_BUILD_ROOT%{l_prefix}/lib/*.la \
+        $RPM_BUILD_ROOT%{l_prefix}/lib/*.so \
+        $RPM_BUILD_ROOT%{l_prefix}/lib/*.so.* \
+        $RPM_BUILD_ROOT%{l_prefix}/lib/sasl2/*.la \
+        $RPM_BUILD_ROOT%{l_prefix}/lib/sasl2/*.a
+
     %{l_shtool} mkdir -f -p -m 755 \
         $RPM_BUILD_ROOT%{l_prefix}/man/man8
     %{l_shtool} install -c -m 644 \