mirror of
https://bitbucket.org/svk28/rac-gui
synced 2024-12-04 02:36:54 +00:00
Добавлены docker-файлы для сборки пакетов
This commit is contained in:
parent
b399aeb7cf
commit
5aca28d00a
9
docker/debian/Dockerfile.debian
Normal file
9
docker/debian/Dockerfile.debian
Normal file
@ -0,0 +1,9 @@
|
||||
FROM debian:buster-slim
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y locales tcl tk libtcl libtk tcl-dev tk-dev libterm-readline-perl-perl git debhelper \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& localedef -i ru_RU -c -f UTF-8 -A /usr/share/locale/locale.alias ru_RU.UTF-8
|
||||
|
||||
ENV LANG=ru_RU.utf8
|
||||
|
||||
WORKDIR /home/builder
|
7
docker/debian/Dockerfile.rac-gui
Normal file
7
docker/debian/Dockerfile.rac-gui
Normal file
@ -0,0 +1,7 @@
|
||||
FROM svk28/tcltk-build-debian:10.5
|
||||
|
||||
VOLUME /files
|
||||
|
||||
ADD build-deb.sh .
|
||||
|
||||
CMD git clone https://bitbucket.org/svk28/rac-gui.git && ./build-deb.sh
|
18
docker/debian/build-deb.sh
Executable file
18
docker/debian/build-deb.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd rac-gui
|
||||
|
||||
VERSION=$(grep Version rac_gui.tcl | grep -oE '\b[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}\b')
|
||||
RELEASE=$(grep Release rac_gui.tcl | grep -oE '\b[0-9]{1,3}\b')
|
||||
|
||||
mv rac_gui.tcl racgui
|
||||
|
||||
sed -i "s+^set\ dir(lib)+set\ dir(lib)\ /usr/share/rac-gui/lib ;#+g" racgui
|
||||
|
||||
sed -i "s+\[pwd\]+/usr/share/rac-gui+g" racgui
|
||||
|
||||
tar czf ../rac-gui_${VERSION}.orig.tar.gz .
|
||||
|
||||
dpkg-buildpackage
|
||||
|
||||
cp ../rac-gui_${VERSION}-${RELEASE}_amd64.deb /files/
|
7
docker/redhat/Dockerfile.rac-gui
Normal file
7
docker/redhat/Dockerfile.rac-gui
Normal file
@ -0,0 +1,7 @@
|
||||
FROM svk28/tcltk-build-centos:8
|
||||
MAINTAINER svk@nuk-svk.ru
|
||||
VOLUME /files
|
||||
|
||||
ADD build-rpm.sh .
|
||||
|
||||
CMD ./build-rpm.sh
|
10
docker/redhat/Dockerfile.redhat
Normal file
10
docker/redhat/Dockerfile.redhat
Normal file
@ -0,0 +1,10 @@
|
||||
FROM centos:centos8
|
||||
MAINTAINER svk@nuk-svk.ru
|
||||
|
||||
RUN dnf update -y && dnf install -y tcl tcl-devel tk tk-devel rpm-build git && dnf clean all
|
||||
RUN useradd rpmbuild -u 5002 -g users -p rpmbuild
|
||||
USER rpmbuild
|
||||
ENV HOME /home/rpmbuild
|
||||
WORKDIR /home/rpmbuild
|
||||
RUN mkdir -p /home/rpmbuild/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
|
||||
RUN echo '%_topdir %{getenv:HOME}/rpmbuild' > /home/rpmbuild/.rpmmacros
|
21
docker/redhat/build-rpm.sh
Executable file
21
docker/redhat/build-rpm.sh
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
git clone https://bitbucket.org/svk28/rac-gui.git
|
||||
WORKDIR=/home/rpmbuild
|
||||
|
||||
VERSION=$(grep Version ${WORKDIR}/rac-gui/rac_gui.tcl | grep -oE '\b[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}\b')
|
||||
RELEASE=$(grep Release ${WORKDIR}/rac-gui/rac_gui.tcl | grep -oE '\b[0-9]{1,3}\b')
|
||||
|
||||
tar czf ${WORKDIR}/rpmbuild/SOURCES/rac-gui-${VERSION}-${RELEASE}.tar.gz rac-gui
|
||||
cp ${WORKDIR}/rac-gui/rac_gui.spec ${WORKDIR}/rpmbuild/SPECS/rac_gui.spec
|
||||
|
||||
sed -i "s/.*Version:.*/Version:\t${VERSION}/" ${WORKDIR}/rpmbuild/SPECS/rac_gui.spec
|
||||
sed -i "s/.*Release:.*/Release:\t${RELEASE}/" ${WORKDIR}/rpmbuild/SPECS/rac_gui.spec
|
||||
|
||||
rpmbuild -ba ${WORKDIR}/rpmbuild/SPECS/rac_gui.spec
|
||||
|
||||
#exit
|
||||
|
||||
cp ${WORKDIR}/rpmbuild/RPMS/noarch/rac-gui-${VERSION}-${RELEASE}.noarch.rpm /files/
|
||||
cp ${WORKDIR}/rpmbuild/SRPMS/rac-gui-${VERSION}-${RELEASE}.src.rpm /files/
|
Loading…
Reference in New Issue
Block a user