aboutsummaryrefslogtreecommitdiffstats
path: root/main/libssh/APKBUILD
blob: 395bf19d163b391713c4271695891d3164966548 (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
# Contributor: Carlo Landmeter
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libssh
pkgver=0.7.0
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/140/libssh-$pkgver.tar.xz
	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="cf20c3bb6edfc853187985c3f649ca80  libssh-0.7.0.tar.xz
8257f5a2a6be16b158a83d76b5eed4fd  fix-includes.patch"
sha256sums="0551bc341f33641ddc349b31730b3010870ad26a4dbfad3d090a1738fe3e402b  libssh-0.7.0.tar.xz
d1798cd15d8682464a0b1b1853a9e17e63fed2fa732849570e595347d91b160c  fix-includes.patch"
sha512sums="2ef897f7295d2b4ba63f0d797c51ba2c8cb7d8569152d34ec982d2b88adccc97c8f2aabea3bbc88b72421256d3d0be661f82bbcf5c4b151018b5a695be445568  libssh-0.7.0.tar.xz
055a8f6b97c65384a5a3ab8fe00c69d94cc30092fe926093dbbc122ce301fbe9d76127aa07b5e6107d7fa9dd2aad6b165fa0958b56520253b5d64428ff42a318  fix-includes.patch"