# Build mod_jk
#

CC=cc
export CC
CFLAGS="$HPUXCC_CFLAGS +Z -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED"
export CFLAGS

install -m 755 -d "$RPM_BUILD_ROOT$_libdir/httpd/modules"
install -m 755 -d "$RPM_BUILD_ROOT$_confdir/httpd/conf"
pushd native
./configure --with-apxs="/opt/hpws22/apache/bin/apxs"
test $? -ne 0 && exit 1
gmake
test $? -ne 0 && exit 1
install -m 755 apache-2.0/mod_jk.so "$RPM_BUILD_ROOT$_libdir/httpd/modules/"
popd
$__chrpath -r '.:$ORIGIN/../..' $RPM_BUILD_ROOT$_libdir/httpd/modules/*.so || true
for i in mod_jk.conf.sample workers.properties.sample
do
    install -m 644 $_sourcedir/$i "$RPM_BUILD_ROOT$_confdir/httpd/conf/"
done

files="$_libdir $_confdir"
files_doc="LICENSE NOTICE native/README.txt"
