# Maintainer: Gadget3000 # Contributor: jimmy-6 pkgname=cogs pkgver=3 pkgrel=1 pkgdesc="A game in which you build machines from sliding tiles" arch=('i686' 'x86_64') url="http://www.cogsgame.com/" license=('unknown') depends=('gcc-libs' 'sdl<1.3' 'openal') makedepends=('unzip') groups=('humblebundle3' 'humblebundles') source=(cogs.desktop) md5sums=('425530cd26af362c2e98d4bf720b4372') #generate with 'makepkg -g' _archive="cogs-installer-build${pkgver}" _archive_md5="0c1c584c39bbc5c81343e413f8e1c0e5" build() { install -Dd ${srcdir}/extractedInstaller cd $srcdir if [ ! -f ${_archive} ]; then echo Please place ${_archive} into $(pwd) echo Press Enter to continue read -a _unused fi if ! echo "${_archive_md5} ${_archive}" | md5sum -c --quiet; then echo "Invalid checksum for ${_archive}" return 1 fi install -Dd ${pkgdir}/opt/ unzip -qqo ${_archive} -x guis/* meta/* scripts/* -d ${srcdir}/extractedInstaller/ && msg Finished Extracting install -Dd ${pkgdir}/opt/cogs mv ${srcdir}/extractedInstaller/data/* ${pkgdir}/opt/cogs/ if [ "${CARCH}" = "x86_64" ]; then rm -rf ${pkgdir}/opt/cogs/x86 rm -rf ${pkgdir}/opt/cogs/Cogs-x86 else rm -rf ${pkgdir}/opt/cogs/amd64 rm -rf ${pkgdir}/opt/cogs/Cogs-amd64 fi install -Dd ${pkgdir}/usr/bin #Create launcher echo \#\!/bin/sh > ${pkgdir}/usr/bin/cogs echo cd /opt/cogs/ >> ${pkgdir}/usr/bin/cogs cat ${pkgdir}/opt/cogs/Cogs | tail -n $[$(cat ${pkgdir}/opt/cogs/Cogs | wc -l)-1] >> ${pkgdir}/usr/bin/cogs chmod +x ${pkgdir}/usr/bin/cogs # install menu entry install -Dd ${pkgdir}/usr/share/applications install -m 644 'cogs.desktop' "${pkgdir}/usr/share/applications/cogs.desktop" }