# Maintainer: Jesus E. pkgname=numptyphysics pkgver=0.3.10 pkgrel=2 pkgdesc="Harness gravity with your crayon and set about creating blocks, ramps, levers, pulleys and whatever else" url='https://gitlab.com/thp/numptyphysics' arch=('i686' 'x86_64') license=('GPL-3') depends=('sdl2' 'sdl2_ttf' 'sdl2_image') makedepends=('graphicsmagick') groups=('games') source=("https://gitlab.com/thp/${pkgname}/-/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz" "numptyphysics" "fhs-compliant.patch") sha512sums=('5c74eaad0388b6689982d7566cafffb486240541969eed370d22b9ca5c882dc6d672e52adf254f5adf4c25e4992f141a91ce3f9392d1d86ab05cefa815c757bd' 'ad79de488bda606d100f75fba81a07923cdeae2e6c9a4c77e86eebaefa0a85993e9d0f685001fb10e9566379c6042c93acfadb7addfa5e02367b387274267f1e' '1387408b1c209f219242a5603b2eb396f8346e748826151f83258cd153f0d7437e0ec13a148a06eb9a1028dd9cd7767b1e187cf9f6bca5239f0de45ef2eb8638') prepare() { cd ${pkgname}-${pkgver} patch -Np1 -i ${srcdir}/fhs-compliant.patch } build() { cd ${pkgname}-${pkgver} make } package() { cd ${pkgname}-${pkgver} make DESTDIR="${pkgdir}" install # add missing icons for SIZE in 16 24 32 48 64 96 128; do # set modify/create for reproducible builds gm convert -scale ${SIZE} +set date:create +set date:modify \ platform/freedesktop/$pkgname.png \ "${srcdir}"/$pkgname.png install -Dm644 "${srcdir}"/$pkgname.png "${pkgdir}/usr/share/icons/hicolor/${SIZE}x${SIZE}/apps/$pkgname.png" done # correcting binary-location mv "${pkgdir}/usr/bin/$pkgname" "${pkgdir}/usr/share/games/$pkgname/$pkgname.bin" rm -rf "${pkgdir}/usr/bin" install -Dm755 ${srcdir}/$pkgname "${pkgdir}/usr/games/$pkgname" # license install -Dm644 COPYING -t "${pkgdir}/usr/share/licenses/$pkgname" }