# Maintainer: Natanael Copa pkgname=glib pkgver=2.44.1 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 python gettext-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 } # 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="83efba4722a9674b97437d1d99af79db glib-2.44.1.tar.xz" sha256sums="8811deacaf8a503d0a9b701777ea079ca6a4277be10e3d730d2112735d5eca07 glib-2.44.1.tar.xz" sha512sums="c24d307408e061b2657f7e7d1b8245c55605ebda26ee2dcc3497ee9d90bfc137d8e5f42f0cd5acf4b49ea28c424fa901e81f75ecf81833f6d0fe51d5e36e5888 glib-2.44.1.tar.xz"