network/libssh2/libssh2.sh

Fri, 15 Nov 2019 20:11:00 +0100

author
David Demelier <markand@malikania.fr>
date
Fri, 15 Nov 2019 20:11:00 +0100
changeset 1210
422313c3fcbd
parent 1115
297b5eef115e
child 1216
6710613b88b9
permissions
-rw-r--r--

text/rarian: initial import, closes #2311

1115
297b5eef115e vanilla: change shebangs to /bin/sh
David Demelier <markand@malikania.fr>
parents: 1019
diff changeset
1 #!/bin/sh
592
b986af3ae569 network/libssh: initial import, closes #999
David Demelier <markand@malikania.fr>
parents:
diff changeset
2 #
b986af3ae569 network/libssh: initial import, closes #999
David Demelier <markand@malikania.fr>
parents:
diff changeset
3 # Copyright (c) 2019 David Demelier <markand@malikania.fr>
b986af3ae569 network/libssh: initial import, closes #999
David Demelier <markand@malikania.fr>
parents:
diff changeset
4 #
b986af3ae569 network/libssh: initial import, closes #999
David Demelier <markand@malikania.fr>
parents:
diff changeset
5 # Permission to use, copy, modify, and/or distribute this software for any
b986af3ae569 network/libssh: initial import, closes #999
David Demelier <markand@malikania.fr>
parents:
diff changeset
6 # purpose with or without fee is hereby granted, provided that the above
b986af3ae569 network/libssh: initial import, closes #999
David Demelier <markand@malikania.fr>
parents:
diff changeset
7 # copyright notice and this permission notice appear in all copies.
b986af3ae569 network/libssh: initial import, closes #999
David Demelier <markand@malikania.fr>
parents:
diff changeset
8 #
b986af3ae569 network/libssh: initial import, closes #999
David Demelier <markand@malikania.fr>
parents:
diff changeset
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
b986af3ae569 network/libssh: initial import, closes #999
David Demelier <markand@malikania.fr>
parents:
diff changeset
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
b986af3ae569 network/libssh: initial import, closes #999
David Demelier <markand@malikania.fr>
parents:
diff changeset
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
b986af3ae569 network/libssh: initial import, closes #999
David Demelier <markand@malikania.fr>
parents:
diff changeset
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
b986af3ae569 network/libssh: initial import, closes #999
David Demelier <markand@malikania.fr>
parents:
diff changeset
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
b986af3ae569 network/libssh: initial import, closes #999
David Demelier <markand@malikania.fr>
parents:
diff changeset
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
b986af3ae569 network/libssh: initial import, closes #999
David Demelier <markand@malikania.fr>
parents:
diff changeset
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
b986af3ae569 network/libssh: initial import, closes #999
David Demelier <markand@malikania.fr>
parents:
diff changeset
16 #
b986af3ae569 network/libssh: initial import, closes #999
David Demelier <markand@malikania.fr>
parents:
diff changeset
17
607
0be721db8410 network: rename libssh/libssh2
David Demelier <markand@malikania.fr>
parents: 606
diff changeset
18 PKGNAME=libssh2
592
b986af3ae569 network/libssh: initial import, closes #999
David Demelier <markand@malikania.fr>
parents:
diff changeset
19 PKGVERSION=1.9.0
b986af3ae569 network/libssh: initial import, closes #999
David Demelier <markand@malikania.fr>
parents:
diff changeset
20 PKGREVISION=1
b986af3ae569 network/libssh: initial import, closes #999
David Demelier <markand@malikania.fr>
parents:
diff changeset
21 PKGLICENSE="BSD3CLAUSE"
b986af3ae569 network/libssh: initial import, closes #999
David Demelier <markand@malikania.fr>
parents:
diff changeset
22 PKGSUMMARY="C library that implements SSHv2 protocol"
607
0be721db8410 network: rename libssh/libssh2
David Demelier <markand@malikania.fr>
parents: 606
diff changeset
23 PKGDOWNLOAD="https://www.libssh2.org/download/$PKGNAME-$PKGVERSION.tar.gz"
902
a133976e0783 vanilla: remove all origins, closes #2203
David Demelier <markand@malikania.fr>
parents: 766
diff changeset
24 PKGDEPENDS="cmake:build zlib libressl"
592
b986af3ae569 network/libssh: initial import, closes #999
David Demelier <markand@malikania.fr>
parents:
diff changeset
25
b986af3ae569 network/libssh: initial import, closes #999
David Demelier <markand@malikania.fr>
parents:
diff changeset
26 : ${CC:=clang}
b986af3ae569 network/libssh: initial import, closes #999
David Demelier <markand@malikania.fr>
parents:
diff changeset
27 : ${CFLAGS:=-O2}
b986af3ae569 network/libssh: initial import, closes #999
David Demelier <markand@malikania.fr>
parents:
diff changeset
28
b986af3ae569 network/libssh: initial import, closes #999
David Demelier <markand@malikania.fr>
parents:
diff changeset
29 build()
b986af3ae569 network/libssh: initial import, closes #999
David Demelier <markand@malikania.fr>
parents:
diff changeset
30 {
607
0be721db8410 network: rename libssh/libssh2
David Demelier <markand@malikania.fr>
parents: 606
diff changeset
31 rm -rf $PKGNAME-$PKGVERSION
0be721db8410 network: rename libssh/libssh2
David Demelier <markand@malikania.fr>
parents: 606
diff changeset
32 tar xvf $PKGNAME-$PKGVERSION.tar.gz
0be721db8410 network: rename libssh/libssh2
David Demelier <markand@malikania.fr>
parents: 606
diff changeset
33 cd $PKGNAME-$PKGVERSION
592
b986af3ae569 network/libssh: initial import, closes #999
David Demelier <markand@malikania.fr>
parents:
diff changeset
34
606
25cecc6dca48 vanilla: use POSIX shell and busybox tar
David Demelier <markand@malikania.fr>
parents: 592
diff changeset
35 mkdir build && cd build
592
b986af3ae569 network/libssh: initial import, closes #999
David Demelier <markand@malikania.fr>
parents:
diff changeset
36 cmake .. \
b986af3ae569 network/libssh: initial import, closes #999
David Demelier <markand@malikania.fr>
parents:
diff changeset
37 -DBUILD_SHARED_LIBS=On \
b986af3ae569 network/libssh: initial import, closes #999
David Demelier <markand@malikania.fr>
parents:
diff changeset
38 -DCMAKE_BUILD_TYPE=Release \
b986af3ae569 network/libssh: initial import, closes #999
David Demelier <markand@malikania.fr>
parents:
diff changeset
39 -DCMAKE_C_COMPILER="$CC" \
b986af3ae569 network/libssh: initial import, closes #999
David Demelier <markand@malikania.fr>
parents:
diff changeset
40 -DCMAKE_C_FLAGS="$CFLAGS" \
766
e91fbcb3d1ef vanilla: consolidate FHS
David Demelier <markand@malikania.fr>
parents: 638
diff changeset
41 -DCMAKE_INSTALL_PREFIX= \
e91fbcb3d1ef vanilla: consolidate FHS
David Demelier <markand@malikania.fr>
parents: 638
diff changeset
42 -DCMAKE_INSTALL_INCLUDEDIR=include \
e91fbcb3d1ef vanilla: consolidate FHS
David Demelier <markand@malikania.fr>
parents: 638
diff changeset
43 -DCMAKE_INSTALL_LIBDIR=lib \
e91fbcb3d1ef vanilla: consolidate FHS
David Demelier <markand@malikania.fr>
parents: 638
diff changeset
44 -DCMAKE_INSTALL_MANDIR=share/man \
e91fbcb3d1ef vanilla: consolidate FHS
David Demelier <markand@malikania.fr>
parents: 638
diff changeset
45 -DCMAKE_INSTALL_DOCDIR=share/doc/libssh \
592
b986af3ae569 network/libssh: initial import, closes #999
David Demelier <markand@malikania.fr>
parents:
diff changeset
46 -DCRYPTO_BACKEND=OpenSSL \
638
ed041b0e3c83 network/libssh2: fix build
David Demelier <markand@malikania.fr>
parents: 608
diff changeset
47 -DENABLE_ZLIB_COMPRESSION=On \
ed041b0e3c83 network/libssh2: fix build
David Demelier <markand@malikania.fr>
parents: 608
diff changeset
48 -DBUILD_TESTING=Off
592
b986af3ae569 network/libssh: initial import, closes #999
David Demelier <markand@malikania.fr>
parents:
diff changeset
49 make
b986af3ae569 network/libssh: initial import, closes #999
David Demelier <markand@malikania.fr>
parents:
diff changeset
50 make install DESTDIR=$DESTDIR
606
25cecc6dca48 vanilla: use POSIX shell and busybox tar
David Demelier <markand@malikania.fr>
parents: 592
diff changeset
51 cd ..
592
b986af3ae569 network/libssh: initial import, closes #999
David Demelier <markand@malikania.fr>
parents:
diff changeset
52
606
25cecc6dca48 vanilla: use POSIX shell and busybox tar
David Demelier <markand@malikania.fr>
parents: 592
diff changeset
53 cd ..
607
0be721db8410 network: rename libssh/libssh2
David Demelier <markand@malikania.fr>
parents: 606
diff changeset
54 rm -rf $PKGNAME-$PKGVERSION
592
b986af3ae569 network/libssh: initial import, closes #999
David Demelier <markand@malikania.fr>
parents:
diff changeset
55 }

mercurial