diff options
author | Arkadiy Illarionov | 2022-06-12 16:41:39 +0300 |
---|---|---|
committer | Arkadiy Illarionov | 2022-06-12 16:41:39 +0300 |
commit | fe4b980a7cecfdd3f1ac3cac32e647eccd905e66 (patch) | |
tree | ff9bfc6568ef8c9fd8a8df6fb2c46f4356900b34 | |
parent | 757946d4a1d9283429a9a84546b75583da7a1238 (diff) | |
download | aur-fe4b980a7cecfdd3f1ac3cac32e647eccd905e66.tar.gz |
Move to CMake build, add python optional dependency
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | PKGBUILD | 24 |
2 files changed, 15 insertions, 14 deletions
@@ -1,17 +1,20 @@ pkgbase = fheroes2 pkgdesc = Recreation of the Heroes of Might and Magic II game engine pkgver = 0.9.16 - pkgrel = 1 + pkgrel = 2 url = https://ihhub.github.io/fheroes2/ arch = i686 arch = x86_64 arch = armv7h license = GPL2 + makedepends = cmake makedepends = gettext + makedepends = ninja depends = sdl2 depends = sdl2_image depends = sdl2_mixer optdepends = curl: download demo version files + optdepends = python: extract animation resources from GOG CD image optdepends = wget: download demo version files optdepends = unzip: unpack demo version files conflicts = fheroes2-git @@ -1,15 +1,16 @@ pkgname=fheroes2 pkgver=0.9.16 -pkgrel=1 +pkgrel=2 pkgdesc="Recreation of the Heroes of Might and Magic II game engine" arch=('i686' 'x86_64' 'armv7h') url="https://ihhub.github.io/fheroes2/" license=('GPL2') depends=('sdl2' 'sdl2_image' 'sdl2_mixer') optdepends=('curl: download demo version files' + 'python: extract animation resources from GOG CD image' 'wget: download demo version files' 'unzip: unpack demo version files') -makedepends=('gettext') +makedepends=('cmake' 'gettext' 'ninja') conflicts=('fheroes2-git' 'fheroes2-svn') source=( $pkgname-$pkgver.tar.gz::https://github.com/ihhub/$pkgname/archive/$pkgver.tar.gz @@ -18,22 +19,19 @@ md5sums=('e9b2fde350ef9006861c206e2e556c0f') build() { cd "$srcdir/$pkgname-$pkgver" - FHEROES2_DATA=/usr/share/fheroes2 FHEROES2_WITH_IMAGE=1 make - make -C files/lang + + cmake -B build -G Ninja -S . \ + -DCMAKE_INSTALL_PREFIX=/usr + + cmake --build build } package() { cd "$srcdir/$pkgname-$pkgver" - install -Dm755 "src/dist/fheroes2" "$pkgdir/usr/bin/fheroes2" - install -Dm644 "script/packaging/common/fheroes2.desktop" "$pkgdir/usr/share/applications/fheroes2.desktop" - install -dm755 "$pkgdir/usr/share/fheroes2/data" - install -Dm644 files/data/*.h2d -t "$pkgdir/usr/share/fheroes2/files/data" - install -Dm644 files/lang/*.mo -t "$pkgdir/usr/share/fheroes2/files/lang" - install -dm755 "$pkgdir/usr/share/fheroes2/maps" - install -Dm755 "script/demo/download_demo_version.sh" "$pkgdir/usr/share/fheroes2/download_demo_version.sh" - install -Dm755 "script/homm2/extract_homm2_resources.sh" "$pkgdir/usr/share/fheroes2/extract_homm2_resources.sh" - install -Dm644 src/resources/fheroes2.png "$pkgdir/usr/share/pixmaps/fheroes2.png" + DESTDIR="$pkgdir" cmake --install build + + install -dm755 "$pkgdir/usr/share/fheroes2/maps" } # vim:set ts=2 sw=2 et: |