Set Required Docker Version In DEb Files

This commit is contained in:
TheBrokenRail 2020-12-05 17:02:35 -05:00
parent 28bcb0d5b5
commit 3533830669
4 changed files with 13 additions and 7 deletions

View File

@ -4,5 +4,5 @@ Maintainer: TheBrokenRail <connor24nolan@live.com>
Description: Fun with Blocks
Homepage: https://www.minecraft.net/en-us/edition/pi
Architecture: all
Depends: docker.io|docker-ce, docker-compose, zenity, policykit-1, passwd, login, qemu-user-static, binfmt-support
Depends: ${DEPENDENCIES}
Conflicts: minecraft-pi-virgl

View File

@ -4,5 +4,5 @@ Maintainer: TheBrokenRail <connor24nolan@live.com>
Description: Fun with Blocks
Homepage: https://www.minecraft.net/en-us/edition/pi
Architecture: all
Depends: docker.io|docker-ce, docker-compose, virgl-server, zenity, policykit-1, passwd, login, qemu-user-static, binfmt-support
Depends: ${DEPENDENCIES}, virgl-server
Conflicts: minecraft-pi-native

View File

@ -4,4 +4,4 @@ Maintainer: TheBrokenRail <connor24nolan@live.com>
Description: Fun with Blocks
Homepage: https://www.minecraft.net/en-us/edition/pi
Architecture: all
Depends: docker.io|docker-ce, docker-compose, qemu-user-static, binfmt-support
Depends: ${DEPENDENCIES}

View File

@ -3,6 +3,11 @@
# Current Version
DEB_VERSION='1.0.0'
# Dependencies
REQUIRED_DOCKER_VERSION='19.03'
COMMON_DEPENDENCIES="docker.io (>=${REQUIRED_DOCKER_VERSION}) | docker-ce (>=${REQUIRED_DOCKER_VERSION}), libseccomp2 (>=2.4.2), docker-compose, qemu-user-static, binfmt-support"
CLIENT_DEPENDENCIES="zenity, policykit-1, passwd, login"
set -e
# Docker Messes With SetGID
@ -16,9 +21,10 @@ mkdir -p out/deb
rm -rf debian/tmp
mkdir debian/tmp
# Set Version
prepare_version() {
# Prepare DEBIAN/control
prepare_control() {
sed -i 's/${VERSION}/'"${DEB_VERSION}.$(date --utc '+%Y%m%d.%H%M')"'/g' "$1/DEBIAN/control"
sed -i 's/${DEPENDENCIES}/'"${COMMON_DEPENDENCIES}$2"'/g' "$1/DEBIAN/control"
}
# Package Client DEBs
@ -30,7 +36,7 @@ package_client() {
rsync -r debian/client/common/ "debian/tmp/$1"
rsync -r "debian/client/$1/" "debian/tmp/$1"
cp debian/tmp/client-image.tar.gz "debian/tmp/$1/usr/share/minecraft-pi/client/image.tar.gz"
prepare_version "debian/tmp/$1"
prepare_control "debian/tmp/$1" ", ${CLIENT_DEPENDENCIES}"
# Build
dpkg -b "debian/tmp/$1" out/deb
}
@ -45,7 +51,7 @@ package_server() {
# Prepare
rsync -r debian/server/ debian/tmp/server
cp debian/tmp/server-image.tar.gz debian/tmp/server/usr/share/minecraft-pi/server/image.tar.gz
prepare_version debian/tmp/server
prepare_control debian/tmp/server ''
# Build
dpkg -b debian/tmp/server out/deb
}