%define debug_package %{nil} Name: mindustry-git Version: 0.0.git.1212.728060d9 Release: 1%{?dist} Summary: The automation tower defense RTS License: GPL-3.0 URL: https://github.com/Anuken/Mindustry VCS: git+https://github.com/georgewoodall82/Mindustry.git#728060d912abee4225e20cf69d2dfb31d08ffeef: Source: Mindustry-728060d9.tar.gz Requires: java-17-openjdk BuildRequires: java-17-openjdk-devel %description Mindustry is a hybrid tower-defense sandbox factory game. Create elaborate supply chains of conveyor belts to feed ammo into your turrets, produce materials to use for building, and defend your structures from waves of enemies. Features include a map editor, 24 built-in maps, cross-platform multiplayer and large-scale PvP unit battles. %prep %setup -T -b 0 -q -n Mindustry %build ./gradlew desktop:dist %install install -Dm755 ./fastlane/metadata/android/en-US/images/icon.png "$RPM_BUILD_ROOT/opt/mindustry/icon.png" echo [Desktop Entry]> mindustry.desktop echo Name=Mindustry>> mindustry.desktop echo Exec=/usr/bin/mindustry>> mindustry.desktop echo Icon=/opt/mindustry/icon.png>> mindustry.desktop echo Type=Application>> mindustry.desktop install -Dm755 ./mindustry.desktop "$RPM_BUILD_ROOT/usr/share/applications/mindustry.desktop" cd ./desktop/build/libs/ install -Dm755 Mindustry.jar "$RPM_BUILD_ROOT/opt/mindustry/Mindustry.jar" echo '#!/bin/bash'> mindustry echo java -jar /opt/mindustry/Mindustry.jar>> mindustry chmod +x mindustry install -Dm755 mindustry "$RPM_BUILD_ROOT/usr/bin/mindustry" %post if command -v update-desktop-database >/dev/null 2>&1; then update-desktop-database -q /usr/share/applications 2>/dev/null ||: fi %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) /usr/bin/mindustry /opt/mindustry/Mindustry.jar /opt/mindustry/icon.png /usr/share/applications/mindustry.desktop %changelog