Revert To Binary Packaging
minecraft-pi-reborn/pipeline/head There was a failure building this commit Details

This commit is contained in:
TheBrokenRail 2021-11-11 20:12:16 -05:00
parent 43d27e8e11
commit 941572063e
23 changed files with 117 additions and 130 deletions

8
.gitmodules vendored Normal file
View File

@ -0,0 +1,8 @@
[submodule "dependencies/libpng/src"]
path = dependencies/libpng/src
url = https://github.com/glennrp/libpng.git
shallow = true
[submodule "dependencies/zlib/src"]
path = dependencies/zlib/src
url = https://github.com/madler/zlib.git
shallow = true

View File

@ -1,7 +0,0 @@
# Compile For i386
include("${CMAKE_CURRENT_LIST_DIR}/base-toolchain.cmake")
# Use i386 Cross-Compiler
setup_toolchain("i386-linux-gnu")
# Details
set(CMAKE_SYSTEM_NAME "Linux")
set(CMAKE_SYSTEM_PROCESSOR "i386")

View File

@ -0,0 +1,9 @@
# Warning
message(WARNING "i686 Builds Are Unsupported, Proceed At Your Own Risk")
# Compile For i686
include("${CMAKE_CURRENT_LIST_DIR}/base-toolchain.cmake")
# Use i686 Cross-Compiler
setup_toolchain("i686-linux-gnu")
# Details
set(CMAKE_SYSTEM_NAME "Linux")
set(CMAKE_SYSTEM_PROCESSOR "i686")

6
debian/.gitignore vendored
View File

@ -1,6 +0,0 @@
*
!control
!copyright
!rules
!source
!.gitignore

7
debian/client-amd64 vendored Normal file
View File

@ -0,0 +1,7 @@
Package: minecraft-pi-reborn-client
Version: ${VERSION}
Maintainer: TheBrokenRail <connor24nolan@live.com>
Description: Fun with Blocks
Homepage: https://www.minecraft.net/en-us/edition/pi
Architecture: amd64
Depends: libc6, libstdc++6, libc6-armhf-cross, libstdc++6-armhf-cross, zenity, libgles1, libegl1, libglfw3 | libglfw3-wayland, libfreeimage3, libopenal1, qemu-user-static

7
debian/client-arm64 vendored Normal file
View File

@ -0,0 +1,7 @@
Package: minecraft-pi-reborn-client
Version: ${VERSION}
Maintainer: TheBrokenRail <connor24nolan@live.com>
Description: Fun with Blocks
Homepage: https://www.minecraft.net/en-us/edition/pi
Architecture: arm64
Depends: libc6, libstdc++6, libc6:armhf, libstdc++6:armhf, zenity, libgles1, libegl1, libglfw3 | libglfw3-wayland, libfreeimage3, libopenal1

7
debian/client-armhf vendored Normal file
View File

@ -0,0 +1,7 @@
Package: minecraft-pi-reborn-client
Version: ${VERSION}
Maintainer: TheBrokenRail <connor24nolan@live.com>
Description: Fun with Blocks
Homepage: https://www.minecraft.net/en-us/edition/pi
Architecture: armhf
Depends: libc6, libstdc++6, zenity, libgles1, libegl1, libglfw3 | libglfw3-wayland, libfreeimage3, libopenal1

21
debian/control vendored
View File

@ -1,21 +0,0 @@
Source: minecraft-pi-reborn
Section: games
Priority: optional
Maintainer: TheBrokenRail <connor24nolan@live.com>
Build-Depends: debhelper-compat (= 12), clang:native, lld:native, cmake, git, make:native, libglfw3, libglfw3-dev, libfreeimage3, libfreeimage-dev:native, libopenal1, libopenal-dev, crossbuild-essential-armhf
Standards-Version: 4.4.1
Homepage: https://www.minecraft.net/en-us/edition/pi
Vcs-Browser: https://gitea.thebrokenrail.com/TheBrokenRail/minecraft-pi-reborn
Vcs-Git: https://gitea.thebrokenrail.com/TheBrokenRail/minecraft-pi-reborn.git
Package: minecraft-pi-reborn-client
Architecture: amd64 i386 arm64 armhf
Multi-Arch: foreign
Depends: libc6, libstdc++6, libc6-armhf-cross [!arm64 !armhf], libstdc++6-armhf-cross [!arm64 !armhf], zenity, libgles1, libegl1, libglfw3 | libglfw3-wayland, libfreeimage3, libopenal1, qemu-user-static [!arm64 !armhf]
Description: Fun with Blocks
Package: minecraft-pi-reborn-server
Architecture: amd64 i386 arm64 armhf
Multi-Arch: foreign
Depends: libc6, libstdc++6, libc6-armhf-cross [!arm64 !armhf], libstdc++6-armhf-cross [!arm64 !armhf], qemu-user-static [!arm64 !armhf]
Description: Fun with Blocks (Dedicated Server)

