Blame SPECS/mod_jk.spec

5e542b
# Licensed to the Apache Software Foundation (ASF) under one or more
5e542b
# contributor license agreements.  See the NOTICE file distributed with
5e542b
# this work for additional information regarding copyright ownership.
5e542b
# The ASF licenses this file to You under the Apache License, Version 2.0
5e542b
# (the "License"); you may not use this file except in compliance with
5e542b
# the License.  You may obtain a copy of the License at
5e542b
#
5e542b
#     http://www.apache.org/licenses/LICENSE-2.0
5e542b
#
5e542b
# Unless required by applicable law or agreed to in writing, software
5e542b
# distributed under the License is distributed on an "AS IS" BASIS,
5e542b
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5e542b
# See the License for the specific language governing permissions and
5e542b
# limitations under the License.
5e542b
5e542b
%global pkg_name %{name}
5e542b
5e542b
%define with()          %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}
5e542b
%define without()       %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}
5e542b
%define bcond_with()    %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}
5e542b
%define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}
5e542b
5e542b
%bcond_with tools
5e542b
5e542b
%{!?aprconf: %{expand: %%define aprconf %{_bindir}/apr-config}}
5e542b
%{!?apxs: %{expand: %%define apxs %{_bindir}/apxs}}
5e542b
%{!?libtool: %{expand: %%define libtool %{_libdir}/apr-1/build/libtool}}
5e542b
5e542b
%define aprincludes %(%{aprconf} --includes 2>/dev/null)
5e542b
5e542b
# Update commitid and serial when new sources and release version are available
5e542b
%global commitid 1c14fc065bc133887fdde55cab954691b3dc3aac
5e542b
%global serial 22
5e542b
5e542b
Name:      mod_jk
5e542b
Epoch:     0
5e542b
Version:   1.2.48
5e542b
Release:   %{serial}%{?dist}
5e542b
Summary:   Tomcat mod_jk connector for Apache
5e542b
5e542b
Group:     Internet/WWW/Servers
5e542b
License:   ASL 2.0
5e542b
URL:       http://tomcat.apache.org
5e542b
Source0:   tomcat-connectors-%{commitid}.tar.gz
5e542b
Source1:   %{pkg_name}.conf.sample
5e542b
Source2:   uriworkermap.properties.sample
5e542b
Source3:   workers.properties.sample
5e542b
5e542b
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
5e542b
5e542b
Requires: httpd
5e542b
5e542b
BuildRequires: httpd-devel
5e542b
BuildRequires: apr-devel
5e542b
BuildRequires: apr-util-devel
5e542b
# 64 bit only natives on RHEL 9
5e542b
ExcludeArch:   i386 i686
5e542b
BuildRequires: perl
5e542b
BuildRequires: java-devel >= 1.6.0
5e542b
BuildRequires: jpackage-utils >= 0:1.5.38
5e542b
BuildRequires: libtool
5e542b
BuildRequires: xalan-j2 >= 2.7.0
5e542b
Obsoletes: mod_jk-ap24 < 0:1.2.48-21
5e542b
5e542b
%description
5e542b
Tomcat-connectors (mod_jk) is a project that provides web server
5e542b
connectors for the Apache Tomcat servlet engine.
5e542b
5e542b
%package manual
5e542b
Summary: Tomcat %{pkg_name} connector manual
5e542b
Group: Internet/WWW/Servers
5e542b
5e542b
%description manual
5e542b
Tomcat %{pkg_name} connector manual.
5e542b
5e542b
%if %with tools
5e542b
%package tools
5e542b
Group: Internet/Log Analysis
5e542b
Summary: Analysis and report tools for %{pkg_name}
5e542b
5e542b
%description tools
5e542b
Miscellaneous %{pkg_name} analysis and report tools.
5e542b
%endif
5e542b
5e542b
%prep
5e542b
%setup -q -n tomcat-connectors-%{commitid}
5e542b
5e542b
%{__sed} -i -e 's|^(APXSCPPFLAGS=.*)$|$1 %{aprincludes}|' \
5e542b
    native/common/Makefile.in
5e542b
5e542b
%build
5e542b
# Adding the "-z,now" option in LDFLAGS in order to gain
5e542b
# full RELRO support
5e542b
LDFLAGS="$LDFLAGS -Wl,-z,now"
5e542b
export LDFLAGS
5e542b
5e542b
set -e
5e542b
pushd native
5e542b
    ./buildconf.sh
5e542b
    %configure --with-apxs="%{_bindir}/apxs"
5e542b
    export LIBTOOL="`%{_bindir}/apxs -q LIBTOOL 2>/dev/null`"
5e542b
    # Handle old apxs (without -q LIBTOOL), eg Red Hat 8.0 and 9.
