3a4430
################################################################################
3a4430
Name:             tomcatjss
3a4430
################################################################################
3a4430
3a4430
Summary:          JSS Connector for Apache Tomcat
3a4430
URL:              http://www.dogtagpki.org/wiki/TomcatJSS
3a4430
License:          LGPLv2+
3a4430
BuildArch:        noarch
3a4430
583dd6
Version:          7.5.0
583dd6
Release:          1%{?_timestamp}%{?_commit_id}%{?dist}
583dd6
#global           _phase -a1
3a4430
3a4430
# To generate the source tarball:
3a4430
# $ git clone https://github.com/dogtagpki/tomcatjss.git
3a4430
# $ cd tomcatjss
3a4430
# $ git archive \
3a4430
#     --format=tar.gz \
3a4430
#     --prefix tomcatjss-VERSION/ \
3a4430
#     -o tomcatjss-VERSION.tar.gz \
3a4430
#     <version tag>
3a4430
Source:           https://github.com/dogtagpki/tomcatjss/archive/v%{version}%{?_phase}/tomcatjss-%{version}%{?_phase}.tar.gz
3a4430
3a4430
# To create a patch for all changes since a version tag:
3a4430
# $ git format-patch \
3a4430
#     --stdout \
3a4430
#     <version tag> \
3a4430
#     > tomcatjss-VERSION-RELEASE.patch
3a4430
# Patch: tomcatjss-VERSION-RELEASE.patch
3a4430
3a4430
################################################################################
3a4430
# Build Dependencies
3a4430
################################################################################
3a4430
3a4430
# jpackage-utils requires versioning to meet both build and runtime requirements
3a4430
# jss requires versioning to meet both build and runtime requirements
3a4430
# tomcat requires versioning to meet both build and runtime requirements
3a4430
3a4430
# autosetup
3a4430
BuildRequires:    git
3a4430
3a4430
# Java
3a4430
BuildRequires:    ant
3a4430
BuildRequires:    apache-commons-lang
3a4430
BuildRequires:    java-devel
3a4430
BuildRequires:    jpackage-utils >= 0:1.7.5-15
3a4430
3a4430
# SLF4J
3a4430
BuildRequires:    slf4j
3a4430
%if 0%{?rhel} && 0%{?rhel} <= 7
3a4430
# no slf4j-jdk14
3a4430
%else
3a4430
BuildRequires:    slf4j-jdk14
3a4430
%endif
3a4430
3a4430
# JSS
3a4430
%if 0%{?rhel} && 0%{?rhel} <= 7
3a4430
BuildRequires:    jss >= 4.4.0-7
3a4430
%else
583dd6
BuildRequires:    jss >= 4.7.0
3a4430
%endif
3a4430
3a4430
# Tomcat
3a4430
%if 0%{?rhel} && 0%{?rhel} <= 7
3a4430
BuildRequires:    tomcat >= 7.0.69
3a4430
%else
3a4430
%if 0%{?fedora} && 0%{?fedora} <= 27
3a4430
BuildRequires:    tomcat >= 8.0.49
3a4430
%else
3a4430
%if 0%{?fedora} && 0%{?fedora} <= 28
3a4430
BuildRequires:    tomcat >= 1:8.5.23
3a4430
%else
3a4430
%if 0%{?rhel}
074fee
BuildRequires:    pki-servlet-engine >= 1:9.0.7
3a4430
%else
3a4430
BuildRequires:    tomcat >= 1:9.0.7
3a4430
%endif
3a4430
%endif
3a4430
%endif
3a4430
%endif
3a4430
3a4430
################################################################################
3a4430
# Runtime Dependencies
3a4430
################################################################################
3a4430
3a4430
# Java
3a4430
Requires:         apache-commons-lang
3a4430
%if 0%{?fedora} >= 21
3a4430
Requires:         java-headless
3a4430
%else
3a4430
Requires:         java
3a4430
%endif
3a4430
Requires:         jpackage-utils >= 0:1.7.5-15
3a4430
3a4430
# SLF4J
3a4430
Requires:         slf4j
3a4430
%if 0%{?rhel}
3a4430
# no slf4j-jdk14
3a4430
%else
3a4430
Requires:         slf4j-jdk14
3a4430
%endif
3a4430
3a4430
# JSS
3a4430
%if 0%{?rhel} && 0%{?rhel} <= 7
3a4430
Requires:         jss >= 4.4.0-7
3a4430
%else
583dd6
Requires:         jss >= 4.7.0
3a4430
%endif
3a4430
3a4430
# Tomcat
3a4430
%if 0%{?rhel} && 0%{?rhel} <= 7
3a4430
Requires:         tomcat >= 7.0.69
3a4430
%else
3a4430
%if 0%{?fedora} && 0%{?fedora} <= 27
3a4430
Requires:         tomcat >= 8.0.49
3a4430
%else
3a4430
%if 0%{?fedora} && 0%{?fedora} <= 28
3a4430
Requires:         tomcat >= 1:8.5.23
3a4430
%else
3a4430
%if 0%{?rhel}
074fee
Requires:         pki-servlet-engine >= 1:9.0.7
3a4430
%else
3a4430
Requires:         tomcat >= 1:9.0.7
3a4430
%endif
3a4430
%endif
3a4430
%endif
3a4430
%endif
3a4430
3a4430
# PKI
3a4430
Conflicts:        pki-base < 10.6.5
3a4430
3a4430
3a4430
%if 0%{?rhel}
3a4430
# For EPEL, override the '_sharedstatedir' macro on RHEL
3a4430
%define           _sharedstatedir    /var/lib
3a4430
%endif
3a4430
3a4430
%description
3a4430
JSS Connector for Apache Tomcat, installed via the tomcatjss package,
3a4430
is a Java Secure Socket Extension (JSSE) module for Apache Tomcat that
3a4430
uses Java Security Services (JSS), a Java interface to Network Security
3a4430
Services (NSS).
3a4430
3a4430
NOTE:  The 'tomcatjss' package conflicts with the 'tomcat-native' package
3a4430
       because it uses an underlying NSS security model rather than the