21
debian/copyright vendored
View File

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2021 TheBrokenRail
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

24
debian/rules vendored
View File

@ -1,24 +0,0 @@
#!/usr/bin/make -f
DEB_CUSTOM_OUTPUT_DIR ?= ..
include /usr/share/dpkg/architecture.mk
%:
dh $@
override_dh_auto_configure:
override_dh_strip:
override_dh_dwz:
override_dh_makeshlibs:
override_dh_shlibdeps:
override_dh_auto_build:
./scripts/build.sh client $(DEB_HOST_ARCH)
./scripts/build.sh server $(DEB_HOST_ARCH)
override_dh_auto_install:
cp -ar out/client-$(DEB_HOST_ARCH)/. debian/minecraft-pi-reborn-client
cp -ar out/server-$(DEB_HOST_ARCH)/. debian/minecraft-pi-reborn-server
override_dh_builddeb:
dh_builddeb --destdir=${DEB_CUSTOM_OUTPUT_DIR}

7
debian/server-amd64 vendored Normal file
View File

@ -0,0 +1,7 @@
Package: minecraft-pi-reborn-server
Version: ${VERSION}
Maintainer: TheBrokenRail <connor24nolan@live.com>
Description: Fun with Blocks
Homepage: https://www.minecraft.net/en-us/edition/pi
Architecture: amd64
Depends: libc6, libstdc++6, libc6-armhf-cross, libstdc++6-armhf-cross, qemu-user-static

7
debian/server-arm64 vendored Normal file
View File

@ -0,0 +1,7 @@
Package: minecraft-pi-reborn-server
Version: ${VERSION}
Maintainer: TheBrokenRail <connor24nolan@live.com>
Description: Fun with Blocks
Homepage: https://www.minecraft.net/en-us/edition/pi
Architecture: arm64
Depends: libc6, libstdc++6, libc6:armhf, libstdc++6:armhf

7
debian/server-armhf vendored Normal file
View File

@ -0,0 +1,7 @@
Package: minecraft-pi-reborn-server
Version: ${VERSION}
Maintainer: TheBrokenRail <connor24nolan@live.com>
Description: Fun with Blocks
Homepage: https://www.minecraft.net/en-us/edition/pi
Architecture: armhf
Depends: libc6, libstdc++6

View File

