2020-10-15 19:57:56 +00:00
|
|
|
################################################################################
|
|
|
|
Name: tomcatjss
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
Summary: JSS Connector for Apache Tomcat
|
|
|
|
URL: http://www.dogtagpki.org/wiki/TomcatJSS
|
|
|
|
License: LGPLv2+
|
|
|
|
BuildArch: noarch
|
|
|
|
|
2021-06-26 00:02:13 +00:00
|
|
|
# For development (i.e. unsupported) releases, use x.y.z-0.n.<phase>.
|
|
|
|
# For official (i.e. supported) releases, use x.y.z-r where r >=1.
|
|
|
|
Version: 8.0.0
|
|
|
|
Release: 0.1.alpha1%{?_timestamp}%{?_commit_id}%{?dist}
|
|
|
|
%global _phase -alpha1
|
2020-10-15 19:57:56 +00:00
|
|
|
|
|
|
|
# To generate the source tarball:
|
|
|
|
# $ git clone https://github.com/dogtagpki/tomcatjss.git
|
|
|
|
# $ cd tomcatjss
|
|
|
|
# $ git archive \
|
|
|
|
# --format=tar.gz \
|
|
|
|
# --prefix tomcatjss-VERSION/ \
|
|
|
|
# -o tomcatjss-VERSION.tar.gz \
|
|
|
|
# <version tag>
|
|
|
|
Source: https://github.com/dogtagpki/tomcatjss/archive/v%{version}%{?_phase}/tomcatjss-%{version}%{?_phase}.tar.gz
|
|
|
|
|
|
|
|
# To create a patch for all changes since a version tag:
|
|
|
|
# $ git format-patch \
|
|
|
|
# --stdout \
|
|
|
|
# <version tag> \
|
|
|
|
# > tomcatjss-VERSION-RELEASE.patch
|
|
|
|
# Patch: tomcatjss-VERSION-RELEASE.patch
|
|
|
|
|
2021-06-26 00:02:13 +00:00
|
|
|
################################################################################
|
|
|
|
# Java
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
%define java_devel java-11-openjdk-devel
|
|
|
|
%define java_headless java-11-openjdk-headless
|
|
|
|
%define java_home /usr/lib/jvm/jre-11-openjdk
|
|
|
|
|
2020-10-15 19:57:56 +00:00
|
|
|
################################################################################
|
|
|
|
# Build Dependencies
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
# jpackage-utils requires versioning to meet both build and runtime requirements
|
|
|
|
# jss requires versioning to meet both build and runtime requirements
|
|
|
|
# tomcat requires versioning to meet both build and runtime requirements
|
|
|
|
|
|
|
|
# Java
|
|
|
|
BuildRequires: ant
|
2021-01-14 15:03:54 +00:00
|
|
|
BuildRequires: apache-commons-lang3
|
2021-06-26 00:02:13 +00:00
|
|
|
BuildRequires: %{java_devel}
|
2020-10-15 19:57:56 +00:00
|
|
|
BuildRequires: jpackage-utils >= 0:1.7.5-15
|
|
|
|
|
|
|
|
# SLF4J
|
|
|
|
BuildRequires: slf4j
|
|
|
|
BuildRequires: slf4j-jdk14
|
|
|
|
|
|
|
|
# JSS
|
2021-06-26 00:02:13 +00:00
|
|
|
BuildRequires: jss >= 5.0.0
|
2020-10-15 19:57:56 +00:00
|
|
|
|
|
|
|
# Tomcat
|
2021-01-14 15:03:54 +00:00
|
|
|
%if 0%{?rhel} && ! 0%{?eln}
|
2020-10-15 19:57:56 +00:00
|
|
|
BuildRequires: pki-servlet-engine >= 1:9.0.7
|
|
|
|
%else
|
|
|
|
BuildRequires: tomcat >= 1:9.0.7
|
|
|
|
%endif
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Runtime Dependencies
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
# Java
|
2021-01-14 15:03:54 +00:00
|
|
|
Requires: apache-commons-lang3
|
2021-06-26 00:02:13 +00:00
|
|
|
Requires: %{java_headless}
|
2020-10-15 19:57:56 +00:00
|
|
|
Requires: jpackage-utils >= 0:1.7.5-15
|
|
|
|
|
|
|
|
# SLF4J
|
|
|
|
Requires: slf4j
|
|
|
|
Requires: slf4j-jdk14
|
|
|
|
|
|
|
|
# JSS
|
2021-06-26 00:02:13 +00:00
|
|
|
Requires: jss >= 5.0.0
|
2020-10-15 19:57:56 +00:00
|
|
|
|
|
|
|
# Tomcat
|
2021-01-14 15:03:54 +00:00
|
|
|
%if 0%{?rhel} && ! 0%{?eln}
|
2020-10-15 19:57:56 +00:00
|
|
|
Requires: pki-servlet-engine >= 1:9.0.7
|
|
|
|
%else
|
|
|
|
Requires: tomcat >= 1:9.0.7
|
|
|
|
%endif
|
|
|
|
|
|
|
|
# PKI
|
2021-01-14 15:03:54 +00:00
|
|
|
Conflicts: pki-base < 10.10.0
|
2020-10-15 19:57:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
%if 0%{?rhel}
|
|
|
|
# For EPEL, override the '_sharedstatedir' macro on RHEL
|
|
|
|
%define _sharedstatedir /var/lib
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%description
|
|
|
|
JSS Connector for Apache Tomcat, installed via the tomcatjss package,
|
|
|
|
is a Java Secure Socket Extension (JSSE) module for Apache Tomcat that
|
|
|
|
uses Java Security Services (JSS), a Java interface to Network Security
|
|
|
|
Services (NSS).
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
%prep
|
|
|
|
################################################################################
|
|
|
|
|
2021-06-26 00:02:13 +00:00
|
|
|
%autosetup -n tomcatjss-%{version}%{?_phase} -p 1
|
2020-10-15 19:57:56 +00:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
%install
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
# get Tomcat <major>.<minor> version number
|
|
|
|
tomcat_version=`/usr/sbin/tomcat version | sed -n 's/Server number: *\([0-9]\+\.[0-9]\+\).*/\1/p'`
|
2021-06-26 00:02:13 +00:00
|
|
|
app_server=tomcat-$tomcat_version
|
2020-10-15 19:57:56 +00:00
|
|
|
|
|
|
|
ant -f build.xml \
|
|
|
|
-Dversion=%{version} \
|
|
|
|
-Dsrc.dir=$app_server \
|
|
|
|
-Djnidir=%{_jnidir} \
|
|
|
|
-Dinstall.doc.dir=%{buildroot}%{_docdir}/%{name} \
|
|
|
|
-Dinstall.jar.dir=%{buildroot}%{_javadir} \
|
|
|
|
install
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
%files
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
%license LICENSE
|
|
|
|
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc README
|
|
|
|
%doc LICENSE
|
|
|
|
%{_javadir}/*
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
%changelog
|
2021-06-26 00:02:13 +00:00
|
|
|
* Fri Jun 25 2021 Red Hat PKI Team <rhcs-maint@redhat.com> - 8.0.0-0.1
|
|
|
|
- Rebase to TomcatJSS 8.0.0-alpha1
|