mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-04 05:37:14 +08:00
59 lines
1.3 KiB
Bash
59 lines
1.3 KiB
Bash
pkgbase=pygobject2
|
|
pkgname=(python2-gobject2 pygobject2-devel)
|
|
pkgver=2.28.6
|
|
pkgrel=1
|
|
arch=(i686 x86_64)
|
|
url="http://www.pygtk.org/"
|
|
license=(LGPL)
|
|
makedepends=(python2 git)
|
|
|
|
# pygobject-2-28 branch: https://git.gnome.org/browse/pygobject/log/?h=pygobject-2-28
|
|
source=('git://git.gnome.org/pygobject#commit=9456ba7')
|
|
sha256sums=('SKIP')
|
|
|
|
prepare() {
|
|
cd pygobject
|
|
autoreconf -fi
|
|
|
|
cd ..
|
|
cp -a pygobject python2-build
|
|
}
|
|
|
|
build() {
|
|
cd python2-build
|
|
./configure --prefix=/usr --disable-introspection \
|
|
PYTHON=/usr/bin/python2
|
|
make
|
|
|
|
cd ../pygobject
|
|
./configure --prefix=/usr --disable-introspection
|
|
make
|
|
}
|
|
|
|
package_python2-gobject2() {
|
|
pkgdesc="Python 2 bindings for GObject2"
|
|
depends=(glib2 pygobject2-devel python2)
|
|
replaces=(pygobject)
|
|
provides=("pygobject=$pkgver")
|
|
|
|
cd python2-build
|
|
make DESTDIR="$pkgdir" install
|
|
|
|
find "$pkgdir"/usr/share/pygobject -name '*.py' -exec \
|
|
sed -i '1s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|' {} +
|
|
|
|
rm -r "$pkgdir"/usr/share/gtk-doc
|
|
|
|
# Split devel stuff
|
|
cd ..
|
|
mkdir -p devel/usr/{lib,share/pygobject}
|
|
mv {"$pkgdir",devel}/usr/include
|
|
mv {"$pkgdir",devel}/usr/lib/pkgconfig
|
|
mv {"$pkgdir",devel}/usr/share/pygobject/xsl
|
|
}
|
|
|
|
package_pygobject2-devel() {
|
|
pkgdesc="Development files for the pygobject bindings"
|
|
mv devel/* "$pkgdir"
|
|
}
|