dns/c-ares/c-ares.sh

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

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

python/python2: add DEPRECATED tag

1115
297b5eef115e vanilla: change shebangs to /bin/sh
David Demelier <markand@malikania.fr>
parents: 1019
diff changeset
1 #!/bin/sh
634
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
2 #
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
3 # Copyright (c) 2019 David Demelier <markand@malikania.fr>
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
4 #
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
5 # Permission to use, copy, modify, and/or distribute this software for any
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
6 # purpose with or without fee is hereby granted, provided that the above
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
7 # copyright notice and this permission notice appear in all copies.
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
8 #
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
16 #
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
17
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
18 PKGNAME=c-ares
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
19 PKGVERSION=1.15.0
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
20 PKGREVISION=1
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
21 PKGLICENSE="MIT"
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
22 PKGSUMMARY="C library for asynchronous DNS requests"
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
23 PKGDOWNLOAD="https://c-ares.haxx.se/download/$PKGNAME-$PKGVERSION.tar.gz"
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
24
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
25 : ${CHOST:=$(uname -m)-linux-musl}
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
26 : ${CBUILD:=$(uname -m)-linux-musl}
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
27 : ${CC:=clang}
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
28 : ${CFLAGS:=-O2}
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
29 : ${CXX:=clang++}
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
30 : ${CXXFLAGS:=-O2}
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
31 : ${LDFLAGS:=}
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
32 : ${LIBS:=}
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
33
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
34 build()
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
35 {
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
36 rm -rf $PKGNAME-$PKGVERSION
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
37 tar xvf $PKGNAME-$PKGVERSION.tar.gz
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
38 cd $PKGNAME-$PKGVERSION
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
39
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
40 CC="$CC" \
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
41 CFLAGS="$CFLAGS" \
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
42 CXX="$CXX" \
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
43 CXXFLAGS="$CXXFLAGS" \
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
44 LDFLAGS="$LDFLAGS" \
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
45 LIBS="$LIBS" \
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
46 ./configure \
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
47 --build=$CBUILD \
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
48 --host=$CHOST \
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
49 --enable-shared \
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
50 --prefix=
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
51 make
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
52 make install DESTDIR=$DESTDIR
817
0e6c54d47dfb vanilla: fix many FHS issues
David Demelier <markand@malikania.fr>
parents: 745
diff changeset
53 find $DESTDIR -type f -name "*.la" -delete
634
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
54
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
55 cd ..
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
56 rm -rf $PKGNAME-$PKGVERSION
998d6b713029 dns/c-ares: initial import, closes #1704
David Demelier <markand@malikania.fr>
parents:
diff changeset
57 }

mercurial