Browse files

[feature] configure,make_package,README: added dependency to node.js,…

… and node packages: nodemailer, smtpserver, imap
  • Loading branch information...
1 parent 774e0d0 commit 1bf8db9a69b2c181860a57cb8e354025cf211169 @Aqua-Ye Aqua-Ye committed with BourgerieQuentin Jun 18, 2012
Showing with 55 additions and 3 deletions.
  1. +1 −1 README.md
  2. +39 −0 configure
  3. +14 −1 dependencies/installation_helper.sh
  4. +1 −1 make_package.sh
View
2 README.md
@@ -19,7 +19,7 @@ should get you there `./configure` should report any missing dependencies and
point you to the packages you may install to fix them (although those may depend
on your distribution). make needs to be GNU make.
-The main dependency of Opa is OCaml 3.12. In case your distribution doesn't
+The main dependency of Opa is OCaml 3.12 and Node.js 0.6. In case your distribution doesn't
provide a recent enough version, or if you miss some other dependencies, you can
use the `installation_helper.sh` script, which automates the download and
installation of our dependencies. Try
View
39 configure
@@ -313,6 +313,45 @@ else
exit 1
fi
+# - checking for nodejs
+echo-check for nodejs
+if which node &>/dev/null; then
+ echo-ok found
+else
+ echo-err Not found
+ exit 1
+fi
+
+# - checking for nodejs version
+echo-check nodejs version
+NODE_VERSION=$(node --version)
+NODE_MIN_VERSION="v0.6"
+if [[ $NODE_VERSION > $NODE_MIN_VERSION ]]; then
+ echo-ok $NODE_VERSION
+else
+ echo-err $NODE_VERSION
+ echo "Node $NODE_MIN_VERSION or newer is required"
+ false
+fi
+
+# - checking for nodejs package dependency
+check-node-dependency() (
+ echo-check for "nodejs dependency: $1"
+ # local DIR=$(mktemp -d /tmp/opa-configure.XXXXX)
+ # trap "rm -rf /tmp/${DIR#/tmp/}" EXIT
+ # echo "var $1 = require(\"$1\");" >test.nodejs
+ # node test.nodejs
+ if npm list | grep -q "$1"; then
+ echo-ok found
+ else
+ echo-err Not found
+ fi
+)
+
+check-node-dependency "nodemailer"
+check-node-dependency "simplesmtp"
+check-node-dependency "imap"
+
# - checking camlidl *
echo-check for camlidl
if [ "X$NO_CAMLIDL" = "X1" ]; then
View
15 dependencies/installation_helper.sh
@@ -11,7 +11,7 @@ SCRIPTNAME=$(basename $0)
# OS independent various variables
# Warning: only put in DEFAULT_PACKAGES what should be included in our binary package
-DEFAULT_PACKAGES=(ocaml findlib cryptokit camlzip ocamlgraph ulex ocaml-ssl)
+DEFAULT_PACKAGES=(ocaml findlib cryptokit camlzip ocamlgraph ulex ocaml-ssl node)
ALL_PACKAGES=(ocaml findlib cryptokit camlzip ocamlgraph ulex openssl ocaml-ssl syslog jpeg libpng giflib camlimages mascot camlidl libnatpmp miniupnpc cairo-ocaml)
BUILD_DIR=$SCRIPTDIR/packages
@@ -191,6 +191,7 @@ sources () {
libnatpmp) echo "http://miniupnp.free.fr/files/download.php?file=libnatpmp-20110103.tar.gz";;
miniupnpc) echo "http://miniupnp.free.fr/files/download.php?file=miniupnpc-1.5.20110418.tar.gz";;
cairo-ocaml) echo "http://cgit.freedesktop.org/cairo-ocaml/snapshot/cairo-ocaml-1.2.0.tar.gz";;
+ node) echo "http://nodejs.org/dist/v0.6.19/node-v0.6.19.tar.gz";;
*) msg_red "Error: don't know about package $1" >&2; exit 2
esac
}
@@ -325,6 +326,11 @@ package_install (){
make
make install
;;
+ node)
+ vcbuild.bat
+ npm install nodemailer
+ npm install smtpserver
+ npm install imap
*)
msg_yellow "Install $1 by hand"
msg_yellow "TODO : check $1 installation"
@@ -433,6 +439,13 @@ package_install (){
make
$SUDO make install
;;
+ node)
+ ./configure --prefix $PREFIX
+ make
+ $SUDO make install
+ npm install nodemailer
+ npm install smtpserver
+ npm install imap
*)
install_generic
esac
View
2 make_package.sh
@@ -300,7 +300,7 @@ Priority: optional
Architecture: $(dpkg --print-architecture)
Installed-Size: $(du -s $INSTALLDIR | cut -f1)
Pre-Depends: debconf
-Depends: libc6 (>= 2.3.2), libgdbm3, libssl0.9.8, libssl-dev, zlib1g, zlib1g-dev, libjpeg62, libpng12-0, libgif4
+Depends: libc6 (>= 2.3.2), libgdbm3, libssl0.9.8, libssl-dev, zlib1g, zlib1g-dev, libjpeg62, libpng12-0, libgif4, nodejs (>= 0.6)
Maintainer: $MAINTAINER
Description: The unified language for web 2.0 development
Opa is a unified programming language for web development. This self-contained

0 comments on commit 1bf8db9

Please sign in to comment.