1 # Maintainer: Mike Shutlar (iFSS) <mike at epinux(dot)co(dot)uk>
2 # Python File Format Interface (PyFFI)
3 # Can be used with PyPy - comment out Python 2.7 install, uncomment PyPy 1.6 install
8 pkgdesc="Library and editor (QSkope) for block structured binaries (nif,kfm,cgf,egm,dds,tga)"
10 url="http://pyffi.sourceforge.net/"
11 license=('custom:BSD')
13 depends=('python2-pyqt' 'wine<=1.3.28')
14 #depends=('python2-pyqt' 'wine<=1.3.28' 'pypy')
15 source=("http://downloads.sourceforge.net/project/pyffi/pyffi/${pkgver}/PyFFI-${pkgver}.2c30444.tar.bz2")
16 sha256sums=('26473dbbdb90570e3c818d16f1efe0a790f63fd3a0f1fb234c0b3759a2be9a70')
17 md5sums=('0e2fbd6942d75b0f51c836fd25c44f2d')
20 # Wine must be used to load mopper.exe (Wine 1.3.30 does not work, try earlier)
21 sed -i "s/subprocess.call(\[mopper/subprocess.call(\[\"\/usr\/bin\/wine\", mopper/" \
22 "${srcdir}/${_pkgnamecase}-${pkgver}/pyffi/utils/mopp.py"
26 cd "${srcdir}/${_pkgnamecase}-${pkgver}"
28 # --- Python 2.7 install
29 python2 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1
30 chmod +x "${pkgdir}/usr/lib/python2.7/site-packages/pyffi/utils/mopper.exe"
31 # --- End Python 2.7 install
33 # --- PyPy 1.6 install
34 #pypy setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1
35 #install -dm755 "$pkgdir/opt/pypy/"
36 #mv "$pkgdir/usr/site-packages" "$pkgdir/opt/pypy/"
37 #chmod +x "$pkgdir/opt/pypy/site-packages/pyffi/utils/mopper.exe"
38 # --- End PyPy 1.6 install
40 install -D -m644 LICENSE.rst "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.rst"