Add wrapper script and desktop file

master
Taeyeon Mori 8 years ago
parent eeae2e1a8a
commit 7e20232d29
  1. 9
      .SRCINFO
  2. 36
      PKGBUILD
  3. 4
      ckan
  4. 10
      ckan-handler.desktop

@ -1,17 +1,20 @@
# Generated by mksrcinfo v8
# Mon Mai 29 21:00:03 UTC 2017
pkgbase = ckan
pkgdesc = All you need to find, install, and manage mods for Kerbal Space Program (ksp)
pkgver = 1.22.3
pkgrel = 1
pkgrel = 2
url = https://github.com/KSP-CKAN/CKAN/
arch = any
license = MIT
makedepends = icoutils
depends = curl
depends = mono
conflicts = ckan-git
source = ckan-v1.22.3.exe::https://github.com/KSP-CKAN/CKAN/releases/download/v1.22.3/ckan.exe
source = ckan
source = ckan-handler.desktop
sha256sums = 8b02bb62f9786a9f3a764594d4a3297c73bc5d476099afcf48a4fa14b56a1204
sha256sums = 259c4dae66d32ff132ee39093db567ef13d3d34e76792d3621253e573fb1d301
sha256sums = 21302b106038c153bdd1edd32e2edbb40c064e3003a94aa023435ac718026bbd
pkgname = ckan

@ -1,21 +1,45 @@
# Maintainer: Patrik Plihal <patrik.plihal at gmail dot com>
# Maintainer: Taeyeon Mori <orochimarufan dot x3 at gmail dot com>
pkgname=ckan
pkgver=1.22.3
pkgrel=1
pkgrel=2
pkgdesc='All you need to find, install, and manage mods for Kerbal Space Program (ksp)'
arch=('any')
url="https://github.com/KSP-CKAN/CKAN/"
license=('MIT')
makedepends=("icoutils")
depends=('curl' 'mono')
conflicts=('ckan-git')
source=("${pkgname}-v${pkgver}.exe::https://github.com/KSP-CKAN/CKAN/releases/download/v${pkgver}/ckan.exe")
sha256sums=('8b02bb62f9786a9f3a764594d4a3297c73bc5d476099afcf48a4fa14b56a1204')
source=("${pkgname}-v${pkgver}.exe::https://github.com/KSP-CKAN/CKAN/releases/download/v${pkgver}/ckan.exe"
"ckan"
"ckan-handler.desktop")
sha256sums=('8b02bb62f9786a9f3a764594d4a3297c73bc5d476099afcf48a4fa14b56a1204'
'259c4dae66d32ff132ee39093db567ef13d3d34e76792d3621253e573fb1d301'
'21302b106038c153bdd1edd32e2edbb40c064e3003a94aa023435ac718026bbd')
package() {
mkdir -p "$pkgdir/usr/bin/"
cp "$srcdir/$pkgname-v$pkgver.exe" "$pkgdir/usr/bin/ckan"
chmod 755 "$pkgdir/usr/bin/ckan"
# /usr/lib/ckan arbitrarily chosen by original AUR submitter
# /opt/ckan might be more appropriate.
install -Dm755 "$srcdir/$pkgname-v$pkgver.exe" "$pkgdir/usr/lib/ckan/ckan.exe"
install -Dm755 "$srcdir/ckan" "$pkgdir/usr/bin/ckan"
# Extract Icon(s)
# Possibly download them from GH instead of extracting them?
wrestool -x -t 14 "$srcdir/$pkgname-v$pkgver.exe" > "$srcdir/$pkgname.ico"
for res in 256 128 96 64 48 32 16; do
mkdir -p "$pkgdir/usr/share/icons/hicolor/${res}x${res}/apps"
icotool -x -h $res "$srcdir/$pkgname.ico" -o "$pkgdir/usr/share/icons/hicolor/${res}x${res}/apps/ckan.png"
done
# Ship desktop file.
# CKAN will still install it's own version into ~/.local/share/applications on first launch,
# That will simply override this one since the file name matches.
# This avoids duplicate entries in the menues/Application lists.
# See GUI/URLHandlers.cs
install -Dm755 "$srcdir/ckan-handler.desktop" "$pkgdir/usr/share/applications/ckan-handler.desktop"
}

@ -0,0 +1,4 @@
#!/bin/sh
exec mono /usr/lib/ckan/ckan.exe

@ -0,0 +1,10 @@
[Desktop Entry]
Version=1.0
Type=Application
Name=CKAN
Description=The Comprehensive Kerbal Archive Network
Icon=ckan
Categories=Utility
Exec=/usr/bin/ckan gui %u
MimeType=x-scheme-handler/ckan
StartupNotify=true
Loading…
Cancel
Save