summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8237a68dda091f1709671256c80a54db663c5177 (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
## Maintainer: pyamsoft <pyam.soft@gmail.com>

_gitname=steam-wrapper
# shellcheck disable=SC2034
pkgname=steam-wrapper-git
# shellcheck disable=SC2034
pkgdesc="Steam wrapper for common operations (git version)"
# shellcheck disable=SC2034
pkgver=0.7.0.r159.3da61f7
# shellcheck disable=SC2034
pkgrel=1
# shellcheck disable=SC2034
arch=('i686' 'x86_64')
# shellcheck disable=SC2034
optdepends=('steam-native-runtime: Native runtime library support')
# shellcheck disable=SC2034
depends=('steam')
# shellcheck disable=SC2034
makedepends=('git')
# shellcheck disable=SC2034
provides=('steam-wrapper')
# shellcheck disable=SC2034
conflicts=('steam-wrapper')
# shellcheck disable=SC2034
license=('GPLv2')
# shellcheck disable=SC2034
sha256sums=('SKIP')
url="https://github.com/pyamsoft/steam-wrapper.git"
# shellcheck disable=SC2034
source=("${_gitname}::git+${url}")

pkgver() {
  # shellcheck disable=SC2154
  cd "$srcdir/$_gitname" || {
    msg "Could not cd into ${srcdir}/$_gitname"
    return 1
  }

  printf "%s.r%s.%s" "$(awk -F '=' \
    '{if (/^WRAPPER_VERSION=/) {print $2}}' \
    'steam-wrapper')" \
    "$(git rev-list --count HEAD)" \
    "$(git rev-parse --short HEAD)"
}

package() {
  # shellcheck disable=SC2154
  cd "$srcdir/$_gitname" || {
    msg "Could not cd into ${srcdir}/$_gitname"
    return 1
  }

  # Install the script
  # shellcheck disable=SC2154
  install -Dm 755 "${_gitname}" "${pkgdir}/usr/bin/${_gitname}"
    # Install the desktop file
  install -Dm644 "${_gitname}.desktop" \
          "${pkgdir}/usr/share/applications/${_gitname}.desktop"

    # Install the default configuration
  install -Dm 644 "${_gitname}.conf" \
          "${pkgdir}/etc/${_gitname}/${_gitname}.conf"
}