Created
August 19, 2020 10:43
-
-
Save robertoschwald/3317b4d777f44260fef86c5059955ffc to your computer and use it in GitHub Desktop.
mod_jk RPM Spec file for CentOS8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%{!?apxs: %{expand: %%define apxs %{_bindir}/apxs}} | |
%define httpd httpd | |
Name: mod_jk | |
Version: 1.2.48 | |
Release: 1%{?org_tag}%{?dist} | |
Epoch: 0 | |
Summary: Tomcat mod_jk connector for Apache | |
License: Apache License | |
Group: Internet/WWW/Servers | |
URL: http://tomcat.apache.org/ | |
Source0: http://www.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-connectors-%{version}-src.tar.gz | |
Patch1: httpd-jk.conf-1.2.48.patch | |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | |
BuildRequires: %{httpd}-devel, autoconf, automake, libtool, make | |
Requires: %{httpd} | |
Obsoletes: mod_jk < %{epoch}:%{version}-%{release} | |
Provides: mod_jk = %{epoch}:%{version}-%{release} | |
Obsoletes: tomcat-mod < %{epoch}:%{version}-%{release} | |
%description | |
mod_jk allows Apache to serve as a front-end for Tomcat, GlassFish or any other | |
AJP1.3-enabled application server, with optional load-balancing. | |
# --- sub-package for selinux support --- | |
%package selinux | |
Summary: Tomcat mod_jk connector for Apache SELinux support | |
Requires: %name = %version-%release | |
Requires: policycoreutils, libselinux-utils | |
Requires(post): policycoreutils, gawk | |
Requires(postun): policycoreutils | |
%description selinux | |
This package contains SELinux support for the httpd-mod_jk package. | |
################################################################################# | |
# common | |
################################################################################# | |
# httpd does not work with position independent executables (pie flag set) | |
# So we reconfigure the macro | |
%global _hardening_ldflags -Wl,-z,now | |
%prep | |
%setup -q -n tomcat-connectors-%{version}-src | |
%patch1 -p0 -b .org | |
(cd native && %{__libtoolize} --copy --force) | |
%build | |
export apxs=%{_httpd_apxs} | |
cd native | |
autoreconf -fi | |
%configure \ | |
--with-apxs=%{apxs} \ | |
make %{?_smp_mflags} | |
cd .. | |
%install | |
rm -rf %{buildroot} | |
mkdir -p %{buildroot}/%{httpd}/modules | |
mkdir -p %{buildroot}/%{httpd}/conf.d/ | |
mkdir -p %{buildroot}/var/cache/httpd | |
%{__install} -D -m 755 native/apache-2.0/mod_jk.so %{buildroot}/%{_sysconfdir}/%{httpd}/modules/mod_jk.so | |
%{__install} -D -m 644 conf/workers.properties -D %{buildroot}/%{_sysconfdir}/%{httpd}/conf.d/workers.properties | |
%{__install} -D -m 644 conf/httpd-jk.conf -D %{buildroot}/%{_sysconfdir}/%{httpd}/conf.d/mod_jk.conf | |
################################################################################# | |
# files | |
################################################################################# | |
%files | |
%doc LICENSE NOTICE conf/workers.properties | |
%doc native/BUILDING.txt native/README.txt native/TODO.txt | |
%config(noreplace) /%{_sysconfdir}/%{httpd}/conf.d/mod_jk.conf | |
%config(noreplace) /%{_sysconfdir}/%{httpd}/conf.d/workers.properties | |
/%{_sysconfdir}/%{httpd}/modules/mod_jk.so | |
%files selinux | |
################################################################################# | |
%post selinux | |
restorecon %{_sysconfdir}/%{httpd}/modules/mod_jk.so > /dev/null 2>&1 | |
restorecon /var/cache/httpd > /dev/null 2>&1 | |
################################################################################# | |
%changelog | |
* Tue Aug 18 2020 Robert Oschwald <[email protected]> - 0:1.2.48-1 | |
- Version for Centos8 | |
- Need to use without -pie flag, otherwise glibc does not load dynamic lib | |
* Wed Apr 20 2016 Robert Oschwald <[email protected]> - 0:1.2.41-2 | |
- Use /var/cache/httpd for shm file due to SELinux in CentOS7 | |
* Wed Apr 20 2016 Robert Oschwald <[email protected]> 0:1.2.41-1 | |
- Version 1.2.41 | |
- Added selinux sub-package for correct labling of mod_jk.so | |
* Tue Jun 18 2013 Vicente Dominguez <twitter:@vicendominguez> 1.2.37 | |
- Initial release |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks!