This repository has been archived by the owner on May 10, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
measurement-kit
executable file
·40 lines (40 loc) · 1.76 KB
/
measurement-kit
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
#!/bin/sh
set -ex
PKG_TOPDIR=$(cd $(dirname $0) && pwd -P)
PKG_NAME=measurement-kit
PKG_VERSION=0.10.1
PKG_CHECKSUM=4caf856ebbb28633c7593a9b5b8ee79f0c0436d05ae7391cc59e8d72b260911a
PKG_URL=https://github.com/measurement-kit/measurement-kit/archive/v$PKG_VERSION.tar.gz
PKG_BUILD=+1
[ "$PKG_OS" != "" -a "$PKG_ARCH" != "" ]
PKG_FULLNAME=$PKG_NAME/$PKG_VERSION$PKG_BUILD
PKG_BUILDDIR=$PKG_TOPDIR/MK_BUILD/$PKG_OS/$PKG_FULLNAME/$PKG_ARCH
PKG_INSTALLDIR=$PKG_TOPDIR/MK_DIST/$PKG_OS/$PKG_FULLNAME/$PKG_ARCH
PKG_CURL_VERSION=7.64.1+1
PKG_LIBEVENT_VERSION=2.1.8+5
PKG_LIBMAXMINDDB_VERSION=1.3.2+4
PKG_LIBRESSL_VERSION=2.8.3+2
rm -rf $PKG_BUILDDIR $PKG_INSTALLDIR
install -d $PKG_BUILDDIR $PKG_INSTALLDIR
(
set -ex
cd $PKG_BUILDDIR
curl -fsSLO $PKG_URL
REAL_CHECKSUM=$(shasum -a 256 v$PKG_VERSION.tar.gz | awk '{print $1}')
[ $PKG_CHECKSUM = "$REAL_CHECKSUM" ]
tar -xzf v$PKG_VERSION.tar.gz
cd $PKG_NAME-$PKG_VERSION
./autogen.sh -n
CURL_PREFIX=$PKG_TOPDIR/MK_DIST/$PKG_OS/curl/$PKG_CURL_VERSION/$PKG_ARCH/
LIBEVENT_PREFIX=$PKG_TOPDIR/MK_DIST/$PKG_OS/libevent/$PKG_LIBEVENT_VERSION/$PKG_ARCH/
LIBMAXMINDDB_PREFIX=$PKG_TOPDIR/MK_DIST/$PKG_OS/libmaxminddb/$PKG_LIBMAXMINDDB_VERSION/$PKG_ARCH/
LIBRESSL_PREFIX=$PKG_TOPDIR/MK_DIST/$PKG_OS/libressl/$PKG_LIBRESSL_VERSION/$PKG_ARCH/
./configure --prefix=/ --disable-dependency-tracking \
--with-libevent=$LIBEVENT_PREFIX --with-openssl=$LIBRESSL_PREFIX \
--with-libcurl=$CURL_PREFIX --with-libmaxminddb=$LIBMAXMINDDB_PREFIX \
$PKG_CONFIGUREFLAGS CPPFLAGS="$CPPFLAGS -Wno-cpp"
make libmeasurement_kit.la V=0
make install-libLTLIBRARIES install-data-am DESTDIR=$PKG_INSTALLDIR
rm -rf $PKG_INSTALLDIR/lib/libmeasurement_kit.la
rm -rf $PKG_INSTALLDIR/include/measurement_kit/README.md
)