network/nghttp2/nghttp2.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 1205
f1bdb6bab41c
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
640
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
2 #
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
3 # Copyright (c) 2019 David Demelier <markand@malikania.fr>
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
4 #
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
5 # Permission to use, copy, modify, and/or distribute this software for any
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
6 # purpose with or without fee is hereby granted, provided that the above
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
7 # copyright notice and this permission notice appear in all copies.
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
8 #
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
16 #
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
17
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
18 PKGNAME=nghttp2
1205
f1bdb6bab41c network/nghttp2: update to 1.39.2
David Demelier <markand@malikania.fr>
parents: 1115
diff changeset
19 PKGVERSION=1.39.2
640
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
20 PKGREVISION=1
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
21 PKGLICENSE="MIT"
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
22 PKGSUMMARY="HTTP/2 library and tools"
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
23 PKGDOWNLOAD="https://github.com/nghttp2/nghttp2/releases/download/v$PKGVERSION/$PKGNAME-$PKGVERSION.tar.xz"
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
24 PKGDEPENDS=""
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
25 PKGOPTIONS="TOOLS"
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
26
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
27 : ${CHOST:=$(uname -m)-linux-musl}
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
28 : ${CBUILD:=$(uname -m)-linux-musl}
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
29 : ${CC:=clang}
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
30 : ${CFLAGS:=-O2}
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
31 : ${CXX:=clang++}
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
32 : ${CXXFLAGS:=-O2}
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
33 : ${LDFLAGS:=}
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
34 : ${LIBS:=}
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
35 : ${TOOLS:=yes}
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
36
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
37 if [ "$TOOLS" = "yes" ]; then
902
a133976e0783 vanilla: remove all origins, closes #2203
David Demelier <markand@malikania.fr>
parents: 817
diff changeset
38 PKGDEPENDS="libev
a133976e0783 vanilla: remove all origins, closes #2203
David Demelier <markand@malikania.fr>
parents: 817
diff changeset
39 jansson
a133976e0783 vanilla: remove all origins, closes #2203
David Demelier <markand@malikania.fr>
parents: 817
diff changeset
40 libressl
a133976e0783 vanilla: remove all origins, closes #2203
David Demelier <markand@malikania.fr>
parents: 817
diff changeset
41 zlib
a133976e0783 vanilla: remove all origins, closes #2203
David Demelier <markand@malikania.fr>
parents: 817
diff changeset
42 c-ares
a133976e0783 vanilla: remove all origins, closes #2203
David Demelier <markand@malikania.fr>
parents: 817
diff changeset
43 libxml2 $PKGDEPENDS"
640
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
44 with_tools="--enable-app"
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
45 else
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
46 with_tools="--disable-app"
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
47 fi
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
48
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
49 build()
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
50 {
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
51 rm -rf $PKGNAME-$PKGVERSION
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
52 tar xvf $PKGNAME-$PKGVERSION.tar.xz
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
53 cd $PKGNAME-$PKGVERSION
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
54
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
55 CC="$CC" \
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
56 CFLAGS="$CFLAGS" \
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
57 CXX="$CXX" \
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
58 CXXFLAGS="$CXXFLAGS" \
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
59 LDFLAGS="$LDFLAGS" \
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
60 LIBS="$LIBS" \
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
61 ./configure \
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
62 --build=$CBUILD \
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
63 --host=$CHOST \
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
64 --enable-shared \
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
65 --prefix= \
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
66 --without-systemd \
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
67 $with_tools
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
68 make
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
69 make install DESTDIR=$DESTDIR
817
0e6c54d47dfb vanilla: fix many FHS issues
David Demelier <markand@malikania.fr>
parents: 745
diff changeset
70 find $DESTDIR -type f -name "*.la" -delete
640
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
71
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
72 cd ..
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
73 rm -rf $PKGNAME-$PKGVERSION
84da1d96604c network/nghttp2: initial import, closes #1718
David Demelier <markand@malikania.fr>
parents:
diff changeset
74 }

mercurial