5e542b
    if test -z "$LIBTOOL"; then
5e542b
        LIBTOOL="%{libtool}"
5e542b
    fi
5e542b
    make %{?_smp_mflags} \
5e542b
    LIBTOOL="$LIBTOOL" \
5e542b
    EXTRA_CFLAGS="$RPM_OPT_FLAGS" \
5e542b
    EXTRA_CPPFLAGS="%{aprincludes}" \
5e542b
    RHBUILD_CFLAGS="-DJK_RH_BUILD=-%{serial}"
5e542b
popd
5e542b
5e542b
%install
5e542b
%{!?aprconf: %{expand: %%define aprconf %{_bindir}/apr-config}}
5e542b
%{!?apxs: %{expand: %%define apxs %{_bindir}/apxs}}
5e542b
%{!?libtool: %{expand: %%define libtool %{_libdir}/apr-1/build/libtool}}
5e542b
5e542b
%define aplibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
5e542b
%define apconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
5e542b
%define aprincludes %(%{aprconf} --includes 2>/dev/null)
5e542b
5e542b
%{__rm} -rf $RPM_BUILD_ROOT
5e542b
install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/
5e542b
install -p -m 0644 %{SOURCE1} %{SOURCE2} %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/
5e542b
%{__sed} -i -e 's|/usr/local/bin\b|%{_bindir}|' tools/reports/*.pl
5e542b
command="s|/usr/local/bin\b|%{_bindir}|"
5e542b
%{__sed} -i -e $command tools/reports/*.pl
5e542b
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}/%{aplibdir}
5e542b
%{__install} -p -m 0755 native/apache-2.0/%{pkg_name}.so \
5e542b
        ${RPM_BUILD_ROOT}/%{aplibdir}/%{pkg_name}.so
5e542b
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}/%{_bindir}
5e542b
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}/%{_var}/run/%{name}
5e542b
%{__install} -d -m 0700 ${RPM_BUILD_ROOT}/%{_var}/cache/httpd/%{name}
5e542b
5e542b
# for tools
5e542b
%if %with tools
5e542b
%{__install} -p -m 0755 tools/reports/*.pl ${RPM_BUILD_ROOT}/%{_bindir}
5e542b
%endif
5e542b
5e542b
%clean
5e542b
%{__rm} -rf $RPM_BUILD_ROOT
5e542b
5e542b
%files
5e542b
%{!?apxs: %{expand: %%define apxs %{_bindir}/apxs}}
5e542b
%define aplibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
5e542b
%defattr(-,root,root,-)
5e542b
%doc native/LICENSE native/NOTICE native/README.txt
5e542b
%{aplibdir}/*
5e542b
%config(noreplace) %{_sysconfdir}/httpd/conf.d/*
5e542b
%dir %{_var}/run/%{name}
5e542b
%attr(0700,apache,apache) %dir %{_var}/cache/httpd/%{name}
5e542b
5e542b
%if %with tools
5e542b
%files tools
5e542b
%defattr(-,root,root,-)
5e542b
%doc tools/reports/README.txt
5e542b
%{_bindir}/*
5e542b
%endif
5e542b
5e542b
%changelog
5e542b
* Tue Aug 24 2021 George Zaronikas <gzaronik@redhat.com> - 1.2.48-22
5e542b
- Specifying exact NVR in Obsoletes to avoid conflict with -ap24 subpackage
5e542b
- Resolves: #1963135
5e542b
5e542b
* Wed Aug 18 2021 George Zaronikas <gzaronik@redhat.com> - 1.2.48-21
5e542b
- Moving Obsoletes out of pkg description
5e542b
- Resolves: #1963135
5e542b
5e542b
* Mon Aug 16 2021 Coty Sutherland <csutherl@redhat.com> - 1.2.48-20
5e542b
- Cleanup spec file and remove .redhat-N suffix from release
5e542b
- Remove ap24 subpackage since we only need to build for one version of httpd
5e542b
5e542b
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 0:1.2.48-19.redhat_1.1
5e542b
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
5e542b
  Related: rhbz#1991688
5e542b
5e542b
* Wed Aug 04 2021 Coty Sutherland <csutherl@redhat.com> - 1.2.48-19
5e542b
- Update shm file location in conf
5e542b
5e542b
* Mon Aug 02 2021 Coty Sutherland <csutherl@redhat.com> - 1.2.48-18
5e542b
- Fix broken test
5e542b
5e542b
* Mon Aug 02 2021 Coty Sutherland <csutherl@redhat.com> - 1.2.48-17
5e542b
- Fix typo in tests.yml filename
5e542b
5e542b
* Fri Jul 30 2021 George Zaronikas <gzaronik@redhat.com> - 1.2.48-16
5e542b
- Resolves: #1963135