jss/jss.spec

274 lines
9.1 KiB
RPMSpec
Raw Normal View History

2018-05-29 17:26:04 +00:00
################################################################################
2022-04-28 14:55:23 +00:00
Name: jss
2018-05-29 17:26:04 +00:00
################################################################################
2022-04-28 14:55:23 +00:00
%global product_id dogtag-jss
2022-04-27 23:19:12 +00:00
# Upstream version number:
%global major_version 5
%global minor_version 4
%global update_version 2
2022-04-27 23:19:12 +00:00
# Downstream release number:
# - development/stabilization (unsupported): 0.<n> where n >= 1
# - GA/update (supported): <n> where n >= 1
%global release_number 1
2022-04-27 23:19:12 +00:00
# Development phase:
# - development (unsupported): alpha<n> where n >= 1
# - stabilization (unsupported): beta<n> where n >= 1
# - GA/update (supported): <none>
2023-02-07 18:45:03 +00:00
#global phase
2022-04-27 23:19:12 +00:00
%undefine timestamp
%undefine commit_id
2018-05-29 17:26:04 +00:00
Summary: Java Security Services (JSS)
2022-06-30 01:06:09 +00:00
URL: https://github.com/dogtagpki/jss
2023-02-28 06:40:19 +00:00
License: MPL-1.1 or GPL-2.0-or-later or LGPL-2.1-or-later
Version: 5.4.2
2023-02-07 18:45:03 +00:00
Release: %{release_number}%{?phase:.}%{?phase}%{?timestamp:.}%{?timestamp}%{?commit_id:.}%{?commit_id}%{?dist}
2018-05-29 17:26:04 +00:00
# To generate the source tarball:
2018-06-15 21:31:35 +00:00
# $ git clone https://github.com/dogtagpki/jss.git
# $ cd jss
# $ git tag v4.5.<z>
# $ git push origin v4.5.<z>
# Then go to https://github.com/dogtagpki/jss/releases and download the source
# tarball.
2022-04-27 23:19:12 +00:00
Source: https://github.com/dogtagpki/jss/archive/v%{version}%{?phase:-}%{?phase}/jss-%{version}%{?phase:-}%{?phase}.tar.gz
2018-06-15 21:31:35 +00:00
# To create a patch for all changes since a version tag:
# $ git format-patch \
# --stdout \
# <version tag> \
# > jss-VERSION-RELEASE.patch
# Patch: jss-VERSION-RELEASE.patch
2023-02-07 18:45:03 +00:00
%if 0%{?fedora} && 0%{?fedora} > 35
ExclusiveArch: %{java_arches}
%else
2022-04-27 23:19:12 +00:00
ExcludeArch: i686
2023-02-07 18:45:03 +00:00
%endif
2022-04-27 23:19:12 +00:00
2021-06-22 19:35:42 +00:00
################################################################################
# Java
################################################################################
2021-11-26 15:11:57 +00:00
%define java_devel java-17-openjdk-devel
%define java_headless java-17-openjdk-headless
%define java_home %{_jvmdir}/jre-17-openjdk
2021-06-22 19:35:42 +00:00
2021-05-26 23:20:35 +00:00
################################################################################
# Build Options
################################################################################
2021-08-12 18:03:54 +00:00
# By default the javadoc package will be built unless --without javadoc
2021-05-26 23:20:35 +00:00
# option is specified.
2021-08-12 18:03:54 +00:00
%bcond_without javadoc
2021-11-26 15:11:57 +00:00
# By default the build will not execute unit tests unless --with tests
2021-08-12 18:03:54 +00:00
# option is specified.
2021-11-26 15:11:57 +00:00
%bcond_with tests
2021-05-26 23:20:35 +00:00
2018-07-11 01:23:47 +00:00
################################################################################
# Build Dependencies
################################################################################
BuildRequires: make
BuildRequires: cmake >= 3.14
BuildRequires: zip
BuildRequires: unzip
2018-05-29 17:26:04 +00:00
2018-07-11 01:23:47 +00:00
BuildRequires: gcc-c++
2021-08-12 18:03:54 +00:00
BuildRequires: nss-devel >= 3.66
BuildRequires: nss-tools >= 3.66
2018-06-15 21:31:35 +00:00
BuildRequires: %{java_devel}
BuildRequires: maven-local
BuildRequires: mvn(org.apache.commons:commons-lang3)
BuildRequires: mvn(org.slf4j:slf4j-api)
BuildRequires: mvn(org.slf4j:slf4j-jdk14)
BuildRequires: mvn(junit:junit)
2018-05-29 17:26:04 +00:00
2022-04-28 14:55:23 +00:00
%description
Java Security Services (JSS) is a java native interface which provides a bridge
for java-based applications to use native Network Security Services (NSS).
This only works with gcj. Other JREs require that JCE providers be signed.
################################################################################
%package -n %{product_id}
################################################################################
Summary: Java Security Services (JSS)
2021-08-12 18:03:54 +00:00
Requires: nss >= 3.66
2021-06-22 19:35:42 +00:00
Requires: %{java_headless}
Requires: mvn(org.apache.commons:commons-lang3)
Requires: mvn(org.slf4j:slf4j-api)
Requires: mvn(org.slf4j:slf4j-jdk14)
2018-07-11 01:23:47 +00:00
2022-04-27 23:19:12 +00:00
Obsoletes: jss < %{version}-%{release}
Provides: jss = %{version}-%{release}
2023-02-07 18:45:03 +00:00
Provides: jss = %{major_version}.%{minor_version}
Provides: %{product_id} = %{major_version}.%{minor_version}
2022-04-27 23:19:12 +00:00
2018-08-10 20:53:52 +00:00
Conflicts: ldapjdk < 4.20
Conflicts: idm-console-framework < 1.2
Conflicts: tomcatjss < 7.6.0
Conflicts: pki-base < 10.10.0
2022-04-28 14:55:23 +00:00
%description -n %{product_id}
Java Security Services (JSS) is a java native interface which provides a bridge
for java-based applications to use native Network Security Services (NSS).
This only works with gcj. Other JREs require that JCE providers be signed.
2021-08-12 18:03:54 +00:00
%if %{with javadoc}
2018-05-29 17:26:04 +00:00
################################################################################
2022-04-28 14:55:23 +00:00
%package -n %{product_id}-javadoc
2018-05-29 17:26:04 +00:00
################################################################################
Summary: Java Security Services (JSS) Javadocs
2022-04-27 23:19:12 +00:00
Obsoletes: jss-javadoc < %{version}-%{release}
Provides: jss-javadoc = %{version}-%{release}
2023-02-07 18:45:03 +00:00
Provides: jss-javadoc = %{major_version}.%{minor_version}
Provides: %{product_id}-javadoc = %{major_version}.%{minor_version}
2022-04-27 23:19:12 +00:00
2022-04-28 14:55:23 +00:00
%description -n %{product_id}-javadoc
This package contains the API documentation for JSS.
2021-08-12 18:03:54 +00:00
%endif
2018-05-29 17:26:04 +00:00
################################################################################
%prep
2022-04-11 19:20:55 +00:00
################################################################################
2022-04-27 23:19:12 +00:00
%autosetup -n jss-%{version}%{?phase:-}%{?phase} -p 1
2018-05-29 17:26:04 +00:00
################################################################################
%build
2022-04-11 19:20:55 +00:00
################################################################################
2022-04-11 19:20:55 +00:00
# Set build flags for CMake
# (see /usr/lib/rpm/macros.d/macros.cmake)
%set_build_flags
2021-06-22 19:35:42 +00:00
export JAVA_HOME=%{java_home}
2018-06-15 21:31:35 +00:00
# Enable compiler optimizations
export BUILD_OPT=1
# Generate symbolic info for debuggers
CFLAGS="-g $RPM_OPT_FLAGS"
export CFLAGS
# Check if we're in FIPS mode
modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENABLED=1
2021-06-22 19:35:42 +00:00
./build.sh \
%{?_verbose:-v} \
--work-dir=%{_vpath_builddir} \
2022-04-11 19:20:55 +00:00
--prefix-dir=%{_prefix} \
--include-dir=%{_includedir} \
2022-02-14 16:12:37 +00:00
--lib-dir=%{_libdir} \
2022-06-30 01:06:09 +00:00
--sysconf-dir=%{_sysconfdir} \
2022-04-11 19:20:55 +00:00
--share-dir=%{_datadir} \
--cmake=%{__cmake} \
--java-home=%{java_home} \
--jni-dir=%{_jnidir} \
2021-06-22 19:35:42 +00:00
--version=%{version} \
2021-08-12 18:03:54 +00:00
%{!?with_javadoc:--without-javadoc} \
2021-11-26 15:11:57 +00:00
%{?with_tests:--with-tests} \
2021-06-22 19:35:42 +00:00
dist
2018-05-29 17:26:04 +00:00
################################################################################
%install
2022-04-11 19:20:55 +00:00
################################################################################
2021-06-22 19:35:42 +00:00
./build.sh \
%{?_verbose:-v} \
--work-dir=%{_vpath_builddir} \
--install-dir=%{buildroot} \
install
2018-05-29 17:26:04 +00:00
################################################################################
2022-04-28 14:55:23 +00:00
%files -n %{product_id}
2022-04-11 19:20:55 +00:00
################################################################################
2018-05-29 17:26:04 +00:00
%defattr(-,root,root,-)
%doc jss.html
2022-02-14 16:12:37 +00:00
%license MPL-1.1.txt gpl.txt lgpl.txt symkey/LICENSE
2018-07-11 01:23:47 +00:00
%{_libdir}/*
%{_jnidir}/*
2021-08-12 18:03:54 +00:00
%if %{with javadoc}
2018-05-29 17:26:04 +00:00
################################################################################
2022-04-28 14:55:23 +00:00
%files -n %{product_id}-javadoc
2022-04-11 19:20:55 +00:00
################################################################################
2018-05-29 17:26:04 +00:00
%defattr(-,root,root,-)
2022-04-27 23:19:12 +00:00
%{_javadocdir}/jss/
2021-08-12 18:03:54 +00:00
%endif
2018-05-29 17:26:04 +00:00
################################################################################
%changelog
* Fri Jun 16 2023 Packit <hello@packit.dev> - 5.4.2-1
- Updating version to v5.4.2 (Chris Kelley)
- Upstream spec file changes to reduce diffs (Chris Kelley)
- Introduce Packit configuration for jss (Chris Kelley)
2023-02-07 19:24:25 +00:00
* Tue Feb 07 2023 Dogtag PKI Team <devel@lists.dogtagpki.org> - 5.3.0-2
- Update version number in JSSConfig.cmake
2023-02-07 18:45:03 +00:00
* Tue Feb 07 2023 Dogtag PKI Team <devel@lists.dogtagpki.org> - 5.3.0-1
- Rebase to JSS 5.3.0
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.0-1.2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.0-1.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
2022-06-30 01:06:09 +00:00
* Wed Jun 29 2022 Dogtag PKI Team <devel@lists.dogtagpki.org> - 5.2.0-1
- Rebase to JSS 5.2.0
2022-04-27 23:19:12 +00:00
* Wed Apr 27 2022 Dogtag PKI Team <devel@lists.dogtagpki.org> - 5.2.0-0.3.beta2
- Rebase to JSS 5.2.0-beta2
- Rename packages to dogtag-jss
2022-04-11 19:20:55 +00:00
* Mon Apr 11 2022 Dogtag PKI Team <devel@lists.dogtagpki.org> - 5.2.0-0.2.beta1
- Rebase to JSS 5.2.0-beta1
2022-02-14 16:12:37 +00:00
* Mon Feb 14 2022 Dogtag PKI Team <devel@lists.dogtagpki.org> - 5.1.0-1
- Rebase to JSS 5.1.0
* Sat Feb 05 2022 Jiri Vanek <jvanek@redhat.com> - 5.1.0-0.3.alpha2
- Rebuilt for java-17-openjdk as system jdk
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.0-0.2.alpha2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
2021-11-26 15:11:57 +00:00
* Fri Nov 26 2021 Dogtag PKI Team <devel@lists.dogtagpki.org> - 5.1.0-0.1.alpha2
- Rebase to JSS 5.1.0-alpha2
2021-10-01 04:34:32 +00:00
* Thu Sep 30 2021 Dogtag PKI Team <devel@lists.dogtagpki.org> - 5.0.0-1
- Rebase to JSS 5.0.0
* Wed Sep 29 2021 Dogtag PKI Team <devel@lists.dogtagpki.org> - 5.0.0-0.5.beta1
- Drop BuildRequires and Requires on glassfish-jaxb-api
2021-09-03 22:23:32 +00:00
* Fri Sep 03 2021 Dogtag PKI Team <devel@lists.dogtagpki.org> - 5.0.0-0.4.beta1
- Rebase to JSS 5.0.0-beta1
2021-08-12 18:03:54 +00:00
* Thu Aug 12 2021 Dogtag PKI Team <devel@lists.dogtagpki.org> - 5.0.0-0.3.alpha2
- Rebase to JSS 5.0.0-alpha2
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.0-0.2.alpha1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
2021-08-12 18:03:54 +00:00
* Tue Jun 22 2021 Dogtag PKI Team <devel@lists.dogtagpki.org> - 5.0.0-0.1.alpha1
2021-06-22 19:35:42 +00:00
- Rebase to JSS 5.0.0-alpha1