blob: 52875f29c2a444102d0ba3f7ed16759fc540ba95 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# Maintainer: Cranky Supertoon <crankysupertoon@gmail.com>
pkgname="amulet-map-editor-bin"
pkgver="0.6.10.0"
pkgrel=1
arch=('x86_64')
pkgdesc="A new Minecraft world editor and converter that supports all versions since Java 1.12 and Bedrock 1.7."
url="https://www.amulet-editor.com/"
license=('MIT')
makedepends=('gendesk' 'dos2unix' 'wget')
source_x86_64=(
"Amulet-v${pkgver}-linux.zip::https://github.com/Amulet-Team/Amulet-Map-Editor/releases/download/v${pkgver}/Amulet-v${pkgver}-linux.zip"
)
md5sums_x86_64=('SKIP')
prepare() {
# Generate .desktop
gendesk -f --pkgname "Amulet Map Editor" --pkgdesc "${pkgdesc}" --icon ${pkgname} --exec "/usr/bin/${pkgname}" --terminal "true" -n
cd ${srcdir}
mv Amulet\ Map\ Editor.desktop ${pkgname}.desktop
# make executable
cd "${srcdir}/Amulet/"
wget "https://pastebin.com/raw/Ec8QabtF" -O "amuletlaunch.sh" | dos2unix
dos2unix ./amuletlaunch.sh
}
package() {
# install the main files.
install -d -m755 "${pkgdir}/opt/${pkgname}"
cp -Rr "${srcdir}/Amulet/"* "${pkgdir}/opt/${pkgname}"
# desktop entry
install -D -m644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
# install the icon
install -d -m755 "${pkgdir}/usr/share/icons"
cp -Rr "${srcdir}/Amulet/amulet_map_editor/img/icon128.png" "${pkgdir}/usr/share/icons/${pkgname}.png"
# fix file permissions - all files as 644 - directories as 755
find "${pkgdir}/"{opt,usr} -type d -exec chmod 755 {} \;
find "${pkgdir}/"{opt,usr} -type f -exec chmod 644 {} \;
# link the binary
install -d -m755 "${pkgdir}/usr/bin"
ln -sr "${pkgdir}/opt/${pkgname}/amuletlaunch.sh" "${pkgdir}/usr/bin/${pkgname}"
# make sure the main binary has the right permissions
cd "${pkgdir}/opt/"
chmod -R 755 "${pkgname}"
}
|