Преглед на файлове

remove patch for DLZ-patch since it now applies directly to bind-9.2.2. fix DLZ-patch for non-bdb builds

Michael van Elst преди 22 години
родител
ревизия
3b9b655d8f
променени са 2 файла, в които са добавени 19 реда и са изтрити 3535 реда
  1. 0 3521
      bind/bind.patch
  2. 19 14
      bind/bind.spec

Файловите разлики са ограничени, защото са твърде много
+ 0 - 3521
bind/bind.patch


+ 19 - 14
bind/bind.spec

@@ -37,7 +37,7 @@ Distribution: OpenPKG [BASE]
 Group:        DNS
 License:      ISC
 Version:      %{V_bind}
-Release:      20030428
+Release:      20030430
 
 #   package options
 %option       with_dlz_mysql      no
@@ -64,7 +64,6 @@ Source7:      named.conf
 Source8:      rndc.conf
 Source9:      rc.bind
 Source10:     http://osdn.dl.sourceforge.net/bind-dlz/DLZ-%{V_dlz}.tar.gz
-Patch0:       bind.patch
 
 #   build information
 Prefix:       %{l_prefix}
@@ -99,27 +98,33 @@ Conflicts:    bind8
 %if "%{with_dlz}" == "yes"
     echo "WITH DLZ"
     %setup -q -T -D -a 10
-    %patch0 -p0
     #
-    #   adjust DLZ patch for bind-9.22
     %{l_patch} -p1 <dlz.patch
     #
     #   fix up DLZ link libraries for MYSQL
     %{l_shtool} subst \
-        -e '/-lmysqlclient/s;-lnsl;;' \
+        -e '/-lmysqlclient/s;-l\(nsl\|z\|crypt\|m\)\( \|"\);\2;g' \
         configure
 %endif
 %if "%{with_dlz_bdb}" != "yes"
-    #
-    #   dlzbdb utility breaks build if not configured
+    #   dlzbdb still doesn't link if not enabled
     %{l_shtool} subst \
-        -e '/^SUBDIRS =/s;dlzbdb ;;' \
+        -e 's;dlzbdb *;;g' \
         bin/Makefile.in
 %endif
 
 %build
+    cf=""
+    lf=""
+%if "%{with_dlz_mysql}" == "yes"
+    cf=`mysql_config --cflags`
+    cf=`eval echo $cf`
+    lf=`mysql_config --libs`
+    lf=`eval echo $lf`
+%endif
     CC="%{l_cc}" \
-    CFLAGS="%{l_cflags -O}" \
+    CFLAGS="%{l_cflags -O} $cf" \
+    LDFLAGS="%{l_ldflags} $lf" \
     ./configure \
         --prefix=%{l_prefix} \
         --sysconfdir=%{l_prefix}/etc/bind \
@@ -134,6 +139,11 @@ Conflicts:    bind8
 %else
         --with-dlz-postgres=no \
 %endif
+%if "%{with_dlz_bdb}" == "yes"
+        --with-dlz-bdb="%{l_prefix}" \
+%else
+        --with-dlz-bdb=no \
+%endif
 %if "%{with_dlz_filesystem}" == "yes"
         --with-dlz-filesystem=yes \
 %else
@@ -143,11 +153,6 @@ Conflicts:    bind8
         --with-dlz-stub=yes \
 %else
         --with-dlz-stub=no \
-%endif
-%if "%{with_dlz_bdb}" == "yes"
-        --with-dlz-bdb=yes \
-%else
-        --with-dlz-bdb=no \
 %endif
         --with-openssl=%{l_prefix} \
         --with-libtool \