mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-25 02:52:13 +08:00
102 lines
3.2 KiB
Bash
102 lines
3.2 KiB
Bash
# Contributions from Arch: https://projects.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/kdebindings-python
|
|
|
|
pkgbase=kdebindings-python
|
|
pkgname=('kdebindings-python-common'
|
|
'kdebindings-python2'
|
|
'kdebindings-python3')
|
|
pkgver=4.14.3
|
|
pkgrel=2
|
|
url='https://projects.kde.org/projects/kde/kdebindings/pykde4'
|
|
arch=('x86_64')
|
|
license=('GPL' 'LGPL' 'FDL')
|
|
makedepends=('cmake' 'automoc4' 'boost' 'kdepimlibs4' 'python2-pyqt4' 'python3-pyqt4' 'python2-sip'
|
|
'python3-sip' 'qscintilla')
|
|
groups=('kde' 'kdebindings' 'kde-uninstall')
|
|
source=("$_mirror/pykde4-$_kdever.tar.xz")
|
|
source=("http://download.kde.org/stable/${pkgver}/src/pykde4-${pkgver}.tar.xz"
|
|
pykde4-4.14.3-missing_symbols.patch)
|
|
sha1sums=('9cc8e70d3b107a876cf579beab1f582861cd2c48'
|
|
'd91cc58a649bb0a8a5ba269c3012ae2e72ffaa09')
|
|
|
|
prepare() {
|
|
cd "${srcdir}"
|
|
rm -rf build-python2 build-python3
|
|
mkdir -p build-python2 build-python3
|
|
|
|
cd pykde4-${pkgver}
|
|
patch -p1 -i ../pykde4-4.14.3-missing_symbols.patch
|
|
}
|
|
|
|
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 \
|
|
-DWITH_Nepomuk=OFF \
|
|
-DWITH_Soprano=OFF
|
|
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.5m.so.1.0 \
|
|
-DPYKDEUIC4_ALTINSTALL=TRUE \
|
|
-DWITH_Nepomuk=OFF \
|
|
-DWITH_Soprano=OFF
|
|
make
|
|
}
|
|
|
|
package_kdebindings-python3() {
|
|
pkgdesc='A set of Python 3.x bindings for KDE'
|
|
depends=('python3-pyqt4' 'kdebindings-python-common' 'kdepimlibs4')
|
|
|
|
cd "${srcdir}"/build-python3
|
|
make DESTDIR="${pkgdir}" install
|
|
|
|
# Provided by kdebindings-python-common
|
|
rm -r "${pkgdir}"/usr/share/apps/pykde4/examples
|
|
rm -r "${pkgdir}"/usr/share/sip/PyKDE4
|
|
|
|
ln -s /usr/bin/pykdeuic4-3.4 "${pkgdir}"/usr/bin/pykdeuic4
|
|
}
|
|
|
|
package_kdebindings-python2() {
|
|
pkgdesc='A set of Python 2.x bindings for KDE'
|
|
depends=('python2-pyqt4' 'kdebindings-python-common' 'kdepimlibs4')
|
|
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
|
|
|
|
# Provided by kdebindings-python-common
|
|
rm -r "${pkgdir}"/usr/share/apps/pykde4/examples
|
|
rm -r "${pkgdir}"/usr/share/sip/PyKDE4
|
|
|
|
# Use the python2 executable
|
|
find "${pkgdir}" -name '*.py' | xargs sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|'
|
|
}
|
|
|
|
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')
|
|
depends=('qscintilla')
|
|
|
|
cd ${srcdir}/build-python2
|
|
make DESTDIR="${pkgdir}" install
|
|
|
|
rm -r "${pkgdir}"/usr/{bin,lib}
|
|
}
|