-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathhiredis
29 lines (24 loc) · 853 Bytes
/
hiredis
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
# Use legacy bundle on high-sierra
if [ "x${OSTYPE:6:1}" = "x1" ]; then
bottle="https://github.com/autobrew/bundler/releases/download/hiredis-1.1.0/hiredis-0.13.3-high_sierra.tar.xz"
else
bottle="https://github.com/autobrew/bundler/releases/download/hiredis-1.1.0/hiredis-1.1.0-universal.tar.xz"
fi
# Skip if disabled
if [ "$DISABLE_AUTOBREW" ]; then return 0; fi
echo "Using autobrew bundle: $(basename $bottle)"
# General setup
BREWDIR="$PWD/.deps"
mkdir -p $BREWDIR
curl -sSL $bottle -o libs.tar.xz
tar -xf libs.tar.xz --strip 1 -C $BREWDIR
rm -f libs.tar.xz
# package may look under /opt
mkdir -p $BREWDIR/opt/hiredis
ln -s $BREWDIR/{include,lib} $BREWDIR/opt/hiredis/
# Hardcoded flags
PKG_CFLAGS="-I$BREWDIR/include/hiredis -D_FILE_OFFSET_BITS=64"
PKG_LIBS="-L$BREWDIR/lib -lhiredis"
# Cleanup
echo "rm -Rf .deps" >> cleanup
chmod +x cleanup