# $Id: PKGBUILD 214964 2014-06-10 22:47:54Z andrea $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Antonio Rojas <nqn1976 @ gmail.com>

pkgname=ttf-oxygen
epoch=1
pkgver=0.3.97
_plasmaver=4.97.0
pkgrel=1
pkgdesc='A desktop/gui font family for integrated use with the KDE desktop'
arch=('any')
license=('custom:OFL' 'GPL' 'custom:GPL+FE')
url="https://projects.kde.org/projects/playground/artwork/oxygen-fonts"
depends=('fontconfig' 'xorg-fonts-encodings' 'xorg-font-utils')
makedepends=('extra-cmake-modules' 'qt5-base' 'fontforge')
provides=('ttf-font')
install=$pkgname.install
source=("http://download.kde.org/unstable/plasma/$_plasmaver/src/oxygen-fonts-$pkgver.tar.xz")
md5sums=('1ecdc2af7be15425f76fa9b3308b85b5')

prepare() {
  mkdir build
}

build() {
  cd build
  cmake ../oxygen-fonts-${pkgver} \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=Release \
    -DLIB_INSTALL_DIR=lib
  make
}

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

  install -d "${pkgdir}"/usr/share/licenses/${pkgname}
  install -m644 "${srcdir}"/oxygen-fonts-${pkgver}/COPYING-{GPL+FE.txt,OFL} \
    "${pkgdir}"/usr/share/licenses/${pkgname}
}
