@@ -90,6 +90,13 @@ cat > "$SPEC" << EOF
90
90
%bcond_without python2
91
91
%endif
92
92
93
+ # build csdiff-static on RHEL-10+ and Fedora
94
+ %if 0%{?rhel} > 9 || 0%{?fedora}
95
+ %bcond_without static
96
+ %else
97
+ %bcond_with static
98
+ %endif
99
+
93
100
# python3 support is optional
94
101
%bcond_without python3
95
102
@@ -134,6 +141,18 @@ This package contains the csdiff tool for comparing code scan defect lists in
134
141
order to find out added or fixed defects, and the csgrep utility for filtering
135
142
defect lists using various filtering predicates.
136
143
144
+ %if %{with static}
145
+ %package static
146
+ Summary: Statically linked csgrep-static executable
147
+ BuildRequires: boost-static
148
+ BuildRequires: glibc-static
149
+ BuildRequires: libstdc++-static
150
+
151
+ %description static
152
+ This pacakge contains a statically linked csgrep-static executable needed
153
+ for context embedding in legacy build environments.
154
+ %endif
155
+
137
156
%if %{with python2}
138
157
%package -n python2-%{name}
139
158
Summary: Python interface to csdiff for Python 2
@@ -168,6 +187,7 @@ export BOOST_LIBRARYDIR=/usr/lib64/boost169
168
187
169
188
make version.cc
170
189
%cmake3 \\
190
+ -DCSGREP_STATIC=%{?with_static:ON} \\
171
191
-DPYCSDIFF_PYTHON2=%{?with_python2:ON} \\
172
192
-DPYCSDIFF_PYTHON3=%{?with_python3:ON}
173
193
%cmake3_build
@@ -195,6 +215,11 @@ make version.cc
195
215
%{_mandir}/man1/cssort.1*
196
216
%{_mandir}/man1/cstrans-df-run.1*
197
217
218
+ %if %{with static}
219
+ %files static
220
+ %{_libexecdir}/csgrep-static
221
+ %endif
222
+
198
223
%if %{with python2}
199
224
%files -n python2-%{name}
200
225
%license COPYING
0 commit comments