Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Maintainer: Alper Kanat <alperkanat@raptiye.org>
- # Contributor: Dongsheng Cai <dongsheng@moodle.com>
- # Contributor: Anish Tondwalkar <2012atondwal@tjhsst.edu>
- pkgname=nodejs-git
- pkgver=20110524
- pkgrel=1
- pkgdesc="Evented I/O for V8 javascript"
- arch=("any")
- url="http://nodejs.org/"
- license=("custom:nodejs")
- depends=("python2")
- makedepends=("gcc" "coreutils")
- optdepends=("openssl: TLS support")
- provides=("nodejs")
- _gitorigin="git://github.com/joyent/node.git"
- _gitname="nodejs"
- build() {
- cd ${srcdir}
- msg "Connecting to gitosis git server..."
- if [ -d ${srcdir}/${_gitname} ]; then
- cd ${_gitname} && git pull origin
- msg "The local files are updated."
- else
- git clone ${_gitorigin} ${_gitname}
- fi
- msg "GIT checkout done or server timeout!"
- cd ${srcdir}/${_gitname}
- msg "applying python2 fixes.."
- # python2 fix
- for file in $(find . -name '*.py' -print) wscript tools/waf-light tools/node-waf; do
- sed -i 's_^#!.*/usr/bin/python2*_#!/usr/bin/python2_' "$file"
- sed -i 's_^#!.*/usr/bin/env.*python2*_#!/usr/bin/env python2_' "$file"
- done
- sed -i "s|cmd_R = 'python |cmd_R = 'python2 |" wscript
- sed -i "s|python |python2 |" Makefile
- msg "Starting make..."
- ./configure --prefix=/usr
- make
- msg "building documentation.."
- make doc
- }
- package() {
- cd ${srcdir}/${_gitname}
- msg "copying files to destination.."
- # copying files to destination
- make DESTDIR="$pkgdir/" install
- msg "copying license information.."
- # copying license information
- install -D -m644 LICENSE $pkgdir/usr/share/licenses/${pkgname}/LICENSE
- msg "copying docs.."
- # copying doc related stuff
- install -D -m644 AUTHORS $pkgdir/usr/share/doc/$pkgname/AUTHORS
- install -D -m644 README.cmake $pkgdir/usr/share/doc/$pkgname/README.cmake
- install -D -m644 README.md $pkgdir/usr/share/doc/$pkgname/README.md
- install -D -m644 TODO $pkgdir/usr/share/doc/$pkgname/TODO
- install -D -m644 TODO.win32 $pkgdir/usr/share/doc/$pkgname/TODO.win32
- msg "copying api docs.."
- # copying api docs
- cp -r $srcdir/${_gitname}/build/doc/api/ $pkgdir/usr/share/doc/$pkgname/
- }
- # vim:set ts=2 sw=2 et:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement