makedeb
The Legend of Zelda: Mystery of Solarus DX - A free 2D Zelda fangame
Viewing /PKGBUILD
.
Click here to go back to the Git tree for zsdx.
# Maintainer: exponential <echo ZXhwb25lbnRpYWxtYXRyaXhAcHJvdG9ubWFpbC5jb20K | base64 -d>
# Contributor: MCMic (AUR) <come@chilliet.eu>
# Contributor: Sam101 (AUR) <zoetrem @t gmail dot com>
# Contributor: BenObiWan (AUR) <benobiwan @t gmail dot com>
# Contributor: Huulivoide (AUR)
pkgname=zsdx
pkgver=1.12.3
pkgrel=2
pkgdesc="The Legend of Zelda: Mystery of Solarus DX - A free 2D Zelda fangame"
arch=('all')
url="https://www.solarus-games.org/en/games/the-legend-of-zelda-mystery-of-solarus-dx"
license=('custom')
depends=('solarus>=1.6.0')
makedepends=('cmake' 'zip')
source=("https://gitlab.com/solarus-games/${pkgname}/-/archive/v${pkgver}/${pkgname}-v${pkgver}.tar.gz")
b2sums=('bc4d72f96b4a77daf72caea12526512565598700c704094b704d7b4713083bc4559e2019e426504f3631b6936b5b87c27ce37f6827a2700ca0a4e4448447ff02')
build() {
cd "${srcdir}/${pkgname}-v${pkgver}"
cmake -D CMAKE_INSTALL_PREFIX="/usr" -D CMAKE_BUILD_TYPE=Release .
make
export _WRAPPER="#!/bin/sh
exec solarus-run /usr/share/games/solarus/$pkgname/data.solarus \"\$@\""
}
package() {
cd "${srcdir}/${pkgname}-v${pkgver}"
# doc
install -Dm644 changelog.md "${pkgdir}/usr/share/doc/${pkgname}/changelog"
install -Dm644 readme.md "${pkgdir}/usr/share/doc/${pkgname}/readme"
install -Dm644 license.txt "${pkgdir}/usr/share/doc/${pkgname}/license"
gzip "${pkgdir}/usr/share/doc/${pkgname}/changelog"
# install
make DESTDIR="${pkgdir}/" PREFIX="/usr" install
# adjustments
install -d "${pkgdir}/usr/share/games"
mv -T "${pkgdir}/usr/share/solarus" "${pkgdir}/usr/share/games/solarus"
mv -T "${pkgdir}/usr/bin" "${pkgdir}/usr/games"
echo "$_WRAPPER" > "$pkgdir/usr/games/$pkgname"
chmod 755 "$pkgdir/usr/games/$pkgname"
}