mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-13 01:09:01 +08:00
89 lines
2.6 KiB
Bash
89 lines
2.6 KiB
Bash
pkgbase=sip
|
|
pkgname=('python-sip-common' 'python2-sip' 'python3-sip' 'python3-sip-pyqt5' 'python2-sip-pyqt5')
|
|
pkgver=4.19.12
|
|
pkgrel=2
|
|
arch=('x86_64')
|
|
url="https://www.riverbankcomputing.com/software/sip/"
|
|
license=('custom:"sip"')
|
|
makedepends=('python2' 'python3')
|
|
source=("https://downloads.sourceforge.net/pyqt/${pkgbase}-${pkgver}.tar.gz")
|
|
md5sums=('e28b0790dfe4962ce6bbd7c4772f40c9')
|
|
|
|
prepare() {
|
|
mkdir -p build{,-py2,-pyqt5,-pyqt5-py2}
|
|
}
|
|
|
|
build() {
|
|
cd "$srcdir"/build
|
|
python3 ../sip-$pkgver/configure.py CFLAGS="$CFLAGS" LFLAGS="$LDFLAGS"
|
|
make
|
|
|
|
cd "$srcdir"/build-py2
|
|
python2 ../sip-$pkgver/configure.py CFLAGS="$CFLAGS" LFLAGS="$LDFLAGS"
|
|
make
|
|
|
|
cd "$srcdir"/build-pyqt5
|
|
python3 ../sip-$pkgver/configure.py CFLAGS="$CFLAGS" LFLAGS="$LDFLAGS" --sip-module PyQt5.sip --no-tools
|
|
make
|
|
|
|
cd "$srcdir"/build-pyqt5-py2
|
|
python2 ../sip-$pkgver/configure.py CFLAGS="$CFLAGS" LFLAGS="$LDFLAGS" --sip-module PyQt5.sip --no-tools
|
|
make
|
|
}
|
|
|
|
package_python-sip-common() {
|
|
pkgdesc="A tool for creating Python bindings for C and C++ libraries"
|
|
depends=('glibc')
|
|
conflicts=('sip-common' 'sip')
|
|
replaces=('sip-common' 'sip')
|
|
provides=('sip-common=${pkgver}' 'sip')
|
|
|
|
cd build
|
|
make DESTDIR="$pkgdir" install -C sipgen
|
|
install -Dm644 ../sip-$pkgver/siplib/sip.h -t "$pkgdir"/usr/include
|
|
|
|
install -Dm644 ../sip-$pkgver/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
|
}
|
|
|
|
package_python3-sip() {
|
|
pkgdesc="Python 3.x SIP bindings for C and C++ libraries"
|
|
depends=('python3' 'python-sip-common')
|
|
|
|
cd build
|
|
make DESTDIR="$pkgdir" install
|
|
rm -r "$pkgdir"/usr/{bin,include} # conflicts with sip
|
|
|
|
install -Dm644 ../sip-$pkgver/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
|
}
|
|
|
|
package_python2-sip() {
|
|
pkgdesc="Python 2.x SIP bindings for C and C++ libraries"
|
|
depends=('python2' 'python-sip-common')
|
|
|
|
cd build-py2
|
|
make DESTDIR="$pkgdir" install
|
|
rm -r "$pkgdir"/usr/{bin,include} # conflicts with sip
|
|
|
|
install -Dm644 ../sip-$pkgver/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
|
}
|
|
|
|
package_python3-sip-pyqt5() {
|
|
pkgdesc="Python 3.x SIP bindings for C and C++ libraries (PyQt5 version)"
|
|
depends=('python3' 'python-sip-common')
|
|
|
|
cd build-pyqt5
|
|
make DESTDIR="$pkgdir" install
|
|
|
|
install -Dm644 ../sip-$pkgver/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
|
}
|
|
|
|
package_python2-sip-pyqt5() {
|
|
pkgdesc="Python 2.x SIP bindings for C and C++ libraries (PyQt5 version)"
|
|
depends=('python2')
|
|
|
|
cd build-pyqt5-py2
|
|
make DESTDIR="$pkgdir" install
|
|
|
|
install -Dm644 ../sip-$pkgver/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
|
}
|