Files
2025-08-04 11:39:52 -03:00

81 lines
2.5 KiB
RPMSpec

%global debug_package %{nil}
%global source_date_epoch_from_changelog 0
%global packager Christian Tosta <7252968+christiantosta@users.noreply.github.com>
%define __openssl %{_bindir}/openssl
Name: ca-certificates-brazil
Version: @CPACK_PACKAGE_VERSION@
Release: @CPACK_RPM_PACKAGE_RELEASE@%{?dist}
Summary: The ICP-Brasil root certificate bundle
License: MIT AND Public Domain
URL: https://www.gov.br/iti/pt-br/assuntos/certificado-digital
Source0: %{name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: %{__openssl}
BuildRequires: %{_bindir}/cmake
BuildRequires: %{_bindir}/mktemp
BuildRequires: %{_bindir}/unzip
BuildRequires: gcc
BuildRequires: gcc-c++
Provides: ca-certificates(ICP-Brasil) = %{version}-%{release}
Provides: config(ICP-Brasil) = %{version}-%{release}
Requires: %{name}-extras
%description
The Brazilian Public Key Infrastructure - ICP-Brasil is a hierarchical chain
of trust that enables the issuance of digital certificates for the virtual
identification of citizens.
It is observed that the model adopted by Brazil was single-root certification,
and the ITI, in addition to playing the role of Root Certifying Authority - Root AC,
also has the role of accrediting and discrediting the other participants in the
chain, supervise and audit the processes.
%prep
%autosetup -n %{name}-%{version}.src
%{cmake}
%build
BUILD_SHARED_LIBS= \
CMAKE_CXX_FLAGS_RELEASE= \
CMAKE_C_FLAGS_RELEASE= \
CMAKE_Fortran_FLAGS_RELEASE= \
CMAKE_INSTALL_DO_STRIP= \
CMAKE_INSTALL_FULL_SBINDIR= \
CMAKE_INSTALL_SBINDIR= \
INCLUDE_INSTALL_DIR= \
LIB_INSTALL_DIR= \
SHARE_INSTALL_PREFIX= \
SYSCONF_INSTALL_DIR= \
%{cmake_build}
%install
%{__rm} -rf %{buildroot}
%{cmake_install}
%files
%doc %{_datadir}/doc/%{name}/*.pdf
%doc %{_datadir}/doc/%{name}/README.md
%license %{_datadir}/doc/%{name}/LICENSE
%{_datadir}/pki/ca-trust-source/anchors/icp-brasil-ca-bundle.crt
%post -p %{_bindir}/update-ca-trust
%postun -p %{_bindir}/update-ca-trust
%package extras
Summary: Extra Root and Intermediate certificates used by ICP-Brasil
%description extras
%{summary}
%files extras
%license %{_datadir}/doc/%{name}/LICENSE
%{_datadir}/pki/ca-trust-source/anchors/*.crt
%exclude %{_datadir}/pki/ca-trust-source/anchors/icp-brasil-ca-bundle.crt
%post extras -p %{_bindir}/update-ca-trust
%postun extras -p %{_bindir}/update-ca-trust
%changelog
@CPACK_RPM_CHANGELOG@