#!/usr/bin/env bash
name='xcb-proto'
release='3'
version='1.16.0'
url='https://xcb.freedesktop.org/'
description='X C-language Bindings protocol headers'
email='kurth4cker@tutanota.com'
maintainer='kurth4cker'
license=('MIT')
source=("https://xorg.freedesktop.org/archive/individual/proto/xcb-proto-${version}.tar.xz")
depends=( )
makedepends=(python libxml2)
md5sums=('92081b0faafd93f8262463c69829a482')
uses=()
arch=('x86_64')
group=(x11.base)

cd $name-$version

setup(){
    ./configure --prefix=/usr \
        --libdir=/usr/lib64 \
        --with-python_prefix=/usr/lib64/python3 \
        --with-python_exec_prefix=/usr/lib64/python3
}

build(){
    make $jobs
}

package(){
    make install $jobs
    # Move files
    mv ${DESTDIR}/usr/lib64/python3/lib/python*/site-packages/xcbgen ${DESTDIR}/usr/lib64/python3/xcbgen
    rm -rf ${DESTDIR}/usr/lib64/python3/lib
}
