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
/
libevent
executable file
·43 lines (43 loc) · 1.74 KB
/
libevent
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
#!/bin/sh
set -ex
PKG_TOPDIR=$(cd $(dirname $0) && pwd -P)
PKG_NAME=libevent
PKG_VERSION=2.1.8
PKG_CHECKSUM=316ddb401745ac5d222d7c529ef1eada12f58f6376a66c1118eee803cb70f83d
PKG_URL=https://github.com/libevent/libevent/archive/release-$PKG_VERSION-stable.tar.gz
PKG_BUILD=+5
PKG_LIBRESSL_VERSION=2.8.3+2
[ "$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
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 release-$PKG_VERSION-stable.tar.gz | awk '{print $1}')
[ $PKG_CHECKSUM = "$REAL_CHECKSUM" ]
tar -xzf release-$PKG_VERSION-stable.tar.gz
cd $PKG_NAME-release-$PKG_VERSION-stable
patch -Np1 -i $PKG_TOPDIR/libevent-000.patch
patch -Np1 -i $PKG_TOPDIR/libevent-001.patch
patch -Np1 -i $PKG_TOPDIR/libevent-002.patch
./autogen.sh
LIBRESSL_PREFIX=$PKG_TOPDIR/MK_DIST/$PKG_OS/libressl/$PKG_LIBRESSL_VERSION/$PKG_ARCH/
export CPPFLAGS="${CPPFLAGS} -I${LIBRESSL_PREFIX}/include"
export LDFLAGS="${LDFLAGS} -L${LIBRESSL_PREFIX}/lib"
./configure --prefix=/ --disable-shared --disable-samples \
--disable-libevent-regress --disable-clock-gettime $PKG_CONFIGUREFLAGS
make V=0
make install DESTDIR=$PKG_INSTALLDIR
rm -rf $PKG_INSTALLDIR/bin
rm -rf $PKG_INSTALLDIR/lib/pkgconfig
rm -rf $PKG_INSTALLDIR/lib/libevent_openssl.la
rm -rf $PKG_INSTALLDIR/lib/libevent_extra.la
rm -rf $PKG_INSTALLDIR/lib/libevent.la
rm -rf $PKG_INSTALLDIR/lib/libevent.a
rm -rf $PKG_INSTALLDIR/lib/libevent_core.la
rm -rf $PKG_INSTALLDIR/lib/libevent_pthreads.la
)