3a4430
       OpenSSL security model, so these two packages may not co-exist.
3a4430
3a4430
################################################################################
3a4430
%prep
3a4430
################################################################################
3a4430
3a4430
%autosetup -n tomcatjss-%{version}%{?_phase} -p 1 -S git
3a4430
3a4430
################################################################################
3a4430
%install
3a4430
################################################################################
3a4430
3a4430
# get Tomcat <major>.<minor> version number
3a4430
tomcat_version=`/usr/sbin/tomcat version | sed -n 's/Server number: *\([0-9]\+\.[0-9]\+\).*/\1/p'`
3a4430
3a4430
if [ $tomcat_version == "9.0" ]; then
3a4430
    app_server=tomcat-8.5
3a4430
else
3a4430
    app_server=tomcat-$tomcat_version
3a4430
fi
3a4430
3a4430
ant -f build.xml \
3a4430
    -Dversion=%{version} \
3a4430
    -Dsrc.dir=$app_server \
3a4430
    -Djnidir=%{_jnidir} \
3a4430
    -Dinstall.doc.dir=%{buildroot}%{_docdir}/%{name} \
3a4430
    -Dinstall.jar.dir=%{buildroot}%{_javadir} \
3a4430
    install
3a4430
3a4430
################################################################################
3a4430
%files
3a4430
################################################################################
3a4430
583dd6
%license LICENSE
583dd6
3a4430
%defattr(-,root,root)
3a4430
%doc README
3a4430
%doc LICENSE
3a4430
%{_javadir}/*
3a4430
3a4430
################################################################################
3a4430
%changelog
583dd6
* Thu Jul 09 2020 Red Hat PKI Team <rhcs-maint@redhat.com> 7.5.0-1
583dd6
- Rebased to TomcatJSS 7.5.0
583dd6
583dd6
* Thu Jun 25 2020 Red Hat PKI Team <rhcs-maint@redhat.com> 7.5.0-0.2
583dd6
- Rebased to TomcatJSS 7.5.0-a2
583dd6
583dd6
* Tue May 26 2020 Red Hat PKI Team <rhcs-maint@redhat.com> 7.5.0-0.1
583dd6
- Rebased to TomcatJSS 7.5.0-a1
583dd6
cb1d24
* Thu Oct 31 2019 Red Hat PKI Team <rhcs-maint@redhat.com> 7.4.1-2
cb1d24
- Bumping min requirement for jss to 4.6.0
074fee
cb1d24
* Wed Jun 12 2019 Red Hat PKI Team <rhcs-maint@redhat.com> 7.4.1-1
cb1d24
- Rebased to TomcatJSS 7.4.1
074fee
cb1d24
* Wed Apr 24 2019 Red Hat PKI Team <rhcs-maint@redhat.com> 7.4.0-1
cb1d24
- Rebased to TomcatJSS 7.4.0
cb1d24
cb1d24
* Fri Oct 05 2018 Red Hat PKI Team <rhcs-maint@redhat.com> 7.3.6-1
3a4430
- Rebased to TomcatJSS 7.3.6
3a4430
cb1d24
* Mon Aug 13 2018 Red Hat PKI Team <rhcs-maint@redhat.com> 7.3.5-1
3a4430
- Rebased to TomcatJSS 7.3.5
3a4430
cb1d24
* Tue Aug 07 2018 Red Hat PKI Team <rhcs-maint@redhat.com> 7.3.4-1
3a4430
- Rebased to TomcatJSS 7.3.4
3a4430
cb1d24
* Tue Aug 07 2018 Red Hat PKI Team <rhcs-maint@redhat.com> 7.3.3-2
3a4430
- Red Hat Bugzilla #1612063 - Do not override system crypto policy (support TLS 1.3)
3a4430
cb1d24
* Fri Jul 20 2018 Red Hat PKI Team <rhcs-maint@redhat.com> 7.3.3-1
3a4430
- Rebased to TomcatJSS 7.3.3
3a4430
cb1d24
* Thu Jul 05 2018 Red Hat PKI Team <rhcs-maint@redhat.com> 7.3.2-1
3a4430
- Rebased to TomcatJSS 7.3.2
3a4430
cb1d24
* Fri Jun 15 2018 Red Hat PKI Team <rhcs-maint@redhat.com> 7.3.1-1
3a4430
- Fixed Tomcat dependencies
3a4430
- Rebased to TomcatJSS 7.3.1
3a4430
cb1d24
* Thu Apr 12 2018 Red Hat PKI Team <rhcs-maint@redhat.com> 7.3.0-1
3a4430
- Cleaned up spec file
3a4430
- Rebased to TomcatJSS 7.3.0 final
3a4430
cb1d24
* Thu Mar 15 2018 Red Hat PKI Team <rhcs-maint@redhat.com> 7.3.0-0.2
3a4430
- Rebased to TomcatJSS 7.3.0 beta