From 0dc057fc7209cf2e04adf1b5355c5d74a47096d5 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Thu, 8 May 2025 01:51:52 +0000 Subject: automatic import of boringssl --- boringssl.spec | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 boringssl.spec (limited to 'boringssl.spec') diff --git a/boringssl.spec b/boringssl.spec new file mode 100644 index 0000000..bbe4807 --- /dev/null +++ b/boringssl.spec @@ -0,0 +1,83 @@ +%define debug_package %{nil} +%define src_install_dir /usr/src/%{name} + +Name: boringssl +Version: 342e805bc1f5dfdd650e3f031686d6c939b095d9 +Release: 1 +Summary: An SSL/TLS protocol implementation +License: OpenSSL +Group: Development/Sources +URL: https://boringssl.googlesource.com/%{name} +Source: https://github.com/google/%{name}/archive/%{version}.tar.gz + +Patch0: Fix-print-Syntax-error.patch + +BuildRequires: cmake >= 3.0 +BuildRequires: fdupes +BuildRequires: gcc-c++ + +%description +BoringSSL is an implementation of the Secure Sockets Layer (SSL) and +Transport Layer Security (TLS) protocols, derived from OpenSSL. + +%package devel +Summary: Development files for BoringSSL +Group: Development/Libraries/C and C++ + +%description devel +Development files for BoringSSL - an implementation of the Secure +Sockets Layer (SSL) and Transport Layer Security (TLS) protocols, +derived from OpenSSL. + +%package source +Summary: Source code of BoringSSL +Group: Development/Sources +BuildArch: noarch + +%description source +Source files for BoringSSL implementation + +%prep +%autosetup -n %{name}-%{version} -p1 + +%build + +%install +# Install sources +mkdir -p %{buildroot}%{src_install_dir} +cp -r * %{buildroot}%{src_install_dir} +%fdupes %{buildroot}%{src_install_dir} +# Fix arch-independent-package-contains-binary-or-object +find %{buildroot}%{src_install_dir} -type f \( -name "*.a" -o -name "*.lib" -o -name "*.o" \) -exec rm -f "{}" + +# Fix non-executable-script warning. +find %{buildroot}%{src_install_dir} -type f -name "*.sh" -exec chmod +x "{}" + +# Fix env-script-interpreter error. +find %{buildroot}%{src_install_dir} -type f -name "*.pl" -exec sed -i 's|#!.*/usr/bin/env perl|#!/usr/bin/perl|' "{}" + +find %{buildroot}%{src_install_dir} -type f -name "*.py" -exec sed -i 's|#!.*/usr/bin/python$|#!/usr/bin/python3|' "{}" + +find %{buildroot}%{src_install_dir} -type f -name "*.py" -exec sed -i 's|#!.*/usr/bin/env python.*|#!/usr/bin/python3|' "{}" + +find %{buildroot}%{src_install_dir} -type f -name "*.sh" -exec sed -i 's|#!.*/usr/bin/env bash|#!/bin/bash|' "{}" + + +# To avoid conflicts with openssl development files, change all includes from +# openssl to boringssl. +# BoringSSL headers provided by this pachage are installed in +# /usr/include/boringssl for the same reason. +find src/include/openssl -type f -exec sed -i 's/openssl/boringssl/' "{}" + + +find src/include/openssl -type f -execdir install -D -m0644 "{}" "%{buildroot}%{_includedir}/boringssl/{}" \; + +rm -rf %{buildroot}%{src_install_dir}/src/util/ar/testdata/mac/libsample.a +rm -rf %{buildroot}%{src_install_dir}/src/util/ar/testdata/windows/* + +%files +%doc src/README.md +%license LICENSE + +%files devel +%{_includedir}/boringssl + +%files source +%{src_install_dir} + +%changelog +* Mon Apr 7 2025 fuanan - 342e805bc1f5dfdd650e3f031686d6c939b095d9-1 +- package init -- cgit v1.2.3