Source

pyside_aur / python2-pyside-tools / PKGBUILD

Full commit
# Maintainer: arlx_ignacy <ziphims@gmail.com>
# Contributor: Matthias Maennich <arch@maennich.net>
# Contributor: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>


# modify this to whatever Python 2 interpreter you're targetting; on my
# system I use the vanilla python2
_pyexec=/usr/bin/python2

pkgname=python2-pyside-tools
pkgver=0.2.13
pkgrel=1
pkgdesc='PySide development tools (pyuic and pyrcc).'
arch=('i686' 'x86_64')
license=('LGPL')
url="http://www.pyside.org"
depends=('python2-pyside>=1.1.0' 'python2')
makedepends=('cmake' 'automoc4' 'python2-shiboken>=1.1.0' 'patch' 'sed')
replaces=('pyside-tools')
source=("http://www.pyside.org/files/pyside-tools-$pkgver.tar.bz2")
md5sums=('14d3a36df06d680357d7bc1960f19a6d')


build() {
    cd "$srcdir/pyside-tools-$pkgver"

    cd ..
    if [ -d build ] ; then
        msg "Removing last build ..."
        rm -rf build
    fi

    mkdir build
    cd build

    cmake ../pyside-tools-$pkgver -DCMAKE_INSTALL_PREFIX=/usr  \
                                  -DCMAKE_BUILD_TYPE=Release   \
                                  -DPYTHON_EXECUTABLE=$_pyexec
    make

    # change interpreter to what we set it to
    sed -i -e "1c #!$_pyexec" ../pyside-tools-$pkgver/pyside-uic
}


package() {
    cd "$srcdir/build"
    make DESTDIR=$pkgdir install
}