singularity recipe for CentOS-7 builder

This commit is contained in:
Tru Huynh (pasteur.fr) 2018-03-09 17:50:27 +01:00
parent 1e33d85dea
commit 1b51842fce
2 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,18 @@
building the container:
```
sudo singularity build CentOS-7-release-builder.simg Singularity
```
running it to build the rpm/deb
```
export OUT=`mktemp -d` && echo building in ${OUT} && \
singularity run -H ${OUT} CentOS-7-release-builder.simg
```
use the container to build another version:
```
export OUT=`mktemp -d` && echo building in ${OUT} && \
singularity exec -H ${OUT} CentOS-7-release-builder.simg bash -c "wget https://github.com/truatpasteurdotfr/barrier/archive/v2.0.0-RC2.tar.gz && rpmbuild -ta v2.0.0-RC2.tar.gz"
```

View File

@ -0,0 +1,32 @@
BootStrap: docker
From: centos:centos7
%post
yum -y update && yum -y upgrade
yum -y install epel-release
yum -y install cmake3 make qt5-qtbase-devel gcc \
avahi-compat-libdns_sd-devel gcc-c++ curl-devel \
openssl-devel \
libXtst-devel libXinerama-devel libICE-devel libXrandr-devel \
wget rpm-build alien fakeroot
# using aline for a quick and dirty conversion to debian, should be ok for stretch amd64
%runscript
# during the testing period using truatpasteurdotfr/barrier pre-released tarball
# final version should use the https://github.com/debauchee/barrier release versions
D=`mktemp -d`
echo '***' && \
echo "building in $D" && \
echo '***'
cd $D && \
wget https://github.com/truatpasteurdotfr/barrier/archive/v2.0.0-RC2.tar.gz && \
( rpmbuild -ta v2.0.0-RC2.tar.gz ) | tee rpmbuild.log && \
fakeroot alien -d ~/rpmbuild/RPMS/x86_64/barrier-2.0.0-1.el7.centos.x86_64.rpm && \
tar czvf rpmbuild.tgz rpmbuild.log ~/rpmbuild/{RPMS,SRPMS} barrier*.deb && \
echo '***' && \
echo results in $D
echo '***'