# $Id$ # Maintainer: Alexander Rødseth # Maintainer: Felix Yan # Contributor: T. Jameson Little # Contributor: Usagi Ito # Contributor: siasia # Contributor: Julien Nicoulaud # Contributor: Jacob Bang # Arch Linux ARM changes: # - added source and sha512 for ARMv7h build of Dart buildarch=4 pkgname=dart pkgver=1.24.0 pkgrel=1 pkgdesc='The dart programming language SDK' arch=('x86_64' 'i686' 'armv7h') url='http://www.dartlang.org/' license=('BSD') makedepends=('setconf') options=('!strip') source_x86_64+=("$pkgname-$pkgver-64.zip::http://storage.googleapis.com/dart-archive/channels/stable/release/latest/sdk/dartsdk-linux-x64-release.zip") source_i686+=("$pkgname-$pkgver-32.zip::http://storage.googleapis.com/dart-archive/channels/stable/release/latest/sdk/dartsdk-linux-ia32-release.zip") source_armv7h+=("$pkgname-$pkgver-arm.zip::http://storage.googleapis.com/dart-archive/channels/stable/release/latest/sdk/dartsdk-linux-arm-release.zip") sha512sums_x86_64=('2d9a6747ca726afadb32fcb6b5ff852d0eb1b7e024e5fb1e48ca694bd5eced2dad9574b7ec471f73a3042d4185e49e2964aaf1d4be8678ae6084ad7b90ccf03a') sha512sums_i686=('3eeb4d57a70b7eb85a7e40ecfe283bc19868b1483a8f219aea33a34a4a3a4db81e807eb83f2d6bf9bc0d3832084c40c5cb19ec3f2d00c4b8355e1168f5e22736') sha512ums_armv7h=('941cee9f5093cf5d365f1d121ea6e1a110ea8b7a28f41ee6d301b7f159ab643b4014fff11be709e37596faf8cd1a0abf329f8d3cdac705cef59a7c9e0b22fe86') prepare() { # Fix permissions find "$pkgname-sdk" -type d -exec chmod 0755 '{}' + \ -or -type f -exec chmod 0644 '{}' + chmod +x "$pkgname-sdk/bin/"* cd "$pkgname-sdk/bin" # Configure paths 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 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/" # 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 pub dartfmt dartdevc; 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: