summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5f8c046d9a431e338ca1856d40ae8876d69f09f3 (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
# Maintainer: Luca Weiss <luca (at) z3ntu (dot) xyz>

pkgname=linux-steam-integration-git
_pkgname=linux-steam-integration
pkgver=0.7.3.r0.g54bd492
pkgrel=1
pkgdesc="Helper for enabling better Steam integration on Linux"
url="https://github.com/clearlinux/linux-steam-integration"
arch=('x86_64' 'i686')
license=('LGPL2.1')
depends=('gtk3' 'steam')
makedepends=('git' 'meson')
optdepends=('steam-native-runtime: A package for installing all required deps for the native runtime.')
provides=("$_pkgname")
conflicts=("$_pkgname")
source=("git+https://github.com/clearlinux/linux-steam-integration.git"
        "git+https://github.com/intel/libnica.git")
sha512sums=('SKIP'
            'SKIP')

pkgver() {
  cd "$srcdir/$_pkgname"
  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd "$srcdir/$_pkgname"
  git config submodule.src/libnica.url $srcdir/libnica
  git submodule update
}

build() {
  # 64-bit build
  arch-meson "$_pkgname" build \
    -Dwith-shim=co-exist \
    -Dwith-frontend=true \
    -Dwith-steam-binary=/usr/lib/steam/steam \
    -Dwith-new-libcxx-abi=true

  ninja -C build

  # 32-bit build
  export CC="gcc -m32"
  export CXX="g++ -m32"
  export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"

  arch-meson "$_pkgname" build32 \
    -Dwith-shim=none \
    --libexecdir /usr/lib32 \
    --libdir /usr/lib32

  ninja -C build32
}

package() {
  DESTDIR="$pkgdir" ninja -C build install
  DESTDIR="$pkgdir" ninja -C build32 install
}

# vim:set ts=2 sw=2 et: