summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: bb213e868078a5565e932b70b960486ca892d809 (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
# 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
_pkgname=wxGlade
pkgver=1.1.0
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'
    'hicolor-icon-theme'
)
optdepends=(
    'desktop-file-utils: pacman hooks for updating desktop database'
    'shared-mime-info: pacman hooks for updating mime database'
)
makedepends=(
    'python-setuptools'
    'xdg-utils'
)
source=(
    "https://github.com/wxGlade/wxGlade/archive/v$pkgver.tar.gz"
)
sha256sums=('b71939d8be3ef1929a7533b7daa55f9396a28ea93a07b01d3cdb403d399d943b')

build() {
    cd "$_pkgname-$pkgver"
    command -p python setup.py build
}

package() {
    cd "$_pkgname-$pkgver"

    command -p python setup.py install --root="$pkgdir" --optimize=1 --skip-build

    datadir="$pkgdir/usr/share/"

    export XDG_DATA_DIRS=":$datadir"
    export XDG_UTILS_INSTALL_MODE=system
    export XDG_UTILS_DEBUG_LEVEL=1

    install -Dm644 "wxglade-mime.xml" "$datadir/mime/packages/$_pkgname.xml"
    install -dm755 $datadir/{icons/hicolor/,}

    xdg-icon-resource install --noupdate --novendor --size 128 icons/wxglade.png "$_pkgname"
    xdg-icon-resource install --noupdate --size 128 --context mimetypes icons/wxglade.png application-x-wxg

    xdg-icon-resource install --noupdate --novendor --size 32 icons/wxglade.png "$_pkgname"
    xdg-icon-resource install --noupdate --size 32 --context mimetypes icons/wxglade.png application-x-wxg

    install -Dm644 "$_pkgname.desktop" "$datadir/applications/$_pkgname.desktop"
    sed -i "s:wxglade.xpm:$_pkgname.png:" "$datadir/applications/$_pkgname.desktop"
}