summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d170ee54766fdb32ad16bd3112247e00ead6cf42 (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.10.0.r257.gfe02bd2b
pkgrel=1
pkgdesc="Client-side C library implementing the SSH2 protocol"
arch=('i686' 'x86_64')
url="https://www.libssh2.org/"
license=('BSD')
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 \
    ./
  make -C "_build"
}

check() {
  cd "libssh2"

  #make -C "_build" test
}

package() {
  cd "libssh2"

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