# Maintainer: exponential # Contributor: José Rebelo (AUR) _name=opensurge pkgname=opensurge-bullseye pkgver=0.5.2.1 pkgrel=0 pkgdesc='Open Surge is a fun 2D retro platformer inspired by Sonic games, and a game creation system (bullseye version).' arch=('i386' 'amd64' 'arm' 'armel' 'armhf' 'arm64') url="https://github.com/alemart/opensurge" license=('GPL3') provides=('opensurge') conflicts=('opensurge') depends=('liballegro5.2' 'surgescript-bullseye') makedepends=('cmake' 'liballegro5-dev' 'surgescript-bullseye') source=("$pkgname-$pkgver.tar.gz::https://github.com/alemart/opensurge/archive/v$pkgver.tar.gz") sha256sums=('27764a82d97b54026c90044fbc31ea4a61f7836568020b869e63376322a155af') prepare() { cd $_name-$pkgver # remove full path of complilation dir sed -i 's!^# Target properties$!# rm full path of complilation dir\nIF(NOT MSVC)\nTARGET_COMPILE_OPTIONS(\${GAME_UNIXNAME} PUBLIC "-ffile-prefix-map=${CMAKE_SOURCE_DIR}=.")\nENDIF()\n\n# Target properties!' CMakeLists.txt } build() { cd $_name-$pkgver mkdir -p build && cd build cmake -DCMAKE_INSTALL_PREFIX=/usr -DGAME_BINDIR=/usr/games .. make } package() { cd $_name-$pkgver/build make DESTDIR="$pkgdir/" install mkdir -p "$pkgdir/usr/share/doc/$pkgname/" mv "$pkgdir/usr/share/games/$_name/LICENSE" "$pkgdir/usr/share/doc/$pkgname/license" mv "$pkgdir/usr/share/games/$_name/README.md" "$pkgdir/usr/share/doc/$pkgname/readme" mv "$pkgdir/usr/share/games/$_name/CHANGES.md" "$pkgdir/usr/share/doc/$pkgname/changelog" gzip "$pkgdir/usr/share/doc/$pkgname/changelog" }