diff options
author | XZS | 2017-03-14 23:22:53 +0100 |
---|---|---|
committer | XZS | 2017-03-14 23:44:11 +0100 |
commit | e3e9d250a5149ae34ab38be47fb1fc73881a3046 (patch) | |
tree | 623f93e93441a58d973f8cf447126f9caef2f470 | |
parent | 63e61824e004c0acdd4243ce96f72d8b560e44d3 (diff) | |
download | aur-e3e9d250a5149ae34ab38be47fb1fc73881a3046.tar.gz |
include dedicated starter script
As the desktop file, this could be generated from a template.
The old script did never work correctly, anyway, and it did for two
reasons: When the CARCH modification was still in the prepare function,
packaging would configure it to search for a executable ending in .i686
while unity uses .x86 instead. Additionally, the data directory is only
found in the current working directory, so a cd is necessary.
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 16 | ||||
-rw-r--r-- | starter.sh | 4 |
3 files changed, 16 insertions, 8 deletions
@@ -1,7 +1,7 @@ pkgbase = minimetro pkgdesc = minimalistic subway layout game pkgver = gamma18 - pkgrel = 4 + pkgrel = 5 url = http://dinopoloclub.com/minimetro/ install = desktop.install arch = i686 @@ -15,9 +15,11 @@ pkgbase = minimetro depends = gtk-update-icon-cache source = hib://MiniMetro-gamma18-linux.tar.gz source = minimetro.desktop + source = starter.sh source = minimetro.png::http://dinopoloclub.com/press/mini_metro/images/icon.png md5sums = 765bfdb52584df48784728e6476f47d7 md5sums = b89a42a38136d0a126c8c13657b21c3f + md5sums = 5006f1c488369854b7ac714168742aae md5sums = 8412b1e4cc11be455af993d921a68ced pkgname = minimetro @@ -7,7 +7,7 @@ _longname="Mini Metro" pkgname="${_longname,,}" pkgname="${pkgname/ }" pkgver=gamma18 -pkgrel=4 +pkgrel=5 pkgdesc='minimalistic subway layout game' url="http://dinopoloclub.com/${pkgname}/" license=('custom:None') @@ -18,9 +18,11 @@ DLAGENTS+=('hib::/usr/bin/echo "Could not find %u. Manually download it to \"$(p install=desktop.install source=("hib://${_longname/ }-${pkgver}-linux.tar.gz" "${pkgname}.desktop" + "starter.sh" "${pkgname}.png::http://dinopoloclub.com/press/mini_metro/images/icon.png") md5sums=('765bfdb52584df48784728e6476f47d7' 'b89a42a38136d0a126c8c13657b21c3f' + '5006f1c488369854b7ac714168742aae' '8412b1e4cc11be455af993d921a68ced') package() { @@ -36,16 +38,16 @@ package() { cp -r --no-preserve=mode,ownership "${_longname}_Data" "$destdir" install "$_longname.$CARCH" "$destdir" - # Now, care for supplementary files. + # Care for the icon. for size in 16 22 24 32 36 48 64 72 96 128 192 256 384 512; do size=${size}x${size} install -d "$pkgdir/usr/share/icons/hicolor/$size/apps" convert $pkgname.png -resize $size "$pkgdir/usr/share/icons/hicolor/$size/apps/$pkgname.png" done - echo "#!/opt/$pkgname/$_longname.$CARCH" > "$pkgdir"/usr/bin/${pkgname} - chmod +x "$pkgdir"/usr/bin/$pkgname - - longname="$_longname" pkgname="$pkgname" pkgdesc="$pkgdesc" \ - envsubst < "$pkgname.desktop" > "$pkgdir/usr/share/applications/$pkgname.desktop" + # Compose the desktop entry and starter. + export longname="$_longname" pkgname pkgdesc CARCH + envsubst < "$pkgname.desktop" > "$pkgdir/usr/share/applications/$pkgname.desktop" + envsubst < starter.sh > "$pkgdir/usr/bin/$pkgname" + chmod +x "$pkgdir/usr/bin/$pkgname" } diff --git a/starter.sh b/starter.sh new file mode 100644 index 000000000000..b0699bf31bf9 --- /dev/null +++ b/starter.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +cd "/opt/$pkgname" +exec "./$longname.$CARCH" |