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

add Tcl & ODBC support, fix SSL support

Ralf S. Engelschall преди 24 години
родител
ревизия
ddc3cbfeb3
променени са 1 файла, в които са добавени 46 реда и са изтрити 5 реда
  1. 46 5
      postgresql/postgresql.spec

+ 46 - 5
postgresql/postgresql.spec

@@ -24,8 +24,17 @@
 ##
 
 #   package options
+%ifndef       with_openssl
+%define       with_openssl  no
+%endif
+%ifndef       with_odbc
+%define       with_odbc     no
+%endif
 %ifndef       with_perl
-%define       with_perl  yes
+%define       with_perl     no
+%endif
+%ifndef       with_tcl
+%define       with_tcl      no
 %endif
 
 #   package information
@@ -38,7 +47,7 @@ Distribution: OpenPKG [BASE]
 Group:        Database
 License:      GPL
 Version:      7.2.2
-Release:      20020824
+Release:      20020914
 
 #   list of sources
 Source0:      ftp://ftp.postgresql.org/pub/source/v7.2/postgresql-%{version}.tar.gz
@@ -47,12 +56,23 @@ Source1:      rc.postgresql
 #   build information
 Prefix:       %{l_prefix}
 BuildRoot:    %{l_buildroot}
-BuildPreReq:  OpenPKG, openpkg >= 20020416, make, gcc, readline, openssl, flex, bison
+BuildPreReq:  OpenPKG, openpkg >= 20020416, make, gcc, readline, flex, bison
 PreReq:       OpenPKG, openpkg >= 20020416
+%if "%{with_openssl}" == "yes"
+BuildPreReq:  openssl
+%endif
+%if "%{with_odbc}" == "yes"
+BuildPreReq:  unixodbc
+PreReq:       unixodbc
+%endif
 %if "%{with_perl}" == "yes"
 BuildPreReq:  perl
 PreReq:       perl
 %endif
+%if "%{with_tcl}" == "yes"
+BuildPreReq:  tcl
+PreReq:       tcl
+%endif
 AutoReq:      no
 AutoReqProv:  no
 
@@ -63,7 +83,10 @@ AutoReqProv:  no
      open-source database available anywhere.
 
      Options:
+     --define 'with_openssl %{with_openssl}'
+     --define 'with_odbc %{with_odbc}'
      --define 'with_perl %{with_perl}'
+     --define 'with_tcl %{with_tcl}'
 
 %prep
     %setup -q
@@ -73,13 +96,31 @@ AutoReqProv:  no
 
 %build
     #    configure package
-    CC="%{l_cc}" \
-    CFLAGS="%{l_cflags -O}" \
+    CC="%{l_cc}"; export CC
+    CFLAGS="%{l_cflags -O}"; export CFLAGS
+    CPPFLAGS="%{l_cppflags}"; export CPPFLAGS
+    LDFLAGS="%{l_ldflags}"; export LDFLAGS
+%if "%{with_odbc}" == "yes"
+%endif
+%if "%{with_tcl}" == "yes"
+    CFLAGS="$CFLAGS -I%{l_prefix}/include/tcl"
+    LDFLAGS="$LDFLAGS -L%{l_prefix}/lib"
+%endif
     ./configure \
         --prefix=%{l_prefix} \
+%if "%{with_openssl}" == "yes"
         --with-openssl=%{l_prefix} \
+%endif
+%if "%{with_odbc}" == "yes"
+        --enable-odbc \
+        --with-unixodbc \
+        --with-odbcinst=%{l_prefix}/etc/unixodbc \
+%endif
 %if "%{with_perl}" == "yes"
         --with-perl \
+%endif
+%if "%{with_tcl}" == "yes"
+        --with-tcl \
 %endif
         --without-CXX \
         --disable-syslog