blob: 5a13763190d655870d75f9101cbff65e157750ff (
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
56
57
58
59
|
# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>
# Contributor: Karl-Felix Glatzer <karl.glatzer@gmx.de>
# Contributor: Antonio Rojas <arojas@archlinux.org>
# Contributor: Tom Gundersen <teg@jklm.no>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: ice-man <icemanf@gmail.com>
# Contributor: sergeantspoon <sergeantspoon@archlinux.us>
# Contributor: Alexey Pavlov <alexpux@gmail.com>
_android_arch=x86
pkgname=android-${_android_arch}-libssh2
pkgver=1.11.0
pkgrel=1
arch=('any')
pkgdesc="Library for accessing ssh client services through C libraries (android)"
license=('LGPL')
url="https://www.libssh2.org/"
depends=("android-${_android_arch}-zlib"
"android-${_android_arch}-openssl")
groups=('android-libssh2')
options=(!strip !buildflags staticlibs !emptydirs)
makedepends=('android-cmake')
source=("https://www.libssh2.org/download/libssh2-$pkgver.tar.gz"{,.asc})
md5sums=('a01d543fd891ca48fe47726540d50b17'
'SKIP')
validpgpkeys=('27EDEAF22F3ABCEB50DB9A125CC908FDB71E12C2' # Daniel Stenberg
'914C533DF9B2ADA2204F586D78E11C6B279D5C91') # Daniel Stenberg (old key)
build() {
cd "${srcdir}/libssh2-${pkgver}"
source android-env ${_android_arch}
android-${_android_arch}-cmake \
-S . \
-B build \
-Wno-dev \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS_RELEASE='-DNDEBUG' \
-DBUILD_EXAMPLES=OFF \
-DBUILD_TESTING=OFF \
-DENABLE_ZLIB_COMPRESSION=ON \
-DBUILD_SHARED_LIBS=ON \
-DOPENSSL_ROOT_DIR="${ANDROID_PREFIX}" \
-DOPENSSL_INCLUDE_DIR="${ANDROID_PREFIX_INCLUDE}" \
-DOPENSSL_CRYPTO_LIBRARY="${ANDROID_PREFIX_LIB}/libcrypto.so" \
-DOPENSSL_SSL_LIBRARY:FILEPATH="${ANDROID_PREFIX_LIB}/libssl.so"
cmake --build build
}
package(){
cd "${srcdir}/libssh2-${pkgver}"
source android-env ${_android_arch}
DESTDIR="${pkgdir}" cmake --install build
rm -rf "${pkgdir}/${ANDROID_PREFIX_SHARE}"
${ANDROID_STRIP} -g --strip-unneeded "${pkgdir}"/${ANDROID_PREFIX_LIB}/*.so
${ANDROID_STRIP} -g "$pkgdir"/${ANDROID_PREFIX_LIB}/*.a
}
|