aboutsummaryrefslogtreecommitdiffstats
path: root/main/libssh/APKBUILD
blob: 8f15a4e98f34fa265135a13c4737a8638703f17e (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
# Contributor: Carlo Landmeter
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libssh
pkgver=0.5.2
pkgrel=0
pkgdesc="Library for accessing ssh client services through C libraries"
url="http://www.libssh.org/"
arch="all"
license="LGPL"
depends=
makedepends="openssl-dev cmake doxygen"
subpackages="$pkgname-dev"
source="http://www.libssh.org/files/${pkgver%.*}/${pkgname}-${pkgver}.tar.gz"

_builddir="$srcdir"/$pkgname-$pkgver

prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch)
			msg "Applying $i"
			patch -p1 -i "$srcdir"/$i || return 1
			;;
		esac
	done
}

build() {
	cd "$srcdir"
	
	mkdir build && cd build
	cmake "$srcdir"/${pkgname}-${pkgver} \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=Release
	make || return 1
}

package() {
	cd "$srcdir"/build
	make DESTDIR="$pkgdir" install
}

md5sums="38b67c48af7a9204660a3e08f97ceba6  libssh-0.5.2.tar.gz"