blob: 1382ba1c3ebcb9fa69b1ce2f80faab2e136bf594 (
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
# Maintainer: Ondřej Hruška <ondra@ondrovo.com>
pkgname=rpw
pkgver=4.5.1
pkgrel=1
# jar filename on dropbox
FNAME="ResourcePackWorkbench.jar"
# icon file in the jar
ICONFILE="icon-96.png"
pkgdesc="Minecraft resource pack editor by MightyPork"
arch=("any")
url="http://mcrpw.github.io/"
license=("RPW license")
# Gendesk entries
_name="RPW"
_genericname="Resource Pack Editor"
_comment="$pkgdesc"
_exec=("rpw")
_categories="Application;Development"
source=("https://github.com/mcRPW/rpw/releases/download/v4.5.0/$FNAME"
"https://raw.githubusercontent.com/mcRPW/rpw/master/LICENSE.txt")
depends=('java-runtime')
optdepends=("gimp: Editing textures"
"audacity: Editing sound files"
"minecraft: Source of vanilla asset files (.minecraft folder)")
makedepends=("unzip"
"gendesk")
provides=("rpw")
md5sums=('49c7864029decd66c92a6d8998ce157f'
'6cddb8a804751e3bb58d427a8e20fcdb')
prepare() {
# extract icon as rpw.png
unzip -o "$srcdir/$FNAME" "$ICONFILE"
mv "$ICONFILE" "$pkgname.png"
# build desktop file (categories field is ignored by gendesk - bug?)
gendesk -f -n --pkgname "$pkgname" --pkgdesc "$pkgdesc" --categories="$_categories"
# generate launcher
echo -e "#!/bin/bash\nexec /usr/bin/java -jar '/usr/share/$pkgname/$FNAME' \"\$@\"\n" > "launcher.sh"
}
package() {
# install license
install -Dm 644 "LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
# install the JAR in /usr/share
install -Dm 755 "$FNAME" "$pkgdir/usr/share/$pkgname/$FNAME"
# Extract & install the icon
install -Dm644 "$pkgname.png" "$pkgdir/usr/share/pixmaps/$pkgname.png"
# Install the desktop file
install -Dm644 "$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
# generate a launcher script
install -Dm 755 "launcher.sh" "$pkgdir/usr/bin/rpw"
}
|