summaryrefslogtreecommitdiff
path: root/pcr/ipycli-git/PKGBUILD
blob: 86f6289d144157304b2d89ef3281b2c0b270d0ff (plain)
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
47
48
49
50
51
52
53
54
55
56
# Contributor: Francois Boulogne <fboulogne at april dot org>
# Maintainer: Parabola GNU / Linux-libre Aurélien Desbrières <aurelien@cwb.io>

pkgname=ipycli-git
pkgver=20121109
pkgrel=2
pkgdesc="IPython subapp that supports adding arbitrary notebooks from the command line"
arch=('i686' 'x86_64')
url="https://github.com/dalejung/ipycli/"
license=('UNKNOWN')
depends=('python2' 'ipython2')
optdepends=()
makedepends=('git' 'python2')
install=
provides=()
conflicts=()
source=()


_gitroot="git://github.com/dalejung/ipycli.git"
_gitname="ipycli"

build() {

  cd "$srcdir"
  msg "Connecting to GIT server...."

  if [ -d $_gitname ] ; then
    cd $_gitname && git pull origin
    msg "The local files are updated."
  else
    git clone $_gitroot $_gitname
  fi

  msg "GIT checkout done or server timeout"
  msg "Starting make..."

  rm -rf "$srcdir/$_gitname-build"
  git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
  cd "$srcdir/$_gitname-build"

  #lib
  python2 setup.py install --root="${pkgdir}" 

  #bin
  mkdir "${pkgdir}/usr/bin"
  cp "bin/nb" "${pkgdir}/usr/bin" 
  sed -i -e "s|#!/usr/bin/env python$|#!/usr/bin/env python2|" "${pkgdir}/usr/bin/nb" 
  cp "bin/ipycli" "${pkgdir}/usr/bin" 
  sed -i -e "s|#!/usr/bin/env python$|#!/usr/bin/env python2|" "${pkgdir}/usr/bin/ipycli" 

  #templates/statics
  cp -r "ipycli/static" "${pkgdir}/usr/lib/python2.7/site-packages/ipycli/" 
  cp -r "ipycli/templates" "${pkgdir}/usr/lib/python2.7/site-packages/ipycli/" 
}
# vim:set ts=2 sw=2 et: