PKGBUILDs/community/dart/PKGBUILD

75 lines
2.9 KiB
Bash
Raw Normal View History

2016-10-13 23:46:43 +00:00
# $Id$
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: T. Jameson Little <t.jameson.little at gmail dot com>
# Contributor: Usagi Ito <usagi@WonderRabbitProject.net>
# Contributor: siasia <http://pastebin.com/qsBEmNCw>
# Contributor: Julien Nicoulaud <julien.nicoulaud@gmail.com>
# Contributor: Jacob Bang <julemand101gmail.com>
# Arch Linux ARM changes:
# - added source and sha512 for ARMv7h build of Dart
2016-10-21 12:26:34 +00:00
buildarch=4
2016-10-13 23:46:43 +00:00
pkgname=dart
2017-02-17 01:17:01 +00:00
pkgver=1.22.0
2016-10-13 23:46:43 +00:00
pkgrel=1
pkgdesc='The dart programming language SDK'
arch=('x86_64' 'i686' 'armv7h')
url='http://www.dartlang.org/'
license=('BSD')
makedepends=('setconf')
options=('!strip')
2016-10-21 12:26:34 +00:00
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")
2017-02-17 01:17:01 +00:00
sha512sums_x86_64=('f9dbf1695108e81f290819636fa1c31126e7f46ee66afaa59dbd3b543cb92a3c996a4ed6b9a4eaa3d27ef37cfa8990248a050f6e2b0543c68041d5d38dca8d52')
sha512sums_i686=('8bfba1c04729f5183f16509c890d0748c30cf68088e1785100e3aaa715c5df631024f2ae476063dce97895043869978cff8ee28e88c4902007e74d8f575b6ee9')
sha512ums_armv7h=('21aea023e9f0c5cff91b6ab3bf4cb78a1459c4b11bf87c0dc147c9eb0b48d7afbfc62948e83ef9a0a5b1458539bda1a53b38eb8f46f5f4870358b183fed25ead')
2016-10-13 23:46:43 +00:00
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: