summaryrefslogtreecommitdiff
path: root/PKGBUILD
blob: a2a50d48e607372f9573f1287995713c0603f803 (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
# Maintainer: jc_gargma <jc_gargma@iserlohn-fortress.net>

# # I maintain this because:
# Arch version lacks additional optimization and hardening flags

pkgname=mupen64plus-qt
pkgver=1.15
pkgrel=3.2
pkgdesc="A customizable launcher for Mupen64Plus"
arch=('i686' 'x86_64')
url="https://github.com/dh4/mupen64plus-qt"
license=('BSD')
depends=('quazip-qt5' 'mupen64plus' 'hicolor-icon-theme')
options=('lto')
install=mupen64plus-qt.install
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/dh4/${pkgname}/archive/${pkgver}.tar.gz"
        "quazip-fix.patch")
sha256sums=('c41448adb7dd6acb6d4f56f7cdd2f25a8fd9a9e9ee23e334c0969b835802f20a'
            'd5bb4fea752a82f190a8c243f54ab44979f4499af1386f832a1021beab92d7f6')
b2sums=('9db7c5c7fefa99466933e4526338487b138eb970595d0ac92aedb1649e9786785b2472b7716cd24080e99cddda9d434207d2387515a62f6b2c111076bdcb10ed'
        '44dc878a9f94a8a606d28fcf6581f7664f5689e1f30dfafafa34efd837cef3a0ab0ac2db7723879ca0e66f689ff10c4ec33f25dad95e440b7a7a4cf76ae3ca6d')

prepare() {
  cd "$srcdir/$pkgname-$pkgver"

  patch -Np1 -i "$srcdir"/quazip-fix.patch
}

build() {
  cd "$srcdir/$pkgname-$pkgver"

  export CFLAGS="$CFLAGS -O3 -fPIE"
  export CXXFLAGS="$CXXFLAGS -O3 -fPIE"
  export LDFLAGS="$LDFLAGS,-pie"

  qmake-qt5
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"

  install -Dm755 "mupen64plus-qt" "$pkgdir/usr/bin/mupen64plus-qt"
  install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  install -Dm644 "resources/mupen64plus-qt.desktop" "$pkgdir/usr/share/applications/mupen64plus-qt.desktop"
  install -Dm644 "resources/images/mupen64plus.png" "$pkgdir/usr/share/icons/hicolor/128x128/apps/mupen64plus-qt.png"
}