summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d31d16bda6bfb5b81e8ea605b56a1037900edc01 (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
# Maintainer: snogard <snogardb at gmail dot com>


pkgname=amdgpu-opengl-switcher-git
pkgver=1.0.r9.g7fcbd69
pkgrel=2
pkgdesc="Select needed OpenGL implementation with gl_mesa, gl_zink or gl_pro prefix"
url=https://github.com/CosmicFusion/amdgpu-opengl-switcher
arch=(any)
license=(GPL)
depends=(bash)
makedepends=(git)
source=("git+https://github.com/CosmicFusion/amdgpu-opengl-switcher.git")
sha256sums=('SKIP')
provides=("amdgpu-opengl-switcher=${pkgver}")
conflicts=('amdgpu-opengl-switcher')

pkgver() {
    cd "${srcdir}/amdgpu-opengl-switcher"
    if $(git describe --long --tags > /dev/null ) ; then
        git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
    else
        printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
    fi
}

package() {
    install -Dm755 "${srcdir}/amdgpu-opengl-switcher/src/usr/bin/gl_zink" "${pkgdir}/usr/bin/gl_zink"
    install -Dm755 "${srcdir}/amdgpu-opengl-switcher/src/usr/bin/gl_pro" "${pkgdir}/usr/bin/gl_pro"
    install -Dm755 "${srcdir}/amdgpu-opengl-switcher/src/usr/bin/gl_mesa" "${pkgdir}/usr/bin/gl_mesa"
    install -Dm644 "${srcdir}/amdgpu-opengl-switcher/src/usr/share/bash-completion/completions/gl_zink" "${pkgdir}/usr/share/bash-completion/completions/gl_zink"
    install -Dm644 "${srcdir}/amdgpu-opengl-switcher/src/usr/share/bash-completion/completions/gl_pro" "${pkgdir}/usr/share/bash-completion/completions/gl_pro"
    install -Dm644 "${srcdir}/amdgpu-opengl-switcher/src/usr/share/bash-completion/completions/gl_mesa" "${pkgdir}/usr/share/bash-completion/completions/gl_mesa"
}