app=ttf-indic-fonts
version=0.5.14
build=1sml
homepage=http://archive.ubuntu.com/ubuntu/pool/main/t/ttf-indic-fonts/""
download="http://archive.ubuntu.com/ubuntu/pool/main/t/ttf-indic-fonts/ttf-indic-fonts_"$version"ubuntu1.tar.gz"
desc="TTF fonts for Indic scripts"
requires="fontconfig mkfontscale "

build() {
  mkandenterbuilddir
  rm -rf $app-$version

  tar xf $srcdir/$app-$version.tar.?z*
  cd $app-$version
  fixbuilddirpermissions

  mkdir -p $pkg/share/fonts/TTF
  cp -a */*.ttf $pkg/share/fonts/TTF/

  mkdir -p $pkg/etc/fonts/conf.avail
  find . -name "*.conf" -exec cp -a {} $pkg/etc/fonts/conf.avail \;

  mkdir -p $pkg/etc/fonts/conf.d
  ( cd $pkg/etc/fonts/conf.d
    for file in ../conf.avail/*.conf ; do
      ln -sf $file .
    done
  )

  find . -name "*.copyright" -exec cp -a {} $pkgdocs/ \;

  mkfinalpkg
}

sha512sums="
c30ac90f26d90a874e75a2ffb74d0126821ad192d9a1edf1b7c0944fe5423de87da0141dfbf738a41b9a7ce8fa8ea7a813ee1ae74c7f5a4d04a6f0769e17dea1  ttf-indic-fonts-0.5.14.tar.xz
"
