summaryrefslogtreecommitdiff
path: root/Dockerfile/build-srpm.Dockerfile.in
blob: f7a8cf0bd6991b7557182954f07dbb5df37bce19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM rockylinux:9

# install pytest, sshd for test, and rpm-build
RUN set -ex && yum -y install rpm-build rpmdevtools

ARG mscpdir="/mscp-@MSCP_VERSION@"
ARG mscptgz="mscp-@MSCP_VERSION@.tar.gz"

COPY . ${mscpdir}

# install build dependency
RUN ${mscpdir}/scripts/install-build-deps.sh

# prepare rpmbuild
RUN rpmdev-setuptree \
	&& rm -rf ${mscpdir}/build	\
	&& tar zcvf /${mscptgz} --exclude-vcs ${mscpdir}	\
	&& cp /${mscptgz} ~/rpmbuild/SOURCES/	\
	&& cp ${mscpdir}/rpm/mscp.spec ~/rpmbuild/SPECS/

# build rpm and src.rpm
RUN rpmbuild -ba ~/rpmbuild/SPECS/mscp.spec