blob: e3c12e08728a613278a9433a931dc5c5dc3e57f4 (
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
|
# Maintainer: FirstAirBender <noblechuk5[at]web[dot]de>
# Contributor: Christoph Robbert <chrobbert@gmail.com>
# Contributor: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Brad Fanella <bradfanella@archlinux.us>
# Contributor: jrutila
# Contributor: grimi <grimi@poczta.fm>
# Contributor: jht <stefano@inventati.org>
pkgname=wxglade
pkgver=1.0.5
pkgrel=1
pkgdesc='wxGlade is a GUI builder written in Python for the GUI toolkit wxWidgets/wxPython'
arch=('any')
license=('MIT')
url='https://github.com/wxGlade/wxGlade'
depends=(
'python>=3.4'
'python-wxpython>=2.8'
'desktop-file-utils'
'hicolor-icon-theme'
'shared-mime-info'
)
makedepends=(
'icoutils'
'gendesk'
)
source=(
"https://github.com/wxGlade/wxGlade/archive/v$pkgver.tar.gz"
application-x-wxg.xml
)
sha256sums=('0ac846980072efabda06f63470b6185c18858adbf38763211edc293b9230499b'
'f651ff097678077eac865c64a655107c9a4aa4fd0bf65e233713a5ed916608c0')
prepare() {
gendesk -f -n --pkgname "$pkgname" \
--pkgdesc "$pkgdesc" \
--exec "$pkgname %f" \
--name 'WxGlade' \
--mimetypes 'application/x-wxg' \
--categories "Development;GUIDesigner"
rm -rf "$pkgname-$pkgver" && mv -Tf {wxGlade,$pkgname}-$pkgver
}
build() {
cd "$pkgname-$pkgver"
command -p python setup.py build
icotool --extract --output=$srcdir icons/wxglade*.ico
}
package() {
cd "$pkgname-$pkgver"
command -p python setup.py install --root="$pkgdir" --optimize=1 --skip-build
datadir="$pkgdir/usr/share/"
# TODO: Replace with default wxglade-mime.xml in v1.1.0+
install -Dm644 "$srcdir/application-x-wxg.xml" "$datadir/mime/packages/$pkgname.xml"
find "$srcdir" -maxdepth 1 -name "$pkgname*128*.png" \
-execdir install -Dm644 {} "$datadir/icons/hicolor/128x128/apps/$pkgname.png" \; \
-execdir install -Dm644 {} "$datadir/icons/hicolor/128x128/mimetypes/application-x-wxg.png" \;
find "$srcdir" -maxdepth 1 -name "$pkgname*32*.png" \
-execdir install -Dm644 {} "$datadir/icons/hicolor/32x32/apps/$pkgname.png" \; \
-execdir install -Dm644 {} "$datadir/icons/hicolor/32x32/mimetypes/application-x-wxg.png" \;
install -Dm644 "$srcdir/$pkgname.desktop" "$datadir/applications/$pkgname.desktop"
}
|