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

pkgname=libssh-git
pkgver=0.7.5.r381.gcc13e852
pkgrel=1
pkgdesc="Multiplatform C library implementing the SSHv2 and SSHv1 protocol on client and server side"
arch=('i686' 'x86_64')
url="https://www.libssh.org/"
license=('LGPL')
depends=('glibc' 'openssl' 'zlib')
makedepends=('git' 'cmake' 'cmocka')
provides=('libssh')
conflicts=('libssh')
options=('staticlibs')
source=("git://git.libssh.org/projects/libssh.git")
sha256sums=('SKIP')


prepare() {
  cd "libssh"

  mkdir -p "_build"
}

pkgver() {
  cd "libssh"

  _tag=$(git tag -l --sort -v:refname | grep -m1 libssh | sed 's/libssh-//')
  _rev=$(git rev-list --count libssh-$_tag..HEAD)
  _hash=$(git rev-parse --short HEAD)
  printf "%s.r%s.g%s" "$_tag" "$_rev" "$_hash"
}

build() {
  cd "libssh/_build"

  cmake -DCMAKE_INSTALL_PREFIX="/usr" -DCMAKE_BUILD_TYPE=Release -DWITH_TESTING=ON -DWITH_ZLIB=ON ../
  make
}

check() {
  cd "libssh/_build"

  make test
}

package() {
  cd "libssh/_build"

  make DESTDIR="$pkgdir" install
}