pyside_aur / python-pyside-tools / PKGBUILD

# Maintainer: arlx_ignacy <ziphims@gmail.com>
# Contributor: Matthias Maennich <arch@maennich.net>

# modify these two to whatever Python 3 interpreter you're targetting; on my
# system I use the vanilla python3
_pyver=3
_pyexec=/usr/bin/python$_pyver

pkgname=python-pyside-tools
pkgver=0.2.13
pkgrel=1
pkgdesc='PySide development tools (pyuic and pyrcc) for Python 3.'
arch=('i686' 'x86_64')
license=('LGPL')
url="http://www.pyside.org"
depends=('python-pyside>=1.1.0' 'python')
makedepends=('cmake' 'automoc4' 'python-shibokengenerator>=1.1.0' 'patch' 'sed')
replaces=('pyside-tools-py3')
source=("http://www.pyside.org/files/pyside-tools-$pkgver.tar.bz2"
        '2to3.patch'
        'py3.patch')
md5sums=('14d3a36df06d680357d7bc1960f19a6d'
         '88ca14b1e58ca167564afd215930a84b'
         '9f78b19484675d24008abdc9f03a6085')


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

    msg "Applying patches ..."
    # this patch from running 2to3-3.2
    patch -p1 < ../../2to3.patch
    # this patch to make it runable on Python 3
    patch -p1 < ../../py3.patch

    # of course, if you want to undo the patches you can use:
    #  $ patch -p1 -R < ../../py3.patch
    #  $ patch -p1 -R < ../../2to3.patch

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

    mkdir build
    cd build

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

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


package() {
    cd "$srcdir/build"
    make DESTDIR=$pkgdir install
}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.