mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 10:32:13 +08:00
134 lines
4.0 KiB
Bash
134 lines
4.0 KiB
Bash
# Maintainer: H W Tovetjärn (totte) <totte@tott.es>
|
|
# Contributors: Manuel Tortosa <manutortosa@chakra-project.org>
|
|
# A Scarpino <andrea@archlinux.org>
|
|
|
|
# Include global buildsystem configuration
|
|
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
|
|
|
pkgbase=kdebindings-python
|
|
pkgname=('kdebindings-python-common'
|
|
'kdebindings-python2'
|
|
'kdebindings-python3')
|
|
pkgver=${_kdever}
|
|
pkgrel=1
|
|
url='https://projects.kde.org/projects/kde/kdebindings/pykde4'
|
|
arch=('x86_64')
|
|
license=('GPL'
|
|
'LGPL'
|
|
'FDL')
|
|
makedepends=('automoc4'
|
|
'boost'
|
|
'boost-libs'
|
|
'cmake'
|
|
"kdepim-runtime>=${_kdever}"
|
|
'polkit-qt'
|
|
'python-sip-common'
|
|
'python2-pyqt4'
|
|
'python2-sip'
|
|
'python3-pyqt4'
|
|
'python3-sip'
|
|
'qscintilla-python2>=2.7.2-1')
|
|
groups=('kde'
|
|
'kdebindings'
|
|
'kde-uninstall')
|
|
options=('docs'
|
|
'!header'
|
|
'debug'
|
|
'log')
|
|
source=("$_mirror/pykde4-$_kdever.tar.xz")
|
|
sha256sums=(`grep pykde4-$_kdever.tar.xz ../checksums.txt | cut -d" " -f1`)
|
|
|
|
prepare() {
|
|
cd "${srcdir}"
|
|
rm -rf build-python2 build-python3
|
|
mkdir -p build-python2 build-python3
|
|
}
|
|
|
|
build() {
|
|
export PYTHONDONTWRITEBYTECODE="TRUE"
|
|
|
|
cd ${srcdir}/build-python2
|
|
cmake ../pykde4-${pkgver} \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DPYTHON_EXECUTABLE=/usr/bin/python2 \
|
|
-DPYKDEUIC4_ALTINSTALL=TRUE
|
|
make
|
|
|
|
cd ${srcdir}/build-python3
|
|
cmake ../pykde4-${pkgver} \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DPYTHON_EXECUTABLE=/usr/bin/python3 \
|
|
-DPYTHON_LIBRARY=/usr/lib/libpython3.4m.so.1.0 \
|
|
-DPYKDEUIC4_ALTINSTALL=TRUE
|
|
make
|
|
}
|
|
|
|
package_kdebindings-python3() {
|
|
pkgdesc='A set of Python 3.x bindings for KDE'
|
|
depends=('python3-pyqt4'
|
|
'qscintilla-python3'
|
|
'boost-libs'
|
|
"kdepim-runtime>=${_kdever}"
|
|
'kdebindings-python-common')
|
|
|
|
cd "${srcdir}"/build-python3
|
|
make DESTDIR="${pkgdir}" install
|
|
|
|
# Fix issue with wrong number of given arguments
|
|
sed -i 's/winfo = comp.compileUi(uifile, output, None)/winfo = comp.compileUi(uifile, output, None, "")/g' \
|
|
"${pkgdir}"/usr/lib/python3.4/site-packages/PyQt4/uic/pykdeuic4.py
|
|
|
|
# Provided by common
|
|
#rm -r "${pkgdir}"/usr/share/apps/pykde4/examples
|
|
#rm -r "${pkgdir}"/usr/share/sip/PyKDE4
|
|
rm -r "${pkgdir}"/usr/share
|
|
}
|
|
|
|
package_kdebindings-python2() {
|
|
pkgdesc='A set of Python 2.x bindings for KDE'
|
|
depends=('python2-pyqt4'
|
|
'qscintilla-python2'
|
|
'boost-libs'
|
|
"kdepim-runtime>=${_kdever}"
|
|
'kdebindings-python-common')
|
|
conflicts=('kdebindings-pykde4<4.11.2')
|
|
provides=("kdebindings-pykde4=${pkgver}"
|
|
'kdebindings-python'
|
|
'pykde4')
|
|
replaces=('kdebindings-pykde4'
|
|
'kdebindings-pykde4-python2')
|
|
|
|
cd "${srcdir}"/build-python2
|
|
make DESTDIR="${pkgdir}" install
|
|
|
|
# Fix issue with wrong number of given arguments
|
|
sed -i 's/winfo = comp.compileUi(uifile, output, None)/winfo = comp.compileUi(uifile, output, None, "")/g' "${pkgdir}"/usr/lib/python2.7/site-packages/PyQt4/uic/pykdeuic4.py
|
|
|
|
# Symlink
|
|
ln -s /usr/bin/pykdeuic4-2.7 "${pkgdir}"/usr/bin/pykdeuic4
|
|
|
|
# Provided by common
|
|
#rm -r "${pkgdir}"/usr/share/apps/pykde4/examples
|
|
#rm -r "${pkgdir}"/usr/share/sip/PyKDE4
|
|
rm -r "${pkgdir}"/usr/share
|
|
}
|
|
|
|
package_kdebindings-python-common() {
|
|
pkgdesc="Common files shared between kdebindings-python2 and kdebindings-python3"
|
|
conflicts=('kdebindings-pykde<4.11.2'
|
|
'kdebindings-pykde4-common')
|
|
replaces=('kdebindings-pykde4-common')
|
|
|
|
cd ${srcdir}/build-python2
|
|
make DESTDIR="${pkgdir}" install
|
|
|
|
rm -r "${pkgdir}"/usr/{bin,lib}
|
|
|
|
|
|
# This doesn't seem right, we shouldn't need to install the file manually
|
|
install -Dm 644 pykde_config.sip ${pkgdir}/usr/share/sip/PyKDE4/pykde_config.sip
|
|
|
|
}
|