diff options
author | Michael Stöcker | 2015-09-20 16:02:31 +0200 |
---|---|---|
committer | Michael Stöcker | 2015-09-20 16:02:31 +0200 |
commit | ff44b4dfcc2716ccf8a2a2af20b3f7dac65fb8e6 (patch) | |
tree | 850fdbd7ec393cf984a4b7b427d0ac88d1880130 | |
download | aur-botanicula.tar.gz |
initial commit based on http://pkgbuild.com/git/aur-mirror.git/tree/botanicula
-rw-r--r-- | .SRCINFO | 11 | ||||
-rw-r--r-- | PKGBUILD | 58 | ||||
-rw-r--r-- | botanicula.install | 13 |
3 files changed, 82 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..4ac88f5c27b6 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,11 @@ +pkgbase = botanicula + pkgdesc = A point'n'click exploration game from the creators of Machinarium (requires full copy of the game) + pkgver = 20120501 + pkgrel = 1 + url = http://www.botanicula.net/ + install = botanicula.install + arch = any + license = custom:commercial + +pkgname = botanicula + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..4083767b857f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,58 @@ +# Maintainer: Ner0 + +pkgname=botanicula +pkgver=20120501 +pkgrel=1 +pkgdesc="A point'n'click exploration game from the creators of Machinarium (requires full copy of the game)" +arch=('any') +url="http://www.botanicula.net/" +license=('custom:commercial') +install=$pkgname.install + +# Uncomment next line to reduce the compression time (doesn't work with yaourt) +#PKGEXT='.pkg.tar' + +if [ "$CARCH" == 'i686' ]; then + _gamepkg=("$pkgname-$pkgver-i386.tar.gz") + depends=('gcc-libs' 'gtk2' 'hicolor-icon-theme' 'libxml2' 'nss') +elif [ "$CARCH" == 'x86_64' ]; then + _gamepkg=("$pkgname-$pkgver-amd64.tar.gz") + depends=('hicolor-icon-theme' 'lib32-gcc-libs' 'lib32-gtk2' 'lib32-libxml2' 'lib32-nss') +fi + +package () { + msg "You need a full copy of this game in order to install it" + msg "Searching for ${_gamepkg} in dir: \"$startdir\"" + pkgpath=$startdir + if [[ ! -f "$startdir/${_gamepkg}" ]]; then + error "Game package not found, please type absolute path to ${_gamepkg} (/home/$USER):" + read pkgpath + if [[ ! -f "${pkgpath}/${_gamepkg}" ]]; then + error "Unable to find game package." && return 1 + fi + fi + msg "Found game package, installing..." + + + # Creating folders + install -dm755 "$pkgdir/opt" + + msg "Extracting $_gamepkg..." + tar -xf "$pkgpath/$_gamepkg" -C "$pkgdir/opt/" + + # Installing launch script and desktop file + cd "$pkgdir/opt/$pkgname" + install -Dm644 "$pkgname.desktop.in" "$pkgdir/usr/share/applications/$pkgname.desktop" + install -Dm755 "$pkgname.in" "$pkgdir/usr/bin/$pkgname" + + # Installing icons + for i in 16 32 36 48 72 128 256 512; do + install -Dm644 "bin/data/icons/b$i.png" "$pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/$pkgname.png" + done + + sed -i 's|cd.*|cd /opt/botanicula/|' "$pkgdir/usr/bin/$pkgname" + sed -i 's|Exec=.*|Exec=/usr/bin/botanicula \&|' "$pkgdir/usr/share/applications/$pkgname.desktop" + sed -i 's|Icon=.*|Icon=botanicula|' "$pkgdir/usr/share/applications/$pkgname.desktop" + + rm -f "$pkgdir/opt/$pkgname"/*.{in,sh} +} diff --git a/botanicula.install b/botanicula.install new file mode 100644 index 000000000000..997dc82c0415 --- /dev/null +++ b/botanicula.install @@ -0,0 +1,13 @@ +post_install() { + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor +} + +post_upgrade() +{ + post_install "$1" +} + +post_remove() +{ + post_install "$1" +} |