Last active
December 18, 2015 14:48
-
-
Save flying-sheep/5799494 to your computer and use it in GitHub Desktop.
PyQt5 PKGBUILD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pkgbase=pyqt5 | |
pkgname=('pyqt5-common' 'pyqt5' 'python2-pyqt5') | |
pkgver=5.0 | |
pkgrel=1 | |
arch=('i686' 'x86_64') | |
url="http://riverbankcomputing.co.uk/software/pyqt/intro" | |
license=('GPL') | |
makedepends=('python-sip>=4.14.7' 'python2-sip>=4.14.7' 'python-dbus' 'python2-dbus' | |
'phonon' 'mesa' 'python2-opengl' 'qt5-tools' 'qt5-webkit') | |
source=("http://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-$pkgver/PyQt-gpl-$pkgver.tar.gz") | |
md5sums=('771b3d680a905ab5b6a13fa8707dc70a') | |
build() { | |
cp -r PyQt-gpl-${pkgver} Py2Qt-gpl-${pkgver} | |
cd PyQt-gpl-${pkgver} | |
python configure.py \ | |
--confirm-license \ | |
--qsci-api \ | |
-q /usr/bin/qmake-qt5 | |
# Thanks Gerardo for the rpath fix | |
find -name 'Makefile' | xargs sed -i 's|-Wl,-rpath,/usr/lib||g;s|-Wl,-rpath,.* ||g' | |
make | |
### Python2 version ### | |
cd ../Py2Qt-gpl-${pkgver} | |
python2 configure.py \ | |
--confirm-license \ | |
-v /usr/share/sip \ | |
--qsci-api \ | |
-q /usr/bin/qmake-qt5 | |
# Thanks Gerardo for the rpath fix | |
find -name 'Makefile' | xargs sed -i 's|-Wl,-rpath,/usr/lib||g;s|-Wl,-rpath,.* ||g' | |
make | |
} | |
package_pyqt5-common(){ | |
pkgdesc="Common PyQt files shared between pyqt and python2-pyqt" | |
depends=('qt5-base') | |
cd PyQt-gpl-${pkgver} | |
make -C pyrcc DESTDIR="${pkgdir}" install | |
make -C pylupdate DESTDIR="${pkgdir}" install | |
install -Dm644 PyQt5.api "${pkgdir}"/usr/share/qt5/qsci/api/python/PyQt5.api | |
} | |
package_pyqt5(){ | |
pkgdesc="A set of Python 3.x bindings for the Qt toolkit" | |
depends=('qtwebkit' 'python-sip>=4.14.7' 'python-dbus' 'pyqt5-common') | |
optdepends=('phonon: enable audio and video in PyQt applications' | |
'python-opengl: enable OpenGL 3D graphics in PyQt applications' | |
'qt5-tools: add PyQt online help in Qt Assistant') | |
cd PyQt-gpl-${pkgver} | |
# INSTALL_ROOT is needed for the QtDesigner module, the other Makefiles use DESTDIR | |
make DESTDIR="${pkgdir}" INSTALL_ROOT="${pkgdir}" install | |
# Provided by pyqt-common | |
rm "${pkgdir}"/usr/bin/{pylupdate5,pyrcc5} | |
rm "${pkgdir}"/usr/share/qt/qsci/api/python/PyQt5.api | |
} | |
package_python2-pyqt5(){ | |
pkgdesc="A set of Python 2.x bindings for the Qt toolkit" | |
depends=('qtwebkit' 'python2-sip>=4.14.7' 'python2-dbus' 'pyqt5-common') | |
optdepends=('phonon: enable audio and video in PyQt applications' | |
'python2-opengl: enable OpenGL 3D graphics in PyQt applications' | |
'qt5-tools: add PyQt online help in Qt Assistant') | |
provides=('python2-qt5') | |
cd Py2Qt-gpl-${pkgver} | |
# INSTALL_ROOT is needed for the QtDesigner module, the other Makefiles use DESTDIR | |
make DESTDIR="${pkgdir}" INSTALL_ROOT="${pkgdir}" install | |
# Fix conflicts with pyqt | |
mv "${pkgdir}"/usr/bin/{,python2-}pyuic5 | |
# Provided by pyqt | |
rm "${pkgdir}"/usr/bin/{pylupdate5,pyrcc5} | |
rm "${pkgdir}"/usr/lib/qt/plugins/designer/libpyqt5.so | |
rm "${pkgdir}"/usr/share/qt/qsci/api/python/PyQt5.api | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment