blob: ac4421a7479507a04f81b1765fc10c3788d30389 (
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
# Maintainer : Kr1ss $(echo \<kr1ss+x-yandex+com\>|sed s/\+/./g\;s/\-/@/)
# Contributor : Phil Schaf <flying-sheep(at)web.de>
#####################################################################################################
## NOTE: Removing python2 as mandatory makedep; if you want to have a precomiled Python 2 debugger ##
## packaged, make sure that `python2-setuptools` is installed _before_ building this package. ##
#####################################################################################################
pkgname=pycharm-community-eap
pkgver=222.3345.40
_pkgver=2022.2
_eap=y
pkgrel=1
epoch=14
pkgdesc='Powerful Python and Django IDE, Early Access Program (EAP) build, Community Edition'
arch=('i686' 'x86_64')
url=http://www.jetbrains.com/pycharm
license=('Apache')
provides=('pycharm-community-edition')
conflicts=('pycharm-community-edition')
makedepends=('cython' 'python-setuptools') # 'python2-setuptools'
depends=('python' 'glib2' 'dbus' 'libdbusmenu-glib')
optdepends=('python2: Support for Python 2 language'
'ipython: Alternative Python shell')
options=('!strip')
_filever="$([ $_eap = y ] && echo -n $pkgver || echo -n $_pkgver)"
source=("https://download.jetbrains.com/python/pycharm-community-$_filever.tar.gz")
sha256sums=('a12f4f4818dc8ed7a05082f1b5f07d2728e4e51c5976e55c04bd387dbb378175')
prepare() {
if [ -d "pycharm-community-$_pkgver" ]; then
mv pycharm-community-{"$_pkgver","$pkgver"}
fi
cd "pycharm-community-$pkgver/bin"
local _vmoptfile
for _vmoptfile in pycharm{,64}.vmoptfile; do
echo $'-Dawt.useSystemAAFontSettings=on\n-Dswing.aatext=true' >>"$_vmoptfile"
done
if [ "$CARCH" = i686 ]; then
rm fsnotifier64 libdbm64.so
fi
}
build() {
cd "pycharm-community-$pkgver/plugins/python-ce/helpers/pydev"
# compile PyDev debugger used by PyCharm to speedup debugging
find . \( -name *.c -o -name *.so -o -name *.pyd \) -delete
sed -i '1s/^/# cython: language_level=3\n/' _pydevd_bundle/pydevd_cython.pxd
# use absolute paths to the python executables so that users with an activated virtual env
# (like e.g. anaconda) can build without issues
/usr/bin/python setup_cython.py build_ext --inplace --force-cython
if [ -z "$(pacman -T python2-setuptools)" ]; then
# only compile the py2-debugger if `python2-setuptools’ is already installed
/usr/bin/python2 setup_cython.py build_ext --inplace
fi
rm -rf build/
find . -name __pycache__ -exec rm -rf {} \;
}
package() {
install -dm755 "$pkgdir"/{opt,usr/{bin,share/pixmaps}}
cp -R "pycharm-community-$pkgver" "$pkgdir/opt/$pkgname"
local _vmoptfile=pycharm64
if [[ "$CARCH" = i686 ]]; then
rm -f "$pkgdir/opt/$pkgname/bin/libyjpagent-linux64.so"
rm -f "$pkgdir/opt/$pkgname/bin/fsnotifier64"
_vmoptfile=pycharm
fi
echo $'-Dawt.useSystemAAFontSettings=on\n-Dswing.aatext=true' >>"$pkgdir/opt/$pkgname/bin/$_vmoptfile.vmoptions"
install -Dm755 /dev/stdin "$pkgdir/usr/share/applications/$pkgname.desktop" <<-EOF
[Desktop Entry]
Version=1.0
Type=Application
Name=PyCharm Community EAP
Exec=/opt/$pkgname/bin/pycharm.sh %f
Icon=pycharm
Comment=$pkgdesc
Categories=Development;IDE;
Terminal=false
StartupNotify=true
StartupWMClass=jetbrains-pycharm-ce
EOF
ln -sfv "/opt/$pkgname/bin/pycharm.png" "$pkgdir/usr/share/pixmaps/pycharm.png"
install -Dm755 /dev/stdin "$pkgdir/usr/bin/pycharm-ce" <<-EOF
#!/bin/sh
exec "/opt/$pkgname/bin/pycharm.sh"
EOF
}
# vim: ts=4 sw=4 noet ft=PKGBUILD:
|