diff options
author | Alexander F Rødseth | 2016-09-07 10:27:25 +0200 |
---|---|---|
committer | Alexander F Rødseth | 2016-09-07 10:27:25 +0200 |
commit | 491c2a27a69e7b9948ffb4c84aa68eb626b56aca (patch) | |
tree | 5775c0b2d59978f7f2d44aca6abd804e09d48acc | |
parent | 79913a181241a69d43bc234525d9400490a8ade8 (diff) | |
download | aur-491c2a27a69e7b9948ffb4c84aa68eb626b56aca.tar.gz |
Detect DPI before adjusting the image size
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | PKGBUILD | 21 |
2 files changed, 16 insertions, 10 deletions
@@ -1,13 +1,16 @@ +# Generated by mksrcinfo v8 +# Wed Sep 7 08:27:20 UTC 2016 pkgbase = ghextris pkgdesc = Tetris-like game on a hexagonal grid pkgver = 0.9.0 - pkgrel = 4 + pkgrel = 5 url = http://mjr.iki.fi/software/ghextris arch = x86_64 arch = i686 license = GPL makedepends = gettext makedepends = setconf + makedepends = xorg-xdpyinfo depends = gnome-python source = http://mjr.iki.fi/software/ghextris_0.9.0-1.tar.gz sha256sums = cd67776a35561879407208a5ecd201a23fcd5726a4962eaba1e25219c44c4cd6 @@ -1,26 +1,21 @@ -# Maintainer: Alexander Rødseth <rodseth@gmail.com> -# Contributor: Arkham <arkham at archlinux dot us> +# Maintainer: Alexander F Rødseth <xyproto@archlinux.org> +# Contributor: Arkham <arkham@archlinux.us> # Contributor: brix <blbennett@telus.net> pkgname=ghextris pkgver=0.9.0 -pkgrel=4 +pkgrel=5 pkgdesc='Tetris-like game on a hexagonal grid' arch=('x86_64' 'i686') url='http://mjr.iki.fi/software/ghextris' license=('GPL') depends=('gnome-python') -makedepends=('gettext' 'setconf') +makedepends=('gettext' 'setconf' 'xorg-xdpyinfo') source=("http://mjr.iki.fi/software/${pkgname}_$pkgver-1.tar.gz") sha256sums=('cd67776a35561879407208a5ecd201a23fcd5726a4962eaba1e25219c44c4cd6') prepare() { cd "$pkgname-$pkgver" - - # HiDPI - sed -i 's/24/48/' ghextris.py - sed -i 's/26/52/' ghextris.py - sed -i 's/14/28/' ghextris.py setconf install.sh BINDIR '"$PREFIX/bin"' setconf install.sh SHAREDIR '"$PREFIX/share/ghextris"' @@ -28,6 +23,14 @@ prepare() { sed -i -e 's:share/games:share:' install.sh sed -i -e 's:python2.3:python2:' -e 's:whrandom:random:g' "$pkgname.py" + + # Adjust the image sizes for DPI > 96 + DPI=$(xdpyinfo | grep resolution | head -1 | cut -d"x" -f2 | cut -d" " -f1) + if (( DPI > 96 )); then + sed -i 's/24/48/' ghextris.py + sed -i 's/26/52/' ghextris.py + sed -i 's/14/28/' ghextris.py + fi } package() { |