# Maintainer: Alexey Pavlov <alexpux@gmail.com>

pkgname=icon-naming-utils
pkgver=0.8.90
pkgrel=1
pkgdesc="Maps the new names of icons for Tango to the legacy names used by the GNOME and KDE desktops"
arch=('i686' 'x86_64')
license=('GPL')
url="http://tango.freedesktop.org/"
depends=('perl-XML-Simple')
source=(http://tango.freedesktop.org/releases/${pkgname}-${pkgver}.tar.gz
        remove-legacy-calc.patch)
sha256sums=('044ab2199ed8c6a55ce36fd4fcd8b8021a5e21f5bab028c0a7cdcf52a5902e1c'
            '35afd197c9259fe6142c38e34aa5d033b4285188c81218dc918dc0c81a115792')

prepare() {
  cd ${srcdir}/${pkgname}-${pkgver}
  patch -Np1 -i "${srcdir}/remove-legacy-calc.patch"
}

build() {
  cd ${srcdir}/${pkgname}-${pkgver}
  ./configure \
    --prefix=/usr \
    --build=${CHOST} \
    --host=${CHOST} \
    --sysconfdir=/usr/etc \
    --libexecdir=/usr/lib/icon-naming-utils \
    --localstatedir=/var
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
}
