# $Id: PKGBUILD 239777 2015-05-26 09:42:04Z arojas $
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Antonio Rojas

pkgname=kinfocenter
pkgver=5.3.1
pkgrel=1
pkgdesc='A utility that provides information about a computer system'
arch=('i686' 'x86_64')
url='https://www.kde.org/applications/system/kinfocenter/'
license=('LGPL')
depends=('kdelibs4support' 'kcmutils' 'pciutils' 'glu' 'libraw1394' 'kwayland')
makedepends=('extra-cmake-modules' 'kdoctools' 'python' 'plasma-framework')
conflicts=('kdebase-workspace')
groups=('plasma')
source=("http://download.kde.org/stable/plasma/${pkgver}/$pkgname-$pkgver.tar.xz" 
'archlinux-logo.svg::https://sources.archlinux.org/other/artwork/archlinux-logo-dark-scalable.svg' 'kcm-about-distrorc')
md5sums=('571e4fb927ed7038c970eabce41426d3'
         '518881f04ca9d4bd8526008767e40ba7'
         '4b4e2496ea1de3a09de501b5d508f666')

prepare() {
  mkdir build
}

build() {
  cd build
  cmake ../${pkgname}-${pkgver} \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DLIB_INSTALL_DIR=lib \
    -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
    -DBUILD_TESTING=OFF
  make
}

package() {
  cd build
  make DESTDIR="${pkgdir}" install

# Install Arch logo
  install -Dm644 "$srcdir"/archlinux-logo.svg "$pkgdir"/usr/share/about-distro/archlinux-logo.svg
  install -Dm644 "$srcdir"/kcm-about-distrorc "$pkgdir"/etc/xdg/kcm-about-distrorc
}
