forked from NASA-AMMOS/BSL
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbsl.spec
More file actions
161 lines (130 loc) · 3.42 KB
/
bsl.spec
File metadata and controls
161 lines (130 loc) · 3.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
%bcond_with apidoc
Name: bsl
Version: 1.0.0
Release: 2%{?dist}
Summary: The Bundle Protocol Security Library (BSL)
URL: https://github.com/NASA-AMMOS/BSL
# License "Apache-2.0" is not accepted by rpmlint
License: ASL 2.0
Source0: %{name}-%{version}.tar.gz
BuildRequires: rsync
BuildRequires: cmake
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: openssl-devel
BuildRequires: jansson-devel
BuildRequires: asciidoctor
%if %{with apidoc}
BuildRequires: doxygen
BuildRequires: graphviz
BuildRequires: texlive-bibtex
%endif
%description
Runtime files needed to use the BPSec Library (BSL).
%package devel
Summary: Development files for the BSL
Requires: %{name}%{?_isa} = %{version}
%description devel
Development files needed to build and link to the BSL.
%package test
Summary: Unit test and Mock BPA executables for the BSL
%description test
This package contains executables needed to test the associated
BSL library build.
%package test-devel
Summary: Development files for the BSL test fixtures
Requires: %{name}-test%{?_isa} = %{version}
%description test-devel
Development files needed to build and link to the BSL mock BPA.
%if %{with apidoc}
%package apidoc
Summary: API documentation for the BSL
Requires: %{name}%{?_isa} = %{version}
%description apidoc
API documentation in the form of HTML package generated
from the API with Doxygen.
%endif
%prep
%setup -q
./build.sh deps
%cmake -DCMAKE_PREFIX_PATH=${PWD}/testroot/usr \
-DPROJECT_VERSION=%{version} \
-DBUILD_UNITTEST=YES -DTEST_MEMCHECK=NO -DBUILD_COVERAGE=NO \
-DBUILD_DOCS_MAN=YES %{?with_apidoc:-DBUILD_DOCS_API=YES}
%build
%cmake_build
%cmake_build --target docs-man
%if %{with apidoc}
%cmake_build --target docs-api-html
%endif
%install
# Only during this stage can the {buildroot} be written to
pushd testroot%{_includedir}
for FN in $(find . -type f)
do
install -m644 -D ${FN} %{buildroot}%{_includedir}/${FN}
done
popd
pushd testroot%{_libdir}
mkdir -p %{buildroot}%{_libdir}
for FN in $(find . -type f,l -a -name '*.so*')
do
cp -a ${FN} %{buildroot}%{_libdir}/${FN}
done
for FN in $(find . -type f -a \( -name '*.a' -o -name '*.cmake' \) )
do
install -m644 -D ${FN} %{buildroot}%{_libdir}/${FN}
done
popd
%cmake_install
%check
%cmake_build --target test
%files
%license LICENSE
%doc README.md
%{_libdir}/libqcbor.so.*
%{_libdir}/libbsl_front.so.*
%{_libdir}/libbsl_dynamic.so.*
%{_libdir}/libbsl_crypto.so.*
%{_libdir}/libbsl_sample_pp.so.*
%{_libdir}/libbsl_default_sc.so.*
%files devel
%license LICENSE
%doc README.md
%{_includedir}/bsl
%{_includedir}/qcbor
%{_includedir}/m-lib
%{_libdir}/libqcbor.so
%{_libdir}/libbsl_front.so
%{_libdir}/libbsl_dynamic.so
%{_libdir}/libbsl_crypto.so
%{_libdir}/libbsl_sample_pp.so
%{_libdir}/libbsl_default_sc.so
%files test
%license LICENSE
%doc README.md
%{_libdir}/libbsl_mock_bpa.so.*
%{_libdir}/libbsl_test_utils.so.*
%{_libexecdir}/%{name}/test*
%{_bindir}/bsl-mock-bpa
%{_mandir}/man1/bsl-mock-bpa.*
%files test-devel
%license LICENSE
%doc README.md
%{_includedir}/unity
%{_libdir}/cmake/unity
%{_libdir}/libunity.a
%{_libdir}/libbsl_mock_bpa.so
%{_libdir}/libbsl_test_utils.so
%if %{with apidoc}
%files apidoc
%license LICENSE
%{_docdir}/bsl
%endif
%changelog
* Thu Sep 18 2025 Brian Sipos <brian.sipos@jhuapl.edu> 1.0.0-2
- New package built with tito
* Wed Sep 17 2025 Brian Sipos - 1.0.0-1
- Initial release version.
* Mon Oct 07 2024 Brian Sipos - 0.0.0-0
- Initial development before version tagging.