Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
chromebrew
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
chromebrew
Commits
b534e819
Commit
b534e819
authored
Feb 25, 2021
by
saltedcoffii
Committed by
GitHub
Feb 25, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[New Package] minecraft (#5277)
* [New Package] minecraft * Actual version
parent
87e26493
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
0 deletions
+61
-0
packages/minecraft.rb
packages/minecraft.rb
+61
-0
No files found.
packages/minecraft.rb
0 → 100644
View file @
b534e819
require
'package'
class
Minecraft
<
Package
description
'A sandbox video game developed by Mojang Studios AB.'
homepage
'https://minecraft.net'
version
'2.2.1867'
compatibility
'x86_64'
source_url
'https://launcher.mojang.com/download/Minecraft.deb'
source_sha256
'9a8b6b75db199461ae241fbee6adf65fc6636204c58eb79feff968e307464727'
depends_on
'libx11'
depends_on
'jdk8'
depends_on
'gtk2'
depends_on
'gtk3'
depends_on
'sommelier'
def
self
.
install
FileUtils
.
mkdir_p
"
#{
CREW_DEST_PREFIX
}
/bin"
FileUtils
.
cp_r
'opt'
,
"
#{
CREW_DEST_PREFIX
}
"
FileUtils
.
cp_r
'usr/share'
,
"
#{
CREW_DEST_PREFIX
}
"
Dir
.
chdir
"
#{
CREW_DEST_PREFIX
}
/bin"
do
@launcherscript
=
<<~
EOF
#!/bin/bash
if [[ ! -e /usr/local/.config/minecraft ]]; then
mkdir -pv /usr/local/.config/minecraft
fi
if [[ ! -e $HOME/.var/app/com.mojang.Minecraft ]]; then
mkdir -pv $HOME/.var/app/com.mojang.Minecraft
fi
if [[ -e $HOME/.minecraft ]]; then
if [[ ! -L $HOME/.minecraft ]]; then
cp -rv $HOME/.minecraft/* /usr/local/.config/minecraft
rm -r $HOME/.minecraft
ln -sv /usr/local/.config/minecraft $HOME/.minecraft
fi
else
ln -sv /usr/local/.config/minecraft $HOME/.minecraft
fi
if [[ -e $HOME/.var/app/com.mojang.Minecraft/.minecraft ]]; then
if [[ ! -L $HOME/.var/app/com.mojang.Minecraft/.minecraft ]]; then
cp -rv $HOME/.var/app/com.mojang.Minecraft/.minecraft/* /usr/local/.config/minecraft
rm -r $HOME/.var/app/com.mojang.Minecraft/.minecrft
ln -sv /usr/local/.config/minecraft $HOME/.var/app/com.mojang.Minecraft/.minecraft
fi
else
ln -s /usr/local/.config/minecraft $HOME/.var/app/com.mojang.Minecraft/.minecraft
fi
/usr/local/opt/minecraft-launcher/minecraft-launcher
EOF
IO
.
write
(
"minecraft-launcher"
,
@launcherscript
)
system
"chmod +x minecraft-launcher"
end
end
def
self
.
postinstall
puts
puts
"Your minecraft data is in the usual place, ~/.minecraft."
.
lightblue
puts
"To launch, just type `minecraft-launcher`."
.
lightblue
puts
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment