summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorOndřej Hruška2015-09-06 12:56:33 +0200
committerOndřej Hruška2015-09-06 12:56:33 +0200
commita295365490c98238a6b7e721833ae3f3b99afdc9 (patch)
treedfce78e853528b16f763f44bc00c47b2cd57bff9
parentbd5303c4d7ef667115e8425e6752b26a96ed07ee (diff)
downloadaur-a295365490c98238a6b7e721833ae3f3b99afdc9.tar.gz
added a desktop file
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD61
2 files changed, 48 insertions, 17 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7d78f5e5bc1..c61a76a33c1 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,10 +1,12 @@
pkgbase = rpw
pkgdesc = Minecraft resource pack editor by MightyPork
pkgver = 4.3.0
- pkgrel = 2
+ pkgrel = 3
url = http://rpw.ondrovo.com/
arch = any
license = RPW license
+ makedepends = unzip
+ makedepends = gendesk
depends = java-runtime
optdepends = gimp: Editing textures
optdepends = audacity: Editing sound files
diff --git a/PKGBUILD b/PKGBUILD
index e737d4f6e8e..a811ee518f5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,38 +3,67 @@
pkgname=rpw
pkgver=4.3.0
+pkgrel=3
+
+# jar filename on dropbox
FNAME="RPW-4-3-0.jar"
-pkgrel=2
+# icon file in the jar
+ICONFILE="icon-96.png"
pkgdesc="Minecraft resource pack editor by MightyPork"
-arch=('any')
-url='http://rpw.ondrovo.com/'
-license=('RPW license')
+arch=("any")
+url="http://rpw.ondrovo.com/"
+license=("RPW license")
+# Gendesk entries
+_name="RPW"
+_genericname="Resource Pack Editor"
+_comment="$pkgdesc"
+_exec=("rpw")
+_categories="Application;Development"
-depends=('java-runtime')
source=("https://dl.dropboxusercontent.com/u/64454818/RPW/$FNAME"
- 'https://raw.githubusercontent.com/MightyPork/rpw/master/LICENSE.txt')
+ "https://raw.githubusercontent.com/MightyPork/rpw/master/LICENSE.txt")
+
+depends=('java-runtime')
+
+optdepends=("gimp: Editing textures"
+ "audacity: Editing sound files"
+ "minecraft: Source of vanilla asset files (.minecraft folder)")
-optdepends=('gimp: Editing textures'
- 'audacity: Editing sound files'
- 'minecraft: Source of vanilla asset files (.minecraft folder)')
+makedepends=("unzip"
+ "gendesk")
-provides=('rpw')
+provides=("rpw")
md5sums=('314d5fe7db04ca774d59982d95f23024'
'34ccc931e00e0e1354d2409159824290')
+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 "${srcdir}/LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ install -Dm 644 "LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
- # install files in /usr/share
- install -Dm 755 "${srcdir}/${FNAME}" "${pkgdir}/usr/share/${pkgname}/RPW.jar"
+ # install the JAR in /usr/share
+ install -Dm 755 "$FNAME" "$pkgdir/usr/share/$pkgname/$FNAME"
- # generate a launcher script
- echo -e "#!/bin/bash\nexec /usr/bin/java -jar '/usr/share/${pkgname}/RPW.jar' \"\$@\"\n" > "${srcdir}/launcher.sh"
+ # Extract & install the icon
+ install -Dm644 "$pkgname.png" "$pkgdir/usr/share/pixmaps/$pkgname.png"
- install -Dm 755 "${srcdir}/launcher.sh" "${pkgdir}/usr/bin/rpw"
+ # 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"
}