@ -1,29 +1,20 @@
project(libpng)
include(FetchContent)
# Silence Warnings
add_compile_options(-w)
## LibPNG
# Download
FetchContent_Declare(
libpng
GIT_REPOSITORY "https://github.com/glennrp/libpng.git"
GIT_TAG "v1.2.59"
)
FetchContent_Populate(libpng)
set(ZLIB_LIBRARY zlib)
set(ZLIB_INCLUDE_DIR "${zlib_SOURCE_DIR}" "${zlib_BINARY_DIR}")
set(ZLIB_LIBRARY zlibstatic)
set(ZLIB_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../zlib" "${CMAKE_CURRENT_BINARY_DIR}/../zlib")
set(CMAKE_POLICY_DEFAULT_CMP0054 OLD) # Silence Warning
add_subdirectory("${libpng_SOURCE_DIR}" "${libpng_BINARY_DIR}" EXCLUDE_FROM_ALL)
add_subdirectory(src EXCLUDE_FROM_ALL)
set(CMAKE_POLICY_DEFAULT_CMP0054 NEW) # Re-Enable New Behavior
set_target_properties(png12 PROPERTIES LINK_FLAGS "-Wl,--version-script='${CMAKE_CURRENT_SOURCE_DIR}/libpng.vers'") # Use Symbol Versioning
set_target_properties(png12 PROPERTIES LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libpng.vers") # Use Symbol Versioning
set_target_properties(png12 PROPERTIES DEBUG_POSTFIX "") # Fix LibPNG Suffix In Debug Mode
# Ensure Build
add_custom_target(png12-build ALL DEPENDS png12)
# Install
install(TARGETS png12 DESTINATION "${MCPI_LIB_DIR}")

1
dependencies/libpng/src vendored Submodule

@ -0,0 +1 @@
Subproject commit 5bb5bf345aef1e62adcfe30791f4364730a2aede

View File

@ -13,4 +13,3 @@ FetchContent_Populate(minecraft-pi)
# Install
install(DIRECTORY "${minecraft-pi_SOURCE_DIR}/" DESTINATION "${MCPI_INSTALL_DIR}" USE_SOURCE_PERMISSIONS)

View File

@ -1,24 +1,12 @@
project(zlib)
include(FetchContent)
# Silence Warnings
add_compile_options(-w)
## zlib
# Download
FetchContent_Declare(
zlib
GIT_REPOSITORY "https://github.com/madler/zlib.git"
GIT_TAG "v1.2.11"
)
FetchContent_Populate(zlib)
include_directories("${zlib_SOURCE_DIR}" "${zlib_BINARY_DIR}") # Fix ZLib Build
add_subdirectory("${zlib_SOURCE_DIR}" "${zlib_BINARY_DIR}" EXCLUDE_FROM_ALL)
add_subdirectory(src EXCLUDE_FROM_ALL)
# Ensure Build
add_custom_target(zlib-build ALL DEPENDS zlib)
# Install
install(TARGETS zlib DESTINATION "${MCPI_LIB_DIR}")
add_custom_target(zlib-build ALL DEPENDS zlibstatic)

1
dependencies/zlib/src vendored Submodule

@ -0,0 +1 @@
Subproject commit cacf7f1d4e3d44d871b605da3b647f07d718623f

14
scripts/build-all.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/sh
set -e
# Clean Prefix
rm -rf out
# Build
./scripts/build.sh client amd64
./scripts/build.sh server amd64
./scripts/build.sh client arm64
./scripts/build.sh server arm64
./scripts/build.sh client armhf
./scripts/build.sh server armhf

View File

@ -14,12 +14,13 @@ echo '==== Installing Dependencies ===='
./scripts/install-dependencies.sh
# Build
echo '==== Building & Packaging ===='
rm -rf out build
./scripts/package.sh amd64
./scripts/package.sh arm64
./scripts/package.sh armhf
echo '==== Building ===='
./scripts/build-all.sh
# Test
echo '==== Testing ===='
./scripts/test.sh
# Package
echo '==== Packaging ===='
./scripts/package.sh

View File

@ -20,7 +20,6 @@ sudo apt-get dist-upgrade -y
# Install
sudo apt-get install --no-install-recommends -y \
build-essential \
ca-certificates \
lsb-release \
git \
@ -28,10 +27,6 @@ sudo apt-get install --no-install-recommends -y \
lld \
cmake \
make \
dpkg-dev \
debhelper \
devscripts \
libdistro-info-perl \
libglfw3 libglfw3-dev \
libfreeimage3 libfreeimage-dev \
crossbuild-essential-armhf \

View File

@ -3,18 +3,35 @@
set -e
# Prepare
rm -f debian/changelog
PACKAGE='minecraft-pi-reborn'
VERSION="$(cat VERSION)"
DISTRO="$(lsb_release -cs)"
EDITOR='true' NAME='TheBrokenRail' EMAIL='connor24nolan@live.com' dch -u low -v "${VERSION}" --create --distribution "${DISTRO}" --package "${PACKAGE}" "Release ${VERSION}"
# Custom Architecture
ARCH="$(dpkg-architecture -qDEB_BUILD_ARCH)"
if [ -z "$1" ]; then
ARCH="$1"
fi
# Common
package() {
local dir="out/$1"
# Build
export DEB_CUSTOM_OUTPUT_DIR='out'
debuild --no-lintian -a"${ARCH}" -us -uc --buildinfo-option=-u"${DEB_CUSTOM_OUTPUT_DIR}" --changes-option=-u"${DEB_CUSTOM_OUTPUT_DIR}" -b
# Create DEBIAN Dir
rm -rf "${dir}/DEBIAN"
mkdir -p "${dir}/DEBIAN"
cp "debian/$1" "${dir}/DEBIAN/control"
# Format DEBIAN/control
sed -i "s/\${VERSION}/${VERSION}/g" "${dir}/DEBIAN/control"
# Fix Permissions On Jenkins
chmod -R g-s "${dir}"
# Package
dpkg-deb --root-owner-group --build "${dir}" out
}
# Find And Package
for dir in out/*; do
# Check If Directory Exists
if [ -d "${dir}" ]; then
# Check If Debian Package Exists
pkg="$(basename ${dir})"
if [ -f "debian/${pkg}" ]; then
package "${pkg}"
fi
fi
done

View File

@ -3,7 +3,7 @@
set -e
# Add minecraft-pi-reborn-server To PATH
export PATH="$(pwd)/out/server-$(dpkg-architecture -qDEB_HOST_ARCH)/usr/bin:${PATH}"
export PATH="$(pwd)/out/server-x86_64/usr/bin:${PATH}"
# Create Test Directory
rm -rf build/test