Source

aur-genymotion / PKGBUILD

Full commit
# Maintainer: Andrea Cattaneo <andrea.cattaneo.dev@gmail.com>

pkgname=genymotion

pkgver=2.1.1

pkgrel=1

pkgdesc="Complete set of tools that provides a virtual environment for Android."

arch=('i686' 'x86_64')

license="UNKNOWN"

md5sums=('d79a01bf97565c7adf7714ae9345f5ce')

if test "$CARCH" == x86_64; then
    _ARCH="x64"
    md5sums+=('619aeb1d8380858ff8e771537213e03e')
else
    _ARCH="x86"
    md5sums+=('27adea440165d14b8c9d58bde3c26bf7')
fi

url="http://www.genymotion.com/"

depends=('virtualbox>=4.1.1' 'qtwebkit' 'libpng12' 'net-tools' 'qca' 'ffmpeg-compat' 'protobuf')

optdepends=('android-sdk: for developers')

install=genymotion.install
source=("genymotion.desktop" "http://files2.genymotion.com/genymotion/genymotion-${pkgver}/genymotion-${pkgver}_${_ARCH}.bin")

build() {
    cd $srcdir
    chmod +x ${pkgname}-${pkgver}_${_ARCH}.bin
}

package(){
    cd $pkgdir
    install -d "$pkgdir/usr"
    yes | ${srcdir}/${pkgname}-${pkgver}_${_ARCH}.bin -d $pkgdir/usr/ &>/dev/null
    rm usr/genymotion/libQt*
    install -d "$pkgdir/usr/bin/"
    ln -s /usr/genymotion/genymotion $pkgdir/usr/bin/genymotion
    ln -s /usr/genymotion/genymotion-shell $pkgdir/usr/bin/genymotion-shell
    install -Dm644 "$srcdir/genymotion.desktop" "$pkgdir/usr/share/applications/genymotion.desktop"
    chown -R root:root $pkgdir/usr/genymotion
}