summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7f76a38fb9df67ae5d7be52fdf8a5842a7314caa (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
# Maintainer:  Caleb Maclennan <caleb@alerque.com>
# Contributor: Albert Kugel (Lastebil) <lastebilaur@trebel.org>
# Contributor: speps <speps@aur.archlinux.org>
# Contributor: Eric Forgeot <http://ifiction.free.fr>
# Contributor: favardin

pkgname=wxlua
pkgver=3.0.0.8
pkgrel=1
pkgdesc="Lua bindings fore the wxWidgets library (Lua 5.3 compatible fork)"
arch=('i686' 'x86_64')
url="https://github.com/pkulchenko/${pkgname}"
license=('custom:wxWindows')
depends=('desktop-file-utils' 'wxgtk2' 'lua')
optdepends=('webkit2gtk')
makedepends=('cmake')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/pkulchenko/${pkgname}/archive/v${pkgver}.tar.gz")
sha256sums=('85d5182eec6e7cbb8428b9c144ef7fbe364f4fed6411aafcead648893e5b6fa0')

build() {
    cd "${pkgname}-${pkgver}/wxLua/build"
    cmake .. -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_BUILD_TYPE=Release \
        -DwxWidgets_COMPONENTS="stc;gl;html;aui;adv;core;net;base" \
        -DwxLuaBind_COMPONENTS="stc;gl;html;aui;adv;core;net;base" \
        -DBUILD_SHARED_LIBS=TRUE
    make
}

package() {
    cd "${pkgname}-${pkgver}/wxLua/build"
    make DESTDIR="$pkgdir/" install
    rm "$pkgdir"/usr/bin/lua{,c}

    install -d "$pkgdir/usr/lib/lua/5.3"
    mv "$pkgdir/usr/lib/libwx.so" "$pkgdir/usr/lib/lua/5.3/wx.so"

    pushd ..

    install -Dm644 distrib/autopackage/"$pkgname".desktop \
        "$pkgdir/usr/share/applications/$pkgname.desktop"

    install -Dm644 distrib/autopackage/"$pkgname".xml \
        "$pkgdir/usr/share/mime/packages/$pkgname.xml"

    install -Dm 644 docs/licence.txt \
        "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}