aboutsummaryrefslogtreecommitdiffstats
path: root/main/libssh/APKBUILD
blob: 521a5835bf8ade653c59c63bde0f76f463eb2fde (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
52
53
54
55
# Contributor: Carlo Landmeter
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libssh
pkgver=0.5.5
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="https://red.libssh.org/attachments/download/51/libssh-$pkgver.tar.gz
	link-pthread.patch
	fix-includes.patch
	"

_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="bb308196756c7255c0969583d917136b  libssh-0.5.5.tar.gz
8d58b3391286de4dad3eb8a5b70171aa  link-pthread.patch
8257f5a2a6be16b158a83d76b5eed4fd  fix-includes.patch"
sha256sums="c0df0f05fc812dbe26fd4118bec0776aa9e892c0719590f3971130489c6b8e9d  libssh-0.5.5.tar.gz
7a57c161357cb588e37a0b2e0b6a4a42505834da00e763ffe21141ed3a899169  link-pthread.patch
d1798cd15d8682464a0b1b1853a9e17e63fed2fa732849570e595347d91b160c  fix-includes.patch"
sha512sums="114a8d078b9530fe37f12c769283213ceacdd8cbf0c1c3e64e09c07d38b3886bc8c9a78816562ab1bc44c55c604fcc4ed85cdb2a8203962c9331f9d10977e802  libssh-0.5.5.tar.gz
da26f14312a0988c72663225b6412ec06b2cdda6fdfd234f167f7fe9f1371fa432cb4c5d6326048540cffa527781203019023844870fe52c1b58631d8ca45b39  link-pthread.patch
055a8f6b97c65384a5a3ab8fe00c69d94cc30092fe926093dbbc122ce301fbe9d76127aa07b5e6107d7fa9dd2aad6b165fa0958b56520253b5d64428ff42a318  fix-includes.patch"