Skip to content

Commit 8722aaa

Browse files
committed
make-srpm.sh: use %cmake3{,_build,_install} and %ctest3 macros
... which are supported since EPEL 7.
1 parent 2b3b6b2 commit 8722aaa

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

make-srpm.sh

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ fi
7373

7474
SPEC="./$PKG.spec"
7575
cat > "$SPEC" << EOF
76+
# disable in source builds on EPEL <9
77+
%undefine __cmake_in_source_build
78+
%undefine __cmake3_in_source_build
79+
7680
# python2 is not available on RHEL > 7 and Fedora
7781
%if 0%{?rhel} > 7 || 0%{?fedora}
7882
%bcond_with python2
@@ -151,19 +155,16 @@ code scan defect lists to find out added or fixed defects.
151155
152156
%build
153157
make version.cc
154-
mkdir -p %{_target_platform}
155-
cd %{_target_platform}
156-
%cmake3 .. -S.. -B. \\
158+
%cmake3 \\
157159
-DPYCSDIFF_PYTHON2=%{?with_python2:ON} \\
158160
-DPYCSDIFF_PYTHON3=%{?with_python3:ON}
159-
%make_build
161+
%cmake3_build
160162
161163
%install
162-
%make_install -C %{_target_platform}
164+
%cmake3_install
163165
164166
%check
165-
cd %{_target_platform}
166-
ctest3 %{?_smp_mflags} --output-on-failure
167+
%ctest3
167168
168169
%files
169170
%{_bindir}/csdiff

0 commit comments

Comments
 (0)