mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-10 23:24:37 +08:00
working version of pykde for python2 and 3
This commit is contained in:
parent
71bedd3571
commit
2d5f84380f
@ -6,16 +6,16 @@
|
|||||||
# include global config
|
# include global config
|
||||||
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
||||||
|
|
||||||
pkgname=kdebindings-pykde4
|
pkgname=("kdebindings-pykde4-common" "kdebindings-pykde4-python2" "kdebindings-pykde4-python3")
|
||||||
_pkgname=pykde4
|
_pkgname=pykde4
|
||||||
pkgver=${_kdever}
|
pkgver=${_kdever}
|
||||||
pkgrel=1
|
pkgrel=2
|
||||||
pkgdesc="KDE bindings for python"
|
pkgdesc="KDE bindings for python"
|
||||||
url="http://kde.org/"
|
url="http://kde.org/"
|
||||||
arch=('x86_64')
|
arch=('x86_64')
|
||||||
license=('GPL' 'LGPL' 'FDL')
|
license=('GPL' 'LGPL' 'FDL')
|
||||||
depends=('pyqt4-python2' 'qscintilla-python2' 'boost-libs' "kdepim-runtime>=${_kdever}")
|
depends=('pyqt4-python2' 'qscintilla-python2' 'boost-libs' "kdepim-runtime>=${_kdever}")
|
||||||
makedepends=('cmake' 'automoc4' 'polkit-qt' 'boost')
|
makedepends=('cmake' 'automoc4' 'polkit-qt' 'boost' 'python2-sip' 'python3-sip' 'pyqt4-python2' 'pyqt4-python3' 'python-sip-common')
|
||||||
source=("$_mirror/${_pkgname}-$_kdever.tar.xz")
|
source=("$_mirror/${_pkgname}-$_kdever.tar.xz")
|
||||||
sha1sums=(`grep ${_pkgname}-$_kdever.tar.xz ../kde-sc.md5 | cut -d" " -f1`)
|
sha1sums=(`grep ${_pkgname}-$_kdever.tar.xz ../kde-sc.md5 | cut -d" " -f1`)
|
||||||
|
|
||||||
@ -25,22 +25,67 @@ replaces=('kdebindings-python')
|
|||||||
conflicts=('kdebindings-python')
|
conflicts=('kdebindings-python')
|
||||||
options=('docs' '!header' 'debug' 'log')
|
options=('docs' '!header' 'debug' 'log')
|
||||||
|
|
||||||
build() {
|
prepare() {
|
||||||
cd "${srcdir}"
|
cd "${srcdir}"
|
||||||
|
rm -rf build-python2 build-python3
|
||||||
mkdir -p build && cd build
|
mkdir -p build-python2 build-python3
|
||||||
|
|
||||||
cmake ../pykde4-${pkgver} \
|
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
|
||||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
||||||
-DPYTHON_EXECUTABLE=/usr/bin/python2
|
|
||||||
make
|
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
build() {
|
||||||
cd "${srcdir}"/build
|
export PYTHONDONTWRITEBYTECODE="TRUE"
|
||||||
make DESTDIR="${pkgdir}" install
|
|
||||||
|
|
||||||
# Use the python2 executable
|
cd ${srcdir}/build-python2
|
||||||
find "${pkgdir}" -name '*.py' | xargs sed -i 's|#!/usr/bin/env python|#!/usr/bin/env 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.3m.so.1.0 \
|
||||||
|
-DPYKDEUIC4_ALTINSTALL=TRUE
|
||||||
|
make
|
||||||
}
|
}
|
||||||
|
|
||||||
|
package_kdebindings-pykde4-python3() {
|
||||||
|
pkgdesc="A set of Python 3.x bindings for KDE"
|
||||||
|
depends=('pyqt4-python3' 'qscintilla-python3' 'boost-libs' "kdepim-runtime>=${_kdever}" "kdebindings-pykde4-common")
|
||||||
|
|
||||||
|
cd "${srcdir}"/build-python3
|
||||||
|
make DESTDIR="${pkgdir}" install
|
||||||
|
|
||||||
|
# Provided by common
|
||||||
|
rm -r "${pkgdir}"/usr/share/apps/pykde4/examples
|
||||||
|
rm -r "${pkgdir}"/usr/share/sip/PyKDE4
|
||||||
|
}
|
||||||
|
|
||||||
|
package_kdebindings-pykde4-python2() {
|
||||||
|
pkgdesc="A set of Python 2.x bindings for KDE"
|
||||||
|
depends=('pyqt4-python2' 'qscintilla-python2' 'boost-libs' "kdepim-runtime>=${_kdever}" "kdebindings-pykde4-common")
|
||||||
|
conflicts=('kdebindings-pykde<4.11.2')
|
||||||
|
provides=('kdebindings-pykde=${pgver}')
|
||||||
|
replaces=('kdebindings-pykde')
|
||||||
|
|
||||||
|
cd "${srcdir}"/build-python2
|
||||||
|
make DESTDIR="${pkgdir}" install
|
||||||
|
|
||||||
|
# Provided by common
|
||||||
|
rm -r "${pkgdir}"/usr/share/apps/pykde4/examples
|
||||||
|
rm -r "${pkgdir}"/usr/share/sip/PyKDE4
|
||||||
|
}
|
||||||
|
|
||||||
|
package_kdebindings-pykde4-common() {
|
||||||
|
pkgdesc="Common files shared between python2 and python3 kdebindings-pykde"
|
||||||
|
conflicts=('kdebindings-pykde<4.11.2')
|
||||||
|
|
||||||
|
cd ${srcdir}/build-python2
|
||||||
|
make DESTDIR="${pkgdir}" install
|
||||||
|
|
||||||
|
rm -r "${pkgdir}"/usr/{bin,lib}
|
||||||
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user