# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: William Rea <sillywilly@gmail.com>

pkgname=icon-naming-utils
pkgver=0.8.90
pkgrel=6
pkgdesc="Maps the new names of icons for Tango to the legacy names used by the GNOME and KDE desktops."
arch=(any)
license=('GPL')
url="http://tango.freedesktop.org/"
depends=('perl-xml-simple')
source=(https://sources.archlinux.org/other/$pkgname/$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 --sysconfdir=/etc \
              --libexecdir=/usr/lib/icon-naming-utils \
	      --localstatedir=/var
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"
  make DESTDIR="$pkgdir" install
  mv "$pkgdir/usr/share/pkgconfig" "$pkgdir/usr/lib/pkgconfig"
}
