summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f5cf3549cd11e99a1f23407e067b05d29fb2f73b (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
# Maintainer: oi_wtf <brainpower at mailbox dot org>

pkgname=sfml-git
pkgver=2.6.1.r975.gf05baef52
pkgrel=1
pkgdesc="A simple, fast, cross-platform, and object-oriented multimedia API"
arch=('i686' 'x86_64')
url="http://www.sfml-dev.org/"
license=('Zlib')
depends=('libsndfile' 'libxrandr' 'openal' 'glew' 'freetype2' 'libx11' 'libxcursor' 'libxi')
makedepends=('mesa' 'cmake' 'doxygen' 'systemd' 'ninja' 'git')
provides=('libsfml-window.so' 'libsfml-network.so' 'libsfml-system.so'
          'libsfml-audio.so' 'libsfml-graphics.so' 'sfml')
conflicts=('sfml')

source=("git+https://github.com/SFML/SFML.git")
sha256sums=('SKIP')

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

prepare() {
  cd "$srcdir/SFML"
}

build() {

  cmake -B build -S SFML -G Ninja \
      -DCMAKE_INSTALL_PREFIX=/usr \
      -DSFML_USE_SYSTEM_DEPS=ON \
      -DSFML_BUILD_EXAMPLES=OFF \
      -DSFML_BUILD_DOC=OFF \
      -DSFML_INSTALL_PKGCONFIG_FILES=ON \
      -DSFML_PKGCONFIG_INSTALL_PREFIX=/usr/share/pkgconfig \
      -DBUILD_SHARED_LIBS=ON
  ninja -C build
  #ninja -C build doc
}

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

  install -Dm644 SFML/license.md ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md
}

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