Преглед изворни кода

provide options for the OpenSSL build variants

Ralf S. Engelschall пре 23 година
родитељ
комит
8f520ee772
1 измењених фајлова са 27 додато и 4 уклоњено
  1. 27 4
      openssl/openssl.spec

+ 27 - 4
openssl/openssl.spec

@@ -33,7 +33,12 @@ Distribution: OpenPKG [CORE]
 Group:        Cryptography
 License:      BSD-style
 Version:      0.9.7b
-Release:      20030411
+Release:      20030530
+
+#   package options
+%option       with_zlib     no
+%option       with_idea     no
+%option       with_threads  no
 
 #   list of sources
 Source0:      ftp://ftp.openssl.org/source/openssl-%{version}.tar.gz
@@ -57,8 +62,14 @@ AutoReqProv:  no
 
 %prep
     %setup -q
-    %{l_shtool} subst -e 's;-m486;-march=i486;g' Configure
-    %{l_shtool} subst -e 's;test "$OSTYPE" = msdosdjgpp;true;' util/point.sh
+    %{l_shtool} subst \
+        -e 's;-m486;-march=i486;g' \
+        -e 's;-DZLIB;-I%{l_prefix}/include -DZLIB;' \
+        -e 's;-lz;-L%{l_prefix}/lib -lz;' \
+        Configure
+    %{l_shtool} subst \
+        -e 's;test "$OSTYPE" = msdosdjgpp;true;' \
+        util/point.sh
 
 %build
     %{l_prefix}/bin/perl util/perlpath.pl %{l_prefix}/bin/perl
@@ -66,7 +77,19 @@ AutoReqProv:  no
     ./config \
         --prefix=%{l_prefix} \
         --openssldir=%{l_prefix}/etc/openssl \
-        no-idea no-threads
+%if "%{with_zlib}" == "yes"
+        zlib \
+%else
+        no-zlib \
+%endif
+%if "%{with_idea}" != "yes"
+        no-idea \
+%endif
+%if "%{with_threads}" == "yes"
+        threads
+%else
+        no-threads
+%endif
     %{l_make} %{l_mflags}
 
 %install