1 #maintainer: kuno <neokuno AT gmail DOT com>
3 pkgname=clojurescript-git
4 _realname=clojurescript
7 pkgdesc="Clojure to JS compiler"
9 url="https://github.com/clojure/clojurescript"
12 depends=('clojure' 'rhino' 'closure-compiler')
13 makedepends=('git' 'unzip' 'curl')
20 install=$pkgname.install
21 source=(clojurescript.sh)
23 #md5sums=() #generate with 'makepkg -g'
24 _gittrunk="git://github.com/clojure/clojurescript.git"
28 if [ -d $srcdir/$_gitmod-build ]; then
29 rm -rf $srcdir/$_gitmod-build
34 msg "Connecting to the github...."
35 if [ ! -d $_gitmod/.git ]; then
36 git clone $_gittrunk $_gitmod
42 cp -r $srcdir/$_gitmod $srcdir/$_gitmod-build
45 cd $srcdir/$_gitmod-build/
46 mkdir -p lib || return 1
49 echo "Fetching Google Closure library..."
50 mkdir -p closure/library
52 curl -O -s http://closure-library.googlecode.com/files/closure-library-20111110-r1376.zip
53 unzip -qu closure-library-20111110-r1376.zip
54 echo "Cleaning up Google Closure library archive..."
55 rm closure-library-20111110-r1376.zip
57 cd $srcdir/$_gitmod-build/
58 echo "Building lib/goog.jar..."
59 echo "jar cf ./lib/goog.jar -C closure/library/closure/ goog"
60 jar cf ./lib/goog.jar -C closure/library/closure/ goog
63 ln -s /usr/share/clojure/clojure.jar lib/clojure.jar
65 ln -s /usr/share/java/closure-compiler/closure-compiler.jar lib/compiler.jar
67 ln -s /usr/share/java/js-1.7R3.jar lib/js.jar
71 mkdir -p $pkgdir/etc/profile.d
72 mkdir -p $pkgdir/opt/$_realname
74 cp -r $srcdir/$_gitmod-build/{bin,lib,src,test,script} $pkgdir/opt/$_realname/ || return 1
76 cp $_realname.sh $pkgdir/etc/profile.d || return 1
77 rm -rf $srcdir/$_gitmod-build
79 md5sums=('ba08df6fbefe09783bf04a150f555b22')