# Maintainer: Eli Schwartz <eschwartz@archlinux.org>

pkgname=timezonemap
pkgver=0.4.5.1
pkgrel=1
pkgdesc="Gtk3 timezone map widget, forked from gnome which forked from Ubiquity"
arch=('x86_64')
url="https://github.com/dashea/${pkgname}"
license=('GPL3')
depends=('gtk3' 'libsoup')
makedepends=('gobject-introspection')
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz")
sha256sums=('4e46ef325c488bed73fd758275866f467f2e2d0c375fb3fbd7b149a7869b74be')
b2sums=('bd9a10fae6db91e3c7ee5a3d573757867c0506db1d010cf78345b36d615fedca4fdf75fedd7aadaf13e46819c0afbadbef8fcd83855d775058d1113c59fc1035')

prepare() {
    cd "${srcdir}"/${pkgname}-${pkgver}

    autoreconf -fi
}

build() {
    cd "${srcdir}"/${pkgname}-${pkgver}

    ./configure --prefix=/usr
    # https://bugzilla.gnome.org/show_bug.cgi?id=656231
    sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool

    make
}

package() {
    cd "${srcdir}"/${pkgname}-${pkgver}

    make DESTDIR="${pkgdir}" install
}
