blob: 81b300f916b8621ce464408b3d15c8dd6e9df7bf (
plain) (
blame)
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
44
45
46
|
# Copyright (C) NGINX, Inc.
# NXT_JAR_NAME=
# NXT_JAR_VERSION=
# NXT_JAR_NAMESPACE=
# NXT_JAR_REPO=http://central.maven.org/maven2/
# NXT_JAR_LOCAL_REPO=$HOME/.m2/repository/
NXT_JAR_FILE=${NXT_JAR_NAME}-${NXT_JAR_VERSION}.jar
NXT_JAR_LOCAL_DIR="${NXT_JAR_LOCAL_REPO}${NXT_JAR_NAMESPACE}${NXT_JAR_NAME}/${NXT_JAR_VERSION}"
NXT_JAR_LOCAL="${NXT_JAR_LOCAL_DIR}/${NXT_JAR_FILE}"
NXT_JAR_LOCAL_TMP="${NXT_JAR_LOCAL_DIR}/.${NXT_JAR_FILE}.$$"
NXT_JAR_URL=${NXT_JAR_REPO}${NXT_JAR_NAMESPACE}${NXT_JAR_NAME}/${NXT_JAR_VERSION}/${NXT_JAR_FILE}
NXT_JAR_CHK_FILE="$NXT_BUILD_DIR/$NXT_JAR_FILE"
. auto/modules/java_chk_sha512
if [ ! -f "$NXT_BUILD_DIR/$NXT_JAR_FILE" ]; then
NXT_JAR_CHK_FILE=$NXT_JAR_LOCAL
. auto/modules/java_chk_sha512
if [ ! -f "${NXT_JAR_LOCAL}" ]; then
$echo "getting remote $NXT_JAR_FILE ... "
$echo "getting remote $NXT_JAR_FILE ..." >> $NXT_AUTOCONF_ERR
mkdir -p "${NXT_JAR_LOCAL_DIR}"
curl --progress-bar "$NXT_JAR_URL" -o "$NXT_JAR_LOCAL_TMP"
NXT_JAR_CHK_FILE=$NXT_JAR_LOCAL_TMP
. auto/modules/java_chk_sha512
mv "$NXT_JAR_LOCAL_TMP" "$NXT_JAR_LOCAL"
else
$echo "getting local $NXT_JAR_FILE"
$echo "getting local $NXT_JAR_FILE ..." >> $NXT_AUTOCONF_ERR
fi
cp "$NXT_JAR_LOCAL" "$NXT_BUILD_DIR/$NXT_JAR_FILE"
fi
NXT_JAVA_BUILD_CP="${NXT_JAVA_BUILD_CP}:$NXT_BUILD_DIR/$NXT_JAR_FILE"
NXT_JAVA_INSTALL_JARS="$NXT_JAVA_INSTALL_JARS $NXT_BUILD_DIR/$NXT_JAR_FILE"
NXT_JAVA_UNINSTALL_JARS="$NXT_JAVA_UNINSTALL_JARS \$(DESTDIR)$NXT_JARS/$NXT_JAR_FILE"
$echo " \"$NXT_JAR_FILE\"," >> $NXT_JAVA_JARS
|