initial import
This commit is contained in:
50
numptyphysics/PKGBUILD
Normal file
50
numptyphysics/PKGBUILD
Normal file
@@ -0,0 +1,50 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
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"
|
||||
}
|
||||
22
numptyphysics/fhs-compliant.patch
Normal file
22
numptyphysics/fhs-compliant.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
--- a/mk/install.mk 2021-06-06 14:12:47.000000000 +0200
|
||||
+++ b/mk/install.mk 2021-09-06 23:06:08.074445745 +0200
|
||||
@@ -2,8 +2,8 @@
|
||||
PREFIX ?= /usr
|
||||
|
||||
install: $(APP) $(ADDITIONAL_INSTALL_TARGETS)
|
||||
install -D -m 755 $(APP) $(DESTDIR)/$(PREFIX)/bin/$(APP)
|
||||
- mkdir -p $(DESTDIR)/$(PREFIX)/share/$(APP)
|
||||
- cp -rpv data $(DESTDIR)/$(PREFIX)/share/$(APP)/
|
||||
+ mkdir -p $(DESTDIR)/$(PREFIX)/share/games/$(APP)
|
||||
+ cp -rpv data $(DESTDIR)/$(PREFIX)/share/games/$(APP)/
|
||||
|
||||
.PHONY: install
|
||||
--- a/src/Os.cpp 2021-06-06 14:12:47.000000000 +0200
|
||||
+++ b/src/Os.cpp 2021-09-06 23:23:48.202432437 +0200
|
||||
@@ -302,5 +302,5 @@
|
||||
}
|
||||
|
||||
// System-wide installation
|
||||
- return thp::format("%s/../share/%s/data", g_appDir.c_str(), appName().c_str());
|
||||
+ return thp::format("%s/../share/games/%s/data", g_appDir.c_str(), appName().c_str());
|
||||
}
|
||||
2
numptyphysics/numptyphysics
Normal file
2
numptyphysics/numptyphysics
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
exec "/usr/share/games/numptyphysics/numptyphysics.bin"
|
||||
Reference in New Issue
Block a user