aboutsummaryrefslogblamecommitdiffstats
path: root/main/py-gobject3/APKBUILD
blob: 475aed5c65e30dc4c2f8ef66ea2c147123a8b5df (plain) (tree)
1
2
3
4
5
6
7
8
9

                                                   

             
                                                 


                           
                                                                           
                                                                   
                                                                          
                                                                                           
                                    
 
           
                       
                       

                                           

 








                          



                             
                     


                                 

                                         
                                      
                                                 
            

 
        
                           



                   
                           






                                                      



                                                              

 
                                                                                                                                                                      
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py-gobject3
pkgver=3.28.2
pkgrel=0
pkgdesc="Python bindings for the GObject library"
url="http://www.pygtk.org/"
arch="all"
license="GPL"
makedepends="python2-dev python3-dev py-cairo-dev gobject-introspection-dev
	libffi-dev glib-dev gnome-common autoconf automake libtool"
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3 $pkgname-dev"
source="https://download.gnome.org/sources/pygobject/${pkgver%.*}/pygobject-$pkgver.tar.xz"
builddir="$srcdir"/pygobject-$pkgver

prepare() {
	default_prepare
	autoreconf -vif
	cp -r "$builddir" "$srcdir"/python2
	cp -r "$builddir" "$srcdir"/python3
}

build()	{
	_build python2
	_build python3
}

package() {
	mkdir -p "$pkgdir"
}

_build() {
	local python="$1"
	export PYTHON=$python
	cd "$srcdir"/$python
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--enable-compile-warnings=minimum
	make
}

_py2() {
	depends="py2-cairo"
	_py python2
}

_py3() {
	depends="py3-cairo"
	_py python3
}

_py() {
	local python="$1"
	pkgdesc="$pkgdesc (for $python)"
	install_if="$pkgname=$pkgver-r$pkgrel $python"
	cd "$srcdir/$python"
	make DESTDIR="$pkgdir" install
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/${python}.* "$subpkgdir"/usr/lib/
}

sha512sums="2ba858856ef7f0c2fcac84a0f0a71ec1212991d8c57613cd948b55d413e69bd0961358935f5fd8753b905753cf563037cb351c428f4afcbbaac8ee0cebf4970c  pygobject-3.28.2.tar.xz"