# $Id: PKGBUILD 98052 2013-10-04 17:07:06Z bpiotrowski $
# Maintainer:  Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Contributor: Felipe Hommen <felibank at gmail dot com>
# Contributor: moostik <mooostik_at_gmail.com>

pkgname=geogebra
pkgver=4.2.60.0
pkgrel=1
pkgdesc='Dynamic mathematics software with interactive graphics, algebra and spreadsheet'
arch=('any')
url='http://www.geogebra.org/'
license=('GPL3' 'CCPL:by-sa')
depends=('java-runtime' 'shared-mime-info' 'hicolor-icon-theme' 'desktop-file-utils' 'xdg-utils')
install=geogebra.install
source=(http://$pkgname.googlecode.com/files/GeoGebra-Unixlike-Installer-$pkgver.tar.gz)
sha256sums=('1423a2dc1af40c67c5cd517f275cdaba97ed8dafac2bf14fc1caee34975503b9')

package() {
  install -dm755 "$pkgdir"/usr/bin \
                 "$pkgdir"/usr/share/applications \
                 "$pkgdir"/usr/share/geogebra

  cd $pkgname-$pkgver
  sed -i 's/\/usr/\$\{pkgdir\}\/usr/g' install.sh
  source install.sh
  install -Dm644 _license.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE

  rm -rf "$pkgdir"/usr/share/mime/
}
