summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2de20c9a46a5c3f983c4e57d6e461edb8f4e646b (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: Chocobo1 <chocobo1 AT archlinux DOT net>

pkgname=libssh2-git
pkgver=1.11.1.r111.g723b7017
pkgrel=1
pkgdesc="Client-side C library implementing the SSH2 protocol"
arch=('i686' 'x86_64')
url="https://www.libssh2.org/"
license=('BSD-3-Clause')
depends=('glibc' 'openssl' 'zlib')
makedepends=('git' 'cmake')
provides=("libssh2=$pkgver" 'libssh2.so')
conflicts=('libssh2')
source=("git+https://github.com/libssh2/libssh2.git")
sha256sums=('SKIP')


pkgver() {
  cd "libssh2"

  git describe --long --tags | sed 's/^libssh2-//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "libssh2"

  cmake \
    -B "_build" \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX="/usr" \
    -DCMAKE_INSTALL_LIBDIR="lib" \
    -DBUILD_SHARED_LIBS=ON \
    ./
  cmake --build "_build"
}

check() {
  cd "libssh2"

  #cmake --build "_build" --target test
}

package() {
  cd "libssh2"

  DESTDIR="$pkgdir" cmake --install "_build"
  install -Dm644 "COPYING" -t "$pkgdir/usr/share/licenses/libssh2"
}