# $Id: PKGBUILD 100999 2013-11-14 15:05:53Z arodseth $ # Maintainer: Alexander Rødseth # Contributor: T. Jameson Little # Contributor: Usagi Ito # Contributor: siasia # Contributor: Julien Nicoulaud pkgname=dart pkgver=1.0 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=("http://storage.googleapis.com/dart-archive/channels/stable/release/latest/sdk/dartsdk-linux-x64-release.zip" "license.html::https://code.google.com/intl/no/google_bsd_license.html") sha256sums=('9bc14660399c3570fddd262eb9aa11b3e6e19b7a3c547d3b10d60ad905c52c9b' 'de16a5ac94310b1bdfc27a2a6d620531172bb31af894caeced37af41fb8e2650') else source=("http://storage.googleapis.com/dart-archive/channels/stable/release/latest/sdk/dartsdk-linux-ia32-release.zip" "license.html::https://code.google.com/intl/no/google_bsd_license.html") sha256sums=('131afed9a220b2035375aee71e6b791248e6de51ee2612a21be3f6797e5bbfe6' 'de16a5ac94310b1bdfc27a2a6d620531172bb31af894caeced37af41fb8e2650') 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 dartdoc BIN_DIR "/opt/$pkgname-sdk/bin" setconf pub BIN_DIR "/opt/$pkgname-sdk/bin" setconf pub SDK_DIR "/opt/$pkgname-sdk/" # Fix missing "fi" and missing newline echo -e "fi\n" >> pub } 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 dartdoc pub; 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.html \ "$pkgdir/usr/share/licenses/$pkgname/license.html" } # vim:set ts=2 sw=2 et: