summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 59322f289244b1ba92b9c5d503055d8820140ff8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Maintainer: Jiri Tyr <jiri.tyr@gmail.com>

pkgname=openmarias
pkgver=1.1.0.svn.r222
pkgrel=2
pkgdesc="A Qt-based Marias card game."
arch=('x86_64')
url='http://openmarias.sourceforge.net'
license=('GNU')
depends=('bzip2'
         'freetype2'
         'gcc-libs'
         'glib2'
         'glibc'
         'graphite'
         'harfbuzz'
         'icu'
         'libgcrypt'
         'libgpg-error'
         'libpng'
         'libx11'
         'libxau'
         'libxcb'
         'libxdmcp'
         'lz4'
         'pcre'
         'pcre2'
         'qt5-base'
         'systemd-libs'
         'xz'
         'zlib'
         'zstd'
         )
makedepends=()
source=('openmarias::svn+https://svn.code.sf.net/p/openmarias/code'
        'qt5_fix.diff'
        'path.diff'
        'openmarias.desktop'
        )
sha256sums=('SKIP'
            '80ce09a4f6f71969e96b7a4b4ad0c9887c68b51de3e85022931254dfd142ba3f'
            '0ea629f32bc12aaf16455b4a60a1b99f8e17d66183146151024fd1e80cb06d98'
            '415ac6985279db9ce3388ddf604e7c641c5c2b7e51290a83d05469be0e269fdf'
           )

pkgver() {
  cd $pkgname
  echo "$(cat default.ini | egrep '^(major|minor|revision)=' | sed -r -e 's/.*=//' -e 's/^([0-9]).*/\1/' | tr '\n' '.' | sed 's/.$//').svn.r$(svnversion | tr -d M)"
}

prepare() {
  cd $pkgname
  patch --forward --strip 0 --input "$srcdir/qt5_fix.diff"
  patch --forward --strip 1 --input "$srcdir/path.diff"
}

build() {
  cd $pkgname
  qmake -makefile
  make
}

package() {
  install -Dm755 "$srcdir/$pkgname/$pkgname" -t "$pkgdir/usr/bin"
  install -Dm644 "$srcdir/$pkgname/"{LICENCE,README_EN}.txt -t "$pkgdir/usr/share/doc/$pkgname"
  mkdir -p "$pkgdir/usr/share/"{$pkgname/img,applications,pixmaps}
  cp -r "$srcdir/$pkgname/img/"{classic7,rub.png} "$pkgdir/usr/share/$pkgname/img"
  cp -r "$srcdir/$pkgname/i18n" "$pkgdir/usr/share/$pkgname/"
  cp "$srcdir/$pkgname/default.ini" $pkgdir/usr/share/$pkgname/marias.ini
  cp "$srcdir/$pkgname.desktop" $pkgdir/usr/share/applications/
  cp "$srcdir/$pkgname/img/favicon.png" $pkgdir/usr/share/pixmaps/$pkgname.png
}