# Maintainer: Ricardo Cabral pkgname=tibia pkgver=11.30.4876 pkgrel=1 pkgdesc="A fast-paced free massively multiplayer online role-playing game." arch=('x86_64') url="http://www.tibia.com" license=('custom') depends=('glu' 'libgl' 'libice' 'libxext' 'pcre' 'qt5-base' 'qt5-declarative') makedepends=('gendesk' 'python-html2text') source=("${pkgname}-${pkgver}.tar.gz::http://static.tibia.com/download/tibia.x64.tar.gz" "${pkgname}-agreement.php::http://www.tibia.com/support/agreement.php" "tibia-starter.patch") sha256sums=('6c26ef719014666734f7aa41ede7bc2c5e58dccf8af597bc9b15132bac586fed' '965edf1cf67698f9dcfcbced495e0e96a666207a9a0b91fb769ed386a5f1efe5' 'db6e56882605c6bd5975b901536d309608f69f161ba928e17f913c1356daac15') prepare() { gendesk -f -n html2text "${pkgname}-agreement.php" > LICENSE # Adjust start-tibia.sh patch -Np1 -i "tibia-starter.patch" } package() { mkdir -p "${pkgdir}/opt/Tibia" cp -drv --no-preserve=ownership ${pkgname}-${pkgver}/* "${pkgdir}/opt/Tibia" chmod -R 775 "${pkgdir}/opt/Tibia" chgrp -R games "${pkgdir}/opt/Tibia" install -Dm644 ${pkgname}.desktop "${pkgdir}/usr/share/applications/${pkgname}.desktop" install -Dm644 ${pkgname}-${pkgver}/tibia.ico -t "${pkgdir}/usr/share/pixmaps/" install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" mkdir -p "${pkgdir}/usr/bin" install -Dm755 ${pkgname}-${pkgver}/start-tibia.sh "${pkgdir}/usr/bin/tibia" }