I'd would like to transition an existing *.spec file from the fedora style
%cmake*
commands to the alternate %cmake3
based one (eg. Amazon Linux 2
).
What should I replace an existing %cmake_build
with ?
Minimal reproducible example:
% cat Dockerfile
FROM public.ecr.aws/lambda/dotnet:7
WORKDIR /tmp
RUN curl -O https://kojipkgs.fedoraproject.org//packages/dcmtk/3.6.7/3.fc39/src/dcmtk-3.6.7-3.fc39.src.rpm
RUN yum -y update && yum -y install rpm-build make gcc-c++ cmake3 libjpeg-devel \
libpng-devel libtiff-devel libxml2-devel openssl-devel zlib-devel doxygen \
git-core
RUN rpm -i dcmtk-3.6.7-3.fc39.src.rpm
WORKDIR /root/rpmbuild/SPECS/
RUN sed -e '/0017-Increase-sleep-for-tests.patch/ s/^#*/#/' -i dcmtk.spec
RUN sed -e 's/BuildRequires: cmake/BuildRequires: cmake3/g' -i dcmtk.spec
RUN sed -e 's/%cmake /%cmake3 /g' -i dcmtk.spec
RUN rpmbuild -ba dcmtk.spec
Gives:
% docker build .
[...]
-- Build files have been written to: /root/rpmbuild/BUILD/dcmtk-3.6.7
+ %cmake_build
/var/tmp/rpm-tmp.p5JL4r: line 70: fg: no job control
error: Bad exit status from /var/tmp/rpm-tmp.p5JL4r (%build)
And I do not see any cmake3_build
command in:
# grep build /usr/lib/rpm/macros.d/macros.cmake3
Asked by malat
(3429 rep)
Jun 22, 2023, 07:42 AM
Last activity: Jun 22, 2023, 08:34 AM
Last activity: Jun 22, 2023, 08:34 AM