aboutsummaryrefslogtreecommitdiffstats
path: root/main/glib/APKBUILD
blob: 665d4d22f1862dbdfe7ab1c75c7607a240899a77 (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
72
73
74
75
76
77
78
79
80
81
82
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=glib
pkgver=2.40.0
pkgrel=1
pkgdesc="Common C routines used by Gtk+ and other libs"
url="http://www.gtk.org"
arch="all"
license='GPL'
depends=
triggers="$pkgname.trigger=/usr/share/glib-2.0/schemas:/usr/lib/gio/modules"
depends_dev="perl gettext-dev libiconv-dev zlib-dev bzip2-dev libffi-dev"
makedepends="$depends_dev"
source="http://ftp.gnome.org/pub/gnome/sources/glib/${pkgver%.*}/glib-$pkgver.tar.xz"
subpackages="$pkgname-dbg $pkgname-doc $pkgname-dev $pkgname-lang"


_builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
	# workaround packaing issue. gtk-doc.make timestamp was newer than
	# Makefile.am, which triggers automake re-run
	touch -r docs/reference/glib/Makefile.am gtk-doc.make
}


build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--disable-gtk-doc \
		--disable-compile-warnings \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir/" install
	rm -rf "$pkgdir"/usr/lib/charset.alias
	rmdir -p "$pkgdir"/usr/lib 2>/dev/null
	rm "$pkgdir"/usr/lib/*.la
}

# move the stuff in /usr/bin to the glib-dev package
dev() {
	default_dev
	replaces="glib"
	mkdir -p "$subpkgdir"/usr/bin/ \
		"$subpkgdir"/usr/share/bash-completion/completions \
		|| return 1
	cd "$pkgdir"/usr/bin
	mv \
		gdbus-codegen \
		glib-compile-resources \
		glib-genmarshal \
		glib-gettextize \
		glib-mkenums \
		gobject-query \
		gresource \
		gtester \
		gtester-report \
		"$subpkgdir"/usr/bin/
	mv "$pkgdir"/usr/share/gdb \
		"$pkgdir"/usr/share/glib-2.0 \
		"$subpkgdir"/usr/share/ || return 1
	mv "$pkgdir"/usr/share/bash-completion/completions/gresource \
		"$subpkgdir"/usr/share/bash-completion/completions \
		|| return 1
}

md5sums="05fb7cb17eacbc718e90366a1eae60d9  glib-2.40.0.tar.xz"
sha256sums="0d27f195966ecb1995dcce0754129fd66ebe820c7cd29200d264b02af1aa28b5  glib-2.40.0.tar.xz"
sha512sums="346a32f2d1447d3398ac2400047f0556517b914788cf9c8c9f28de5f395ef3993231f9a58fc103e08013fa2e7136a097de46aabdf4c035a46f883ca3971408a4  glib-2.40.0.tar.xz"