[arch-commits] Commit in docutils/trunk (PKGBUILD)

Ionut Biru ibiru at archlinux.org
Wed Aug 18 10:26:28 EDT 2010


    Date: Wednesday, August 18, 2010 @ 10:26:28
  Author: ibiru
Revision: 87861

upgpkg: docutils 0.7-5
python rebuild

Modified:
  docutils/trunk/PKGBUILD

----------+
 PKGBUILD |   17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2010-08-18 14:19:07 UTC (rev 87860)
+++ PKGBUILD	2010-08-18 14:26:28 UTC (rev 87861)
@@ -4,23 +4,28 @@
 
 pkgname=docutils
 pkgver=0.7
-pkgrel=4
+pkgrel=5
 pkgdesc="Set of tools for processing plaintext docs into formats such as HTML, XML, or LaTeX"
 arch=('any')
 url="http://docutils.sourceforge.net"
 license=('custom')
-depends=('python')
+depends=('python2')
 source=(http://downloads.sourceforge.net/docutils/docutils-$pkgver.tar.gz)
 md5sums=('9aec716baf15d06b5aa57cf8d5591c15')
 
 build() {
   cd ${srcdir}/${pkgname}-${pkgver}
-  python setup.py install --root=${pkgdir} --optimize=1
+  python2 setup.py install --root=${pkgdir} --optimize=1
 
-  for f in $pkgdir/usr/bin/*.py; do
+  for f in ${pkgdir}/usr/bin/*.py; do
       ln -s $(basename $f) $pkgdir/usr/bin/$(basename $f .py)
   done
 
-  install -D -m644 COPYING.txt $pkgdir/usr/share/licenses/$pkgname/COPYING.txt
-  install -D -m644 licenses/python* $pkgdir/usr/share/licenses/$pkgname/
+  sed -e 's|#! /usr/bin/env python|#!/usr/bin/env python2|' \
+      -i ${pkgdir}/usr/lib/python2.7/site-packages/docutils/readers/python/pynodes.py
+  sed -e 's|#!/usr/bin/env python|#!/usr/bin/env python2|' \
+      -i ${pkgdir}/usr/lib/python2.7/site-packages/docutils/_string_template_compat.py
+
+  install -D -m644 COPYING.txt ${pkgdir}/usr/share/licenses/${pkgname}/COPYING.txt
+  install -D -m644 licenses/python* ${pkgdir}/usr/share/licenses/${pkgname}/
 }



More information about the arch-commits mailing list