summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d2cb5f9467212a77f934ed82802ceee744571464 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Maintainer: Samarth Ramesh <samarthr1@outlook.com>

pkgname="wingpro8"

# cannot call it wingide8 as some parts hardcode it as wingide
_pkg_pname=wingide

pkgver=8.3.0.0
pkgrel=1

pkgdesc="Wing IDE Professional is the full-featured Python IDE for professional programmers."
url="http://www.wingware.com"

license=('custom')
arch=('x86_64')

source=("https://wingware.com/pub/wingpro/$pkgver/wingpro-$pkgver-linux-x64.tar.bz2" )
sha1sums=("b84739fb603f0195e58bd28d251d3c0e01f51673")

depends=('xdg-utils' 'python' 'qt5-svg' 'libxcb' 'perl' 'java-runtime')
provides=(${_pkg_pname})
conflicts=(${_pkg_pname})

install=${_pkg_pname}.install

options=("!strip")

package() {
    cd "$srcdir/wingpro-$pkgver-linux-x64"
    ./wing-install.py \
    --install-binary \
    --winghome "${pkgdir}/opt/${_pkg_pname}" \
    --bin-dir ${pkgdir}/usr/bin > /dev/null 2>&1

    sed -i "s|${pkgdir}||" ${pkgdir}/opt/${_pkg_pname}/wingdbstub.py
    sed -i "s|${pkgdir}||" ${pkgdir}/opt/${_pkg_pname}/wing
    sed -i 's|ARCH=`arch`|ARCH=`uname -m`|' ${pkgdir}/opt/${_pkg_pname}/bootstrap/run-wing.sh
    # Fix a bug in the script
    
    sed -i "s|'`echo $arch`'\]|'`echo $arch`' \]|" ${pkgdir}/opt/${_pkg_pname}/bootstrap/run-wing.sh

    # Copy over patch (if any)
    if [ -d ../patches ]; then
        cp -r ../patches ${pkgdir}/opt/${_pkg_pname}/.
    fi

    # remove refrence to ${pkgdir}
    sed -i "s,${pkgdir},,g" "${pkgdir}/opt/wingide/file-list.txt"

    # Correct the file permissions
    chown -R root:root "${pkgdir}/opt/${_pkg_pname}"
    chmod +x ${pkgdir}/opt/${_pkg_pname}/resources/linux/desktop/install-linux-desktop.sh
    # Install the LICENSE
    install -D -m 644 "${pkgdir}/opt/${_pkg_pname}/LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgpname}/LICENSE"
}