aboutsummaryrefslogtreecommitdiffstats
path: root/community/libplist/APKBUILD
blob: b335919d24c9710303c7c579589e8a8311f9183e (plain) (blame)
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
# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libplist
pkgver=2.0.0
pkgrel=4
pkgdesc="A library to handle Apple Property List format whereas it's binary or XML"
url="https://libimobiledevice.org/"
arch="all"
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
makedepends="py3-setuptools swig python3-dev glib-dev cython
	autoconf automake libtool"
subpackages="$pkgname-static $pkgname-dev py3-$pkgname:_py3 $pkgname-util $pkgname++:cxx"
source="https://www.libimobiledevice.org/downloads/libplist-$pkgver.tar.bz2
	Updated-ac_python_devel.m4-to-newer-ax_python_devel.m4.patch"

prepare() {
	default_prepare
	autoreconf -vif
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--mandir=/usr/share/man
	make
}

check() {
	# https://github.com/libimobiledevice/libplist/issues/118
	case "$CARCH" in
		arm*) return 0;;
	esac

	make check -j1 # https://github.com/libimobiledevice/libimobiledevice/issues/777
}

package() {
	make DESTDIR="$pkgdir" install
}

util() {
	pkgdesc="Util for libplist"
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}

_py3() {
	pkgdesc="Python bindings for libplist"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/
}

cxx() {
	pkgdesc="C++ bindings to libplist"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/*++.so.* "$subpkgdir"/usr/lib/
}

sha512sums="81508bf6773483528816725c3b5b868563b84fd7810999404072e5ea9efa7fc9f11ef997f32208e4421aa26b15edd0c65f87c67c1472e8c4e356f1e9fe7740ee  libplist-2.0.0.tar.bz2
92e0d125f8f4e605ab7fcaa37cc62104f027d706aa42d923f1efc877b5000092865a4e347fef2a276030faca9e0053551bbcc72de488f7e246dd1cc00d3523e1  Updated-ac_python_devel.m4-to-newer-ax_python_devel.m4.patch"