Build DEB

This commit is contained in:
TheBrokenRail 2020-09-26 20:48:46 -04:00
parent 70f5802c37
commit 8b61701707
15 changed files with 44 additions and 12 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@
/libpng /libpng
/core/build /core/build
/mods/build /mods/build
/out

View File

@ -14,12 +14,12 @@ ADD . /app
WORKDIR /app WORKDIR /app
RUN ./scripts/download-minecraft-pi.sh RUN ./build/download-minecraft-pi.sh
RUN ./scripts/build-mods.sh RUN ./build/build-mods.sh
RUN ./scripts/build-libpng12.sh RUN ./build/build-libpng12.sh
WORKDIR /app/minecraft-pi WORKDIR ./minecraft-pi
ENTRYPOINT ./launcher ENTRYPOINT ./launcher

12
Jenkinsfile vendored
View File

@ -13,7 +13,7 @@ pipeline {
} }
stage('Build') { stage('Build') {
steps { steps {
sh './build.sh' sh './scripts/build.sh'
} }
} }
stage('Publish') { stage('Publish') {
@ -24,5 +24,15 @@ pipeline {
sh 'docker push thebrokenrail/minecraft-pi' sh 'docker push thebrokenrail/minecraft-pi'
} }
} }
stage('Package') {
steps {
sh './scripts/package.sh'
}
post {
success {
archiveArtifacts artifacts: 'out/*', fingerprint: true
}
}
}
} }
} }

7
debian/DEBIAN/control vendored Normal file
View File

@ -0,0 +1,7 @@
Package: minecraft-pi
Version: 1.0.0
Maintainer: TheBrokenRail <connor24nolan@live.com>
Description: Fun with Blocks
Homepage: https://www.minecraft.net/en-us/edition/pi
Architecture: amd64
Depends: docker-io, virgl-server

5
debian/DEBIAN/postinst vendored Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
set -e
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes

View File

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 100 KiB

View File

@ -1,7 +0,0 @@
#!/bin/sh
set -e
sudo adduser "$(whoami)" docker || :
sudo cp -r data/. /

16
scripts/package.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/sh
set -e
# Docker Messes With SetGID
chmod -R g-s debian
# Allow minecraft-pi Script To Use Docker
chmod u+s debian/usr/bin/minecraft-pi
# Clean out Directory
rm -rf out
mkdir out
# Generate DEB
dpkg -b debian out