1 # Maintainer: Aaron DeVore <aaron.devore@gmail.com>
2 # Contributor: Marco Elver <el.marcoe+arch at gmail dot com>
9 pkgdesc="Web application construction kit and templating engine written in python."
10 url="http://divmod.org/trac/wiki/DivmodNevow"
12 optdepends=('twisted: to use all the advanced features of nevow, such as LivePage')
13 makedepends=('twisted' 'python2-distribute')
14 source=("http://pypi.python.org/packages/source/N/Nevow/Nevow-${pkgver}.tar.gz")
15 md5sums=('66dda2ad88f42dea05911add15f4d1b2')
20 cd $srcdir/Nevow-$pkgver
21 python2 setup.py install --root=$pkgdir --optimize=1
23 # is there a way to fix the doc path with the setup.py script ?
24 mkdir -p $pkgdir/usr/share/doc/nevow
25 mv $pkgdir/usr/doc/man $pkgdir/usr/share/
26 mv $pkgdir/usr/doc/* $pkgdir/usr/share/doc/nevow/
29 # Same as above - in v0.9.33 nevow_widget.py was in the right
30 # place. Can anybody explain why this has changed? Let's hope this
31 # gets fixed in their next setup.py.
32 _python_version=`python2 -c "import sys; print sys.version[:3]"`
33 _python_twisted_plugins="$pkgdir/usr/lib/python${_python_version}/site-packages/twisted/plugins/"
34 mkdir -p $_python_twisted_plugins
35 mv $pkgdir/usr/twisted/plugins/nevow_widget.py $_python_twisted_plugins
36 rm -r $pkgdir/usr/twisted
38 # Distribute doesn't kill off #!/usr/bin/python shebangs
39 find $pkgdir -name "*.py" -exec \
40 sed -i '1s/python[[:space:]]*$/python2/' {} \;
42 install -D -m644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE