summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1ef120b7d67070aef98af5fcae2c77dc91191d17 (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
# Maintainer: Tobias Markus <tobias AT miglix DOT eu>

_pkgbase=libsioclient
pkgname="$_pkgbase-git"
pkgdesc="C++11 implementation of Socket.IO client"
pkgver=1.6.1.r27.g6063cb1
pkgrel=1
arch=('x86_64')
url="https://github.com/socketio/socket.io-client-cpp.git"
license=('custom:MIT')
makedepends=('cmake' 'extra-cmake-modules' 'git' 'boost')
depends=('openssl' 'boost-libs' 'websocketpp' 'rapidjson')
provides=("$_pkgbase")
conflicts=("$_pkgbase")
source=(
    "$_pkgbase::git+https://github.com/socketio/socket.io-client-cpp.git"
    'cmake.patch')
md5sums=('SKIP'
         '9b25e8ba1fa73823512242205a395be1')

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

prepare() {
  patch -d "$srcdir/$_pkgbase" -i "$srcdir/cmake.patch"

  mkdir -p "$srcdir/build"
  cd "$srcdir/build"
  cmake \
    -DBUILD_SHARED_LIBS=ON \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    "../$_pkgbase"
}

build() {
  cd "$srcdir/build"
  make
}

package() {
  cd "$srcdir/build"
  make DESTDIR="$pkgdir" install
  install -D -m644 "../$_pkgbase/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

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