summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c6385cb323d6814465cd5e6ad185db415c32f59f (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
# Maintainer: Vaporeon <vaporeon@vaporeon.io>
pkgname=punes-git
pkgver=0.107.r1340.0d596403
pkgrel=1
pkgdesc="Nintendo Entertaiment System emulator"
arch=('x86_64')
url="https://github.com/punesemu/puNES"
license=('GPL2')
depends=('alsa-lib' 'desktop-file-utils' 'ffmpeg' 'hicolor-icon-theme' 'nvidia-cg-toolkit' 'qt5-base' 'qt5-svg')
makedepends=('cmake' 'git' 'qt5-tools')
conflicts=('punes')
provides=('punes')
source=("git+https://github.com/punesemu/puNES.git")
md5sums=('SKIP')

#breaks internal lib7zip
options=('!buildflags')

pkgver() {
    cd puNES
    printf "%s.r%s.%s" "$(git describe --abbrev=0 --tags | sed 's/v//')" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
    cd "${srcdir}"/puNES
    ./autogen.sh
    ./configure --prefix=/usr
    make
}

package() {
    #As of 11 January 2021 "make install" appears to be broken
    #cd "${srcdir}"/puNES
    #make DESTDIR="${pkgdir}" install
    #rm -f "${pkgdir}"/usr/share/applications/mimeinfo.cache

    #Install manually.
    cd "${srcdir}"/puNES/misc
    for i in 16 32 48 256; do
            icon=hicolor_apps_${i}x${i}_punes.png
            theme=`echo $icon | cut -d_ -f1`
            context=`echo $icon | cut -d_ -f2`
            size=`echo $icon | cut -d_ -f3`
            iconfile=`echo $icon | cut -d_ -f4`
            install -Dm 644 ./$icon "${pkgdir}"/usr/share/icons/$theme/$size/$context/$iconfile
        done
    install -Dm 644 ./punes.desktop "${pkgdir}"/usr/share/applications/punes.desktop
    cd "${srcdir}"/puNES/src
    install -Dm 755 ./punes "${pkgdir}"/usr/bin/punes
}