| 1 |
# |
| 2 |
# spec file for package intel-ipsec-mb |
| 3 |
# |
| 4 |
# Copyright (c) 2022-2024 SUSE LLC |
| 5 |
# Copyright (c) 2022-2024, Intel Corporation |
| 6 |
# |
| 7 |
# All modifications and additions to the file contributed by third parties |
| 8 |
# remain the property of their copyright owners, unless otherwise agreed |
| 9 |
# upon. The license for this file, and modifications and additions to the |
| 10 |
# file, is the same license as for the pristine package itself (unless the |
| 11 |
# license for the pristine package is not an Open Source License, in which |
| 12 |
# case the license is the MIT License). An "Open Source License" is a |
| 13 |
# license that conforms to the Open Source Definition (Version 1.9) |
| 14 |
# published by the Open Source Initiative. |
| 15 |
|
| 16 |
# Please submit bugfixes or comments via https://bugs.opensuse.org/ |
| 17 |
# |
| 18 |
|
| 19 |
# Versions numbers |
| 20 |
%global major 2 |
| 21 |
%global minor 0 |
| 22 |
%global patch 0 |
| 23 |
|
| 24 |
# GitHub properties |
| 25 |
%global githubver %{major}.%{minor} |
| 26 |
%global githubfull %{name}-%{githubver} |
| 27 |
|
| 28 |
%global rpm_name libIPSec_MB |
| 29 |
|
| 30 |
Name: intel-ipsec-mb |
| 31 |
Summary: IPSec cryptography library optimized for Intel Architecture |
| 32 |
Release: 0 |
| 33 |
Version: %{major}.%{minor}.%{patch} |
| 34 |
License: BSD-3-Clause |
| 35 |
Group: Development/Libraries/C and C++ |
| 36 |
URL: https://github.com/intel/%{name} |
| 37 |
Source0: https://github.com/intel/%{name}/archive/v%{githubver}.tar.gz#/%{githubfull}.tar.gz |
| 38 |
ExclusiveArch: x86_64 |
| 39 |
BuildRequires: make |
| 40 |
BuildRequires: gcc >= 4.8.3 |
| 41 |
BuildRequires: nasm >= 2.14 |
| 42 |
|
| 43 |
%description |
| 44 |
An IPSec cryptography library optimized for Intel Architecture |
| 45 |
and primarily targeted at packet processing applications. |
| 46 |
|
| 47 |
%package devel |
| 48 |
Summary: Headers for the Intel IPSec cryptographic library |
| 49 |
Requires: %{rpm_name}%{major}%{?_isa} = %{version}-%{release} |
| 50 |
Group: Development/Libraries/C and C++ |
| 51 |
|
| 52 |
%description devel |
| 53 |
An IPSec cryptography library optimized for Intel Architecture |
| 54 |
and primarily targeted at packet processing applications. |
| 55 |
|
| 56 |
This package contains the headers for building programs with the library. |
| 57 |
|
| 58 |
%package -n %{rpm_name}%{major} |
| 59 |
Summary: IPSec cryptography library optimized for Intel Architecture |
| 60 |
Group: System/Libraries |
| 61 |
|
| 62 |
%description -n %{rpm_name}%{major} |
| 63 |
An IPSec cryptography library optimized for Intel Architecture |
| 64 |
and primarily targeted at packet processing applications. |
| 65 |
|
| 66 |
%prep |
| 67 |
%autosetup -n %{name}-%{githubver} |
| 68 |
|
| 69 |
%build |
| 70 |
cd lib |
| 71 |
%make_build EXTRA_CFLAGS='%{optflags}' |
| 72 |
|
| 73 |
%install |
| 74 |
install -d %{buildroot}/%{_includedir} |
| 75 |
install -m 0644 %{_builddir}/%{githubfull}/lib/intel-ipsec-mb.h %{buildroot}/%{_includedir} |
| 76 |
install -d %{buildroot}/%{_libdir} |
| 77 |
install -s -m 0755 %{_builddir}/%{githubfull}/lib/libIPSec_MB.so.%{version} %{buildroot}/%{_libdir} |
| 78 |
install -d %{buildroot}/%{_mandir}/man7 |
| 79 |
install -m 0444 lib/libipsec-mb.7 %{buildroot}/%{_mandir}/man7 |
| 80 |
install -m 0444 lib/libipsec-mb-dev.7 %{buildroot}/%{_mandir}/man7 |
| 81 |
cd %{buildroot}/%{_libdir} |
| 82 |
ln -s libIPSec_MB.so.%{version} libIPSec_MB.so.%{major} |
| 83 |
ln -s libIPSec_MB.so.%{version} libIPSec_MB.so |
| 84 |
|
| 85 |
%files -n %{rpm_name}%{major} |
| 86 |
%license LICENSE |
| 87 |
%{_libdir}/libIPSec_MB.so.%{version} |
| 88 |
%{_libdir}/libIPSec_MB.so.%{major} |
| 89 |
|
| 90 |
%files devel |
| 91 |
%doc README ReleaseNotes.txt |
| 92 |
%{_includedir}/intel-ipsec-mb.h |
| 93 |
%{_mandir}/man7/libipsec-mb.7.gz |
| 94 |
%{_mandir}/man7/libipsec-mb-dev.7.gz |
| 95 |
%{_libdir}/libIPSec_MB.so |
| 96 |
|
| 97 |
%post -n %{rpm_name}%{major} -p /sbin/ldconfig |
| 98 |
%postun -n %{rpm_name}%{major} -p /sbin/ldconfig |
| 99 |
|
| 100 |
%changelog |