forked from alisw/alidist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
curl.sh
36 lines (30 loc) · 934 Bytes
/
curl.sh
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
package: curl
version: "7.70.0"
tag: curl-7_70_0
source: https://github.com/curl/curl.git
build_requires:
- "OpenSSL:(?!osx)"
- CMake
- alibuild-recipe-tools
---
#!/bin/bash -e
if [[ $ARCHITECTURE = osx* ]]; then
OPENSSL_ROOT=$(brew --prefix openssl)
else
${OPENSSL_ROOT:+env LDFLAGS=-Wl,-R$OPENSSL_ROOT/lib}
fi
rsync -av --delete --exclude="**/.git" $SOURCEDIR/ .
./buildconf
./configure --prefix=$INSTALLROOT ${OPENSSL_ROOT:+--with-ssl=$OPENSSL_ROOT} --disable-static
make ${JOBS:+-j$JOBS}
make install
# Modulefile
mkdir -p etc/modulefiles
alibuild-generate-module > etc/modulefiles/$PKGNAME
cat >> etc/modulefiles/$PKGNAME <<EoF
# Our environment
set CURL_ROOT \$::env(BASEDIR)/$PKGNAME/\$version before defining LD_LIBRARY_PATH
prepend-path PATH \$CURL_ROOT/bin
prepend-path LD_LIBRARY_PATH \$CURL_ROOT/lib
EoF
mkdir -p $INSTALLROOT/etc/modulefiles && rsync -a --delete etc/modulefiles/ $INSTALLROOT/etc/modulefiles