summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: cf7a27cb422fe6ef8b405330d1e4204c53a26128 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
pkgname=thonny-git
pkgver=r1529.2c7e555
pkgrel=1
pkgdesc="Python IDE for beginners."
arch=('any')
url="http://thonny.org/"
license=('MIT')
conflicts=("thonny")
provides=("thonny")
depends=('openssl' 'python' 'python-beautifulsoup4' 'python-jedi' 'tcl' 'tk')
source=("git+https://bitbucket.org/plas/thonny.git")
sha256sums=('SKIP')

pkgver() {
    cd "$srcdir/thonny"
    echo "r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
}

package() {
    cd "$srcdir"

    install -Dm 755 "thonny/packaging/linux/thonny" "$pkgdir/usr/bin/thonny"

    sed -i 's|$target_dir|/usr|' "thonny/packaging/linux/Thonny.desktop"
    install -Dm 644 "thonny/packaging/linux/Thonny.desktop" \
            "$pkgdir/usr/share/applications/thonny.desktop"

    install -Dm 644 "thonny/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

    # Install.py currently does not allow for setting root for creating a package
    # Files must by copied manually for now in section below.
    install -d  644 "$pkgdir/usr/lib/python3.6/site-packages/thonny"
    cp -dr --no-preserve=ownership "thonny/thonny" \
            "$pkgdir/usr/lib/python3.6/site-packages"

    pip3 install --install-option="--prefix=$pkgdir/usr" --force distro tkinterhtml
}