summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d81d06d00eb3d604a016ab8513c8cc237f8a12c2 (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: Rodrigo Bezerra <rodrigobezerra21 at gmail dot com>

pkgname=(
    lib32-gupnp
)
pkgver=1.6.6
pkgrel=1
pkgdesc="GObject-based UPNP framework (32-bit)"
arch=(x86_64)
url="https://wiki.gnome.org/Projects/GUPnP"
license=(LGPL)
depends=(
    lib32-gssdp
    gupnp
)
makedepends=(
    git
    gobject-introspection
    meson
    vala
)
_commit=78db66f6af9879b93db8eb6452acb24a1aaac71c  # tags/gupnp-1.6.6^0
source=("git+https://gitlab.gnome.org/GNOME/gupnp.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
    cd gupnp

    git describe --tags | sed 's/^gupnp-//;s/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
    cd gupnp
}

build() {
    local meson_options=(
        --libdir='/usr/lib32' \
        -Dgtk_doc=false \
        -Dintrospection=false \
        -Dexamples=false
    )

    export CC='gcc -m32'
    export CXX='g++ -m32'
    export PKG_CONFIG='/usr/bin/i686-pc-linux-gnu-pkg-config'

    arch-meson gupnp build "${meson_options[@]}"


    meson compile -C build
}

check() {
    meson test -C build --print-errorlogs
}

package() {
    meson install -C build --destdir "$pkgdir"

    rm -rf "${pkgdir}"/usr/{bin,include,share}
}