Files
clienteafirma-external/clienteafirma-external.spec

83 lines
2.8 KiB
RPMSpec

#
# spec file for package clienteafirma-external
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: clienteafirma-external
Version: 1.0.4
Release: 0
Summary: Cliente @firma support libraries
License: EUPL-1.1 OR GPL-2.0-only
URL: https://github.com/ctt-gob-es/clienteafirma-external
Source0: %{name}-%{version}.tar.xz
Source1: http://www.gnu.org/licenses/gpl-2.0.txt
Source2: https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/eupl1.1.-licence-en_0.pdf
Patch0: clienteafirma-external-bouncycastle.patch
Patch1: fix-ASN1Set-cast-in-PdfPKCS7.patch
Patch2: clienteafirma-external-bc175.patch
BuildRequires: fdupes
BuildRequires: java-devel >= 1.8
BuildRequires: maven-local
BuildRequires: mvn(org.bouncycastle:bcpkix-jdk15on)
BuildRequires: mvn(org.bouncycastle:bcprov-jdk15on)
BuildArch: noarch
%description
Modified external libraries for the Cliente @firma software
%package javadoc
Summary: Javadoc for %{name}
Group: Documentation/HTML
%description javadoc
This package contains the API documentation for %{name}.
%prep
%setup -q
cp %{SOURCE1} GPL-2.0.txt
cp %{SOURCE2} EUPL-1.1.pdf
# Use bouncycastle, instead of spongycastle
%patch -P 0 -p1
%patch -P 1 -p1
%patch -P 2 -p1
%pom_remove_dep -r com.madgag.spongycastle:core
%pom_change_dep com.madgag.spongycastle:bcpkix-jdk15on org.bouncycastle afirma-lib-itext
%pom_change_dep com.madgag.spongycastle:prov org.bouncycastle:bcprov-jdk15on afirma-lib-itext
%pom_disable_module afirma-lib-itext-android
%pom_xpath_set "pom:project/pom:properties/pom:jdk.version" "1.8"
%pom_xpath_set -r "pom:plugin[pom:artifactId[text()='maven-compiler-plugin']]/pom:configuration/pom:source" "8"
%pom_xpath_set -r "pom:plugin[pom:artifactId[text()='maven-compiler-plugin']]/pom:configuration/pom:target" "8"
%build
%{mvn_build} -f -- \
-Dproject.build.outputTimestamp=$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ) \
-Dsource=8
%install
%mvn_install
%fdupes -s %{buildroot}%{_javadocdir}
%files -f .mfiles
%license GPL-2.0.txt EUPL-1.1.pdf
%files javadoc -f .mfiles-javadoc
%license GPL-2.0.txt EUPL-1.1.pdf
%changelog