updated on Wed Jan 25 16:08:47 UTC 2012
[aur-mirror.git] / python-nevow / PKGBUILD
blob788b2eb524c5c8358f590618091481bfb1f33871
1 # Maintainer: Aaron DeVore <aaron.devore@gmail.com>
2 # Contributor: Marco Elver <el.marcoe+arch at gmail dot com>
4 pkgname=python-nevow
5 pkgver=0.10.0
6 pkgrel=3
7 arch=(any)
8 license=('custom')
9 pkgdesc="Web application construction kit and templating engine written in python."
10 url="http://divmod.org/trac/wiki/DivmodNevow"
11 depends=('python2')
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')
16 options=(!emptydirs)
17 changelog=Changelog
19 build() {
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/
27   rm -r $pkgdir/usr/doc
28   
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