# Maintainer: Julien Nicoulaud # Source: https://github.com/nicoulaj/archlinux-packages pkgname=dart-editor _pgname=DartEditor pkgver=0.1.0.1357 _build=1357 pkgrel=1 pkgdesc="Editor for the Dart programming language." arch=('i686' 'x86_64') url="http://www.dartlang.org/docs/getting-started/editor/index-linux.html" license=('EPL') depends=('java-runtime' 'gtk2') if [[ ${CARCH} = x86_64 ]]; then _arch=x86_64 && md5sums=('53d7e95ad53b7926247ce366e8aaa7ff') else _arch=x86 && md5sums=('86d497838c0dfdb0253546ae1d1b2016') fi source=("http://gsdview.appspot.com/dart-editor-archive-integration/${_build}/DartBuild-linux.gtk.${_arch}.zip") build() { msg2 "Generate desktop application entry..." cat > "${srcdir}"/${pkgname}.desktop << EOF [Desktop Entry] Version=${pkgver} Encoding=UTF-8 Name=Dart editor Comment=${pkgdesc} Exec=/usr/bin/${pkgname} Icon=/opt/${pkgname}/icon.xpm Terminal=false Type=Application Categories=Development; EOF } package() { msg2 "Install the assembly at /opt/${pkgname}..." install -dm755 "${pkgdir}"/opt/${pkgname} cp -a "${srcdir}"/dart/* "${pkgdir}"/opt/${pkgname} msg2 "Install links to the executables in /usr/bin..." install -dm755 "${pkgdir}"/usr/bin ln -s /opt/${pkgname}/${_pgname} "${pkgdir}"/usr/bin/${pkgname} msg2 "Install link to the config file in /etc..." install -dm755 "${pkgdir}"/etc ln -s /opt/${pkgname}/${_pgname}.ini "${pkgdir}"/etc/${pkgname}.ini msg2 "Install desktop application entry in /usr/share/applications..." install -Dm644 "${srcdir}"/${pkgname}.desktop "${pkgdir}"/usr/share/applications/${pkgname}.desktop }