소스 검색

make ODBC optional

Ralf S. Engelschall 21 년 전
부모
커밋
954b9bc3bd
1개의 변경된 파일17개의 추가작업 그리고 5개의 파일을 삭제
  1. 17 5
      freetds/freetds.spec

+ 17 - 5
freetds/freetds.spec

@@ -34,20 +34,27 @@ Class:        EVAL
 Group:        Database
 License:      LGPL
 Version:      0.62.4
-Release:      20040614
+Release:      20041125
 
 #   package options
+%option       with_odbc    no
 %option       with_shared  no
 
 #   list of sources
-Source0:      ftp://ftp.metalab.unc.edu/pub/Linux/ALPHA/freetds/stable/freetds-%{version}.tar.gz
+Source0:      ftp://ftp.ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-%{version}.tar.gz
 Patch0:       freetds.patch
 
 #   build information
 Prefix:       %{l_prefix}
 BuildRoot:    %{l_buildroot}
-BuildPreReq:  OpenPKG, openpkg >= 1.3.0, unixodbc
-PreReq:       OpenPKG, openpkg >= 1.3.0, unixodbc
+BuildPreReq:  OpenPKG, openpkg >= 20040130
+PreReq:       OpenPKG, openpkg >= 20040130
+BuildPreReq:  libiconv
+PreReq:       libiconv
+%if "%{with_odbc}" == "yes"
+BuildPreReq:  unixodbc
+PreReq:       unixodbc
+%endif
 AutoReq:      no
 AutoReqProv:  no
 
@@ -78,8 +85,13 @@ AutoReqProv:  no
         --sysconfdir=%{l_prefix}/etc/freetds \
         --includedir=%{l_prefix}/include/freetds \
         --libdir=%{l_prefix}/lib/freetds \
-        --with-unixodbc=%{l_prefix} \
         --with-tdsver=7.0 \
+%if "%{with_odbc}" == "yes"
+        --enable-odbc \
+        --with-unixodbc=%{l_prefix} \
+%else
+        --disable-odbc \
+%endif
 %if "%{with_shared}" == "yes"
         --enable-shared
 %else