# $Id: PKGBUILD 110850 2014-05-08 14:27:48Z arodseth $ # Maintainer: Alexander Rødseth # Contributor: T. Jameson Little # Contributor: Usagi Ito # Contributor: siasia # Contributor: Julien Nicoulaud pkgname=dart pkgver=1.3.6 pkgrel=1 pkgdesc='The dart programming language SDK' arch=('x86_64' 'i686') url='http://www.dartlang.org/' license=('BSD') optdepends=('java-runtime: for dartanalyzer') makedepends=('setconf') options=('!strip') if [[ $CARCH == x86_64 ]]; then source=("$pkgname-$pkgver-64.zip::http://storage.googleapis.com/dart-archive/channels/stable/release/latest/sdk/dartsdk-linux-x64-release.zip") sha256sums=('799c04cc1d797c46580c4ad58b762b5a6234419b9eb05bdcb9b8cac9221ef669') else source=("$pkgname-$pkgver-32.zip::http://storage.googleapis.com/dart-archive/channels/stable/release/latest/sdk/dartsdk-linux-ia32-release.zip") sha256sums=('f9aa8f4d3164eca5ddd22012ed2d38ed523aeef9775d0b2229a77d611bdce97f') fi prepare() { # Fix permissions find "$pkgname-sdk" -type d -exec chmod 0755 '{}' + \ -or -type f -exec chmod 0644 '{}' + chmod +x "$pkgname-sdk/bin/"* # Fix paths cd "$pkgname-sdk/bin" setconf dart2js BIN_DIR "/opt/$pkgname-sdk/bin" setconf dart2js PROG_NAME "/opt/$pkgname-sdk/bin/dart2js" setconf dartanalyzer SCRIPT_DIR "/opt/$pkgname-sdk/bin" setconf docgen BIN_DIR "/opt/$pkgname-sdk/bin" setconf pub BIN_DIR "/opt/$pkgname-sdk/bin" setconf pub SDK_DIR "/opt/$pkgname-sdk/" setconf dartfmt BIN_DIR "/opt/$pkgname-sdk/bin" setconf dartfmt SDK_DIR "/opt/$pkgname-sdk/" # Fix missing "fi" and missing newline echo -e "fi\n" >> pub # Extract license (AUTHORS and LICENSE files are missing head -n5 "../include/dart_api.h" > ../../LICENSE } package() { # Create directories install -d "$pkgdir"{"/opt/$pkgname-sdk",/usr/{bin,"share/doc/$pkgname-sdk"}} # Package the files cp -a "$pkgname-sdk/"* "$pkgdir/opt/$pkgname-sdk/" # Set up symbolic links for the executables for f in dart dart2js dartanalyzer docgen pub dartfmt; do ln -s "/opt/$pkgname-sdk/bin/$f" "$pkgdir/usr/bin/$f" done # Package samples and documentation for f in samples about.html about_files; do echo mv "$pkgdir/opt/$pkgname-sdk/$f" "$pkgdir/usr/share/doc/$pkgname/" done # BSD License install -Dm644 LICENSE \ "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } # vim:set ts=2 sw=2 et: