summaryrefslogtreecommitdiff
path: root/PKGBUILD
blob: 6f14faee1c060420491894f2e0954d1565e66fd3 (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
# Maintainer: jc_gargma <jc_gargma@iserlohn-fortress.net>
# Maintainer (AUR): ainola
# Contributor (AUR): fledge (Giorgio Daino)

# # I maintain this because:
# AUR version doesn't cd to the correct subdirectory
# Arch version lacks additional optimization and hardening flags

pkgname=residualvm
pkgver=0.3.1
pkgrel=4.2
pkgdesc="A cross-platform 3D game interpreter for LucasArts LUA-based 3D adventures"
arch=('x86_64')
license=('LGPL')
url="https://www.residualvm.org/"
depends=('sdl2' 'libmad' 'libmpeg2' 'libvorbis' 'hicolor-icon-theme'
         'libjpeg-turbo' 'alsa-lib' 'glew' 'freetype2')
optdepends=('fluidsynth: for MIDI SoundFont2 support')
source=("$pkgname-$pkgver.tar.gz::https://github.com/residualvm/residualvm/archive/$pkgver.tar.gz")
sha256sums=('515b02129dd374bc9c0b732ddeaaaa3a342cc25ea0ea3c4ccf19141b5d362e1d')

build() {
    cd "${srcdir}/$pkgname-$pkgver"
  # -flto=4 breaks compilation
  export CFLAGS="$CFLAGS -O3 -fPIE"
  export CXXFLAGS="$CXXFLAGS -O3 -fPIE"
  export LDFLAGS="$LDFLAGS,-pie"
    ./configure --disable-debug \
                --enable-release \
                --prefix=/usr
    make
}

package() {
    cd "${srcdir}/$pkgname-$pkgver"
    make DESTDIR="$pkgdir" install
    install -Dm644 "dists/$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
    install -Dm644 "icons/$pkgname.png" "$pkgdir/usr/share/icons/hicolor/256x256/apps/$pkgname.png"
    install -Dm644 "icons/$pkgname-big.png" "$pkgdir/usr/share/icons/hicolor/512x512/apps/$pkgname.png"
}