| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175 |
- ##
- ## tomcat4-adapter.spec -- OpenPKG RPM Specification
- ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
- ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
- ## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/>
- ##
- ## Permission to use, copy, modify, and distribute this software for
- ## any purpose with or without fee is hereby granted, provided that
- ## the above copyright notice and this permission notice appear in all
- ## copies.
- ##
- ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
- ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- ## SUCH DAMAGE.
- ##
- %define V_apr 0.9.4
- # package information
- Name: tomcat4-adapter
- Summary: Apache Jakarta Tomcat Webserver Adapter
- URL: http://jakarta.apache.org/
- Vendor: Apache Software Foundation
- Packager: The OpenPKG Project
- Distribution: OpenPKG
- Class: EVAL
- Group: Web
- License: Apache Software License 1.1
- Version: 4.1.30
- Release: 20040909
- # package options
- %option with_mod_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
- Source1: tomcat4-adapter.conf
- Source2: http://www.apache.org/dist/apr/apr-%{V_apr}.tar.gz
- Patch0: tomcat4-adapter.patch
- # build information
- Prefix: %{l_prefix}
- BuildRoot: %{l_buildroot}
- BuildPreReq: OpenPKG, openpkg >= 20040130
- PreReq: OpenPKG, openpkg >= 20040130
- BuildPreReq: apache, perl, gcc, make
- BuildPreReq: autoconf, libtool
- %if "%{with_mod_jk}" == "yes"
- BuildPreReq: automake
- %endif
- AutoReq: no
- AutoReqProv: no
- %description
- Apache Jakarta Tomcat Webserver Adapter %{version} is a glue code
- between the Apache webserver and Tomcat. This package contains
- mod_webapp and optionally also mod_jk.
- %track
- prog tomcat4-adapter = {
- version = %{version}
- url = http://www.apache.org/dist/jakarta/tomcat-4/
- regex = (v\d+\.\d+\.\d+)
- url = http://www.apache.org/dist/jakarta/tomcat-4/__NEWVER__/src/
- regex = jakarta-tomcat-connectors-(__VER__)-src\.tar\.gz
- }
- %prep
- %setup -q -n jakarta-tomcat-connectors-%{version}-src
- %setup -q -T -D -a 2 -n jakarta-tomcat-connectors-%{version}-src
- %patch -p0
- %build
- tempdir=`pwd`/tmp
- # first build apr
- ( cd apr-%{V_apr}
- CC="%{l_cc}" \
- CFLAGS="%{l_cflags -O}" \
- ./configure \
- --prefix=%{l_prefix} \
- --includedir=%{l_prefix}/include/apr \
- --enable-layout=GNU \
- --disable-threads \
- --disable-shared
- %{l_make} %{l_mflags -O}
- ) || exit $?
- # install apr temporaryly
- ( cd apr-%{V_apr}
- rm -rf $tempdir/*
- %{l_make} %{l_mflags} install DESTDIR=$tempdir
- ) || exit $?
- # now ready to build the connector
- # optionally build mod_webapp connector
- %if "%{with_mod_webapp}" == "yes"
- ( cd webapp
- %{l_shtool} subst \
- -e "s;-l\\\$(APR_LIB);`$tempdir%{l_prefix}/bin/apr-config --link-ld --libs`;g" \
- apache-1.3/Makefile.in
- ./support/buildconf.sh
- ./configure \
- --prefix=%{l_prefix} \
- --disable-java \
- --without-ant \
- --with-apr=$tempdir%{l_prefix}
- %{l_shtool} subst \
- -e "s;\\(-I%{prefix}/include/apr\\);-I$tempdir%{l_prefix}/include/apr \\1;g" \
- -e "s;\\(-I%{prefix}/lib\\);-L$tempdir%{l_prefix}/lib \\1;g" \
- Makedefs
- %{l_make} %{l_mflags}
- ) || exit $?
- %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=$tempdir%{l_prefix} \
- --with-apxs=%{l_prefix}/sbin/apxs \
- --enable-EAPI
- %{l_make} %{l_mflags} LIBTOOL=$PWD/libtool
- ) || exit $?
- %endif
- %install
- rm -rf $RPM_BUILD_ROOT
- # create installation tree
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/etc/tomcat4-adapter \
- $RPM_BUILD_ROOT%{l_prefix}/libexec/tomcat4-adapter \
- $RPM_BUILD_ROOT%{l_prefix}/var/tomcat4-adapter
- # install config
- %{l_shtool} install -c -m 644 %{l_value -s -a} \
- %{SOURCE tomcat4-adapter.conf} \
- $RPM_BUILD_ROOT%{l_prefix}/etc/tomcat4-adapter/
- # optionally install mod_webapp DSO
- %if "%{with_mod_webapp}" == "yes"
- %{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 \
- $RPM_BUILD_ROOT%{l_prefix}/libexec/tomcat4-adapter/mod_jk.so
- %endif
- # determine installation files
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
- %files -f files
- %clean
- rm -rf $RPM_BUILD_ROOT
|