Selaa lähdekoodia

quick hack for mod_jk connector

Christoph Schug 21 vuotta sitten
vanhempi
commit
66e953fbf4
1 muutettua tiedostoa jossa 34 lisäystä ja 1 poistoa
  1. 34 1
      tomcat4-adapter/tomcat4-adapter.spec

+ 34 - 1
tomcat4-adapter/tomcat4-adapter.spec

@@ -34,7 +34,11 @@ Class:        EVAL
 Group:        Web
 License:      Apache Software License 1.1
 Version:      4.1.30
-Release:      20040212
+Release:      20040415
+
+#   package options
+%option       with_webapp    yes
+%option       with_mod_jk    no
 
 #   list of sources
 Source0:      http://www.apache.org/dist/jakarta/tomcat-4/v%{version}/src/jakarta-tomcat-connectors-%{version}-src.tar.gz
@@ -69,6 +73,8 @@ AutoReqProv:  no
     %patch -p0
 
 %build
+    #   optionally build webapp connector
+%if "%{with_webapp}" == "yes"
     #   create installation tree
     cd webapp
 
@@ -79,6 +85,23 @@ AutoReqProv:  no
         --without-ant \
         --with-apr=%{l_prefix}
     %{l_make} %{l_mflags}
+%endif
+
+    #   optionally build mod_jk connector
+%if "%{with_mod_jk}" == "yes"
+    cd jk/native
+    libtoolize --force --automake --copy
+    aclocal
+    automake -a --foreign -i --copy
+    autoconf
+
+    ./configure \
+        --prefix=%{l_prefix} \
+        --with-apr=%{l_prefix} \
+        --with-apxs=%{l_prefix}/sbin/apxs \
+        --enable-EAPI
+    %{l_make} %{l_mflags} LIBTOOL=$PWD/libtool
+%endif
 
 %install
     rm -rf $RPM_BUILD_ROOT
@@ -94,10 +117,20 @@ AutoReqProv:  no
         %{SOURCE tomcat4-adapter.conf} \
         $RPM_BUILD_ROOT%{l_prefix}/etc/tomcat4-adapter/
 
+    #   optionally install webapp DSO
+%if "%{with_webapp}" == "yes"
     #   install DSO
     %{l_shtool} install -c -m 755 \
         webapp/build/mod_webapp.so \
         $RPM_BUILD_ROOT%{l_prefix}/libexec/tomcat4-adapter/
+%endif
+
+    #   optionally install mod_jk DSO
+%if "%{with_mod_jk}" == "yes"
+    %{l_shtool} install -c -m 755 \
+        jk/native/apache-1.3/mod_jk.so.0.0.0 \
+        $RPM_BUILD_ROOT%{l_prefix}/libexec/tomcat4-adapter/mod_jk.so
+%endif
 
     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}