nodejs (802:fb9a6392d04a) nodejs (806:6b647daed063)
1
2# Copyright (C) NGINX, Inc.
3
4
5shift
6
7for nxt_option; do
8

--- 101 unchanged lines hidden (view full) ---

110if grep ^$NXT_NODE: $NXT_MAKEFILE 2>&1 > /dev/null; then
111 $echo
112 $echo $0: error: duplicate \"$NXT_NODE\" package configured.
113 $echo
114 exit 1;
115fi
116
117NXT_NODE_TMP=${NXT_BUILD_DIR}/src/${NXT_NODE}/unit-http
1
2# Copyright (C) NGINX, Inc.
3
4
5shift
6
7for nxt_option; do
8

--- 101 unchanged lines hidden (view full) ---

110if grep ^$NXT_NODE: $NXT_MAKEFILE 2>&1 > /dev/null; then
111 $echo
112 $echo $0: error: duplicate \"$NXT_NODE\" package configured.
113 $echo
114 exit 1;
115fi
116
117NXT_NODE_TMP=${NXT_BUILD_DIR}/src/${NXT_NODE}/unit-http
118NXT_NODE_TARBALL=${PWD}/${NXT_BUILD_DIR}/${NXT_NODE}-unit-http.tar.gz
118NXT_NODE_TARBALL=${NXT_BUILD_DIR}/${NXT_NODE}-unit-http.tar.gz
119NXT_NODE_EXPORTS="export UNIT_SRC_PATH=${PWD}/src && \
120 export UNIT_LIB_STATIC_PATH=${PWD}/${NXT_BUILD_DIR}/libunit.a"
121
122cat << END >> $NXT_MAKEFILE
123
124.PHONY: ${NXT_NODE}
125.PHONY: ${NXT_NODE}-copy
126.PHONY: ${NXT_NODE}-install

--- 10 unchanged lines hidden (view full) ---

137 cp -rp src/nodejs/ ${NXT_BUILD_DIR}/src/${NXT_NODE}
138
139${NXT_NODE_TARBALL}: ${NXT_NODE}-copy
140 tar -zcvf ${NXT_NODE_TARBALL} -C ${NXT_NODE_TMP} .
141
142${NXT_NODE}-install: ${NXT_NODE_TARBALL} \
143 $NXT_BUILD_DIR/$NXT_LIB_UNIT_STATIC
144 ${NXT_NODE_EXPORTS} && \\
119NXT_NODE_EXPORTS="export UNIT_SRC_PATH=${PWD}/src && \
120 export UNIT_LIB_STATIC_PATH=${PWD}/${NXT_BUILD_DIR}/libunit.a"
121
122cat << END >> $NXT_MAKEFILE
123
124.PHONY: ${NXT_NODE}
125.PHONY: ${NXT_NODE}-copy
126.PHONY: ${NXT_NODE}-install

--- 10 unchanged lines hidden (view full) ---

137 cp -rp src/nodejs/ ${NXT_BUILD_DIR}/src/${NXT_NODE}
138
139${NXT_NODE_TARBALL}: ${NXT_NODE}-copy
140 tar -zcvf ${NXT_NODE_TARBALL} -C ${NXT_NODE_TMP} .
141
142${NXT_NODE}-install: ${NXT_NODE_TARBALL} \
143 $NXT_BUILD_DIR/$NXT_LIB_UNIT_STATIC
144 ${NXT_NODE_EXPORTS} && \\
145 ${NXT_NPM} install -g ${NXT_NODE_TARBALL} --unsafe-perm=true
145 ${NXT_NPM} install -g ${PWD}/${NXT_NODE_TARBALL} --unsafe-perm=true
146
147${NXT_NODE}-local-install: ${NXT_NODE_TARBALL} \
148 $NXT_BUILD_DIR/$NXT_LIB_UNIT_STATIC
149 ${NXT_NODE_EXPORTS} && \\
150 mkdir -p \$(DESTDIR) && \\
146
147${NXT_NODE}-local-install: ${NXT_NODE_TARBALL} \
148 $NXT_BUILD_DIR/$NXT_LIB_UNIT_STATIC
149 ${NXT_NODE_EXPORTS} && \\
150 mkdir -p \$(DESTDIR) && \\
151 cd \$(DESTDIR) && ${NXT_NPM} install ${NXT_NODE_TARBALL}
151 cd \$(DESTDIR) && ${NXT_NPM} install ${PWD}/${NXT_NODE_TARBALL}
152
153${NXT_NODE}-build: ${NXT_NODE}
154
155${NXT_NODE}-publish: ${NXT_NODE}
156 cd ${NXT_NODE_TMP} && ${NXT_NPM} publish
157
158${NXT_NODE}-uninstall:
159 ${NXT_NPM} uninstall -g unit-http
160
161END
152
153${NXT_NODE}-build: ${NXT_NODE}
154
155${NXT_NODE}-publish: ${NXT_NODE}
156 cd ${NXT_NODE_TMP} && ${NXT_NPM} publish
157
158${NXT_NODE}-uninstall:
159 ${NXT_NPM} uninstall -g unit-http
160
161END