mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
74 lines
2.9 KiB
Bash
74 lines
2.9 KiB
Bash
# $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
|
|
|
|
buildarch=4
|
|
|
|
pkgname=dart
|
|
pkgver=1.20.1
|
|
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=('6fe55aca7cb791c81a91598169201f8fac21b796a64d9f65d61d0d77e883a0864784e86fc36695f932c9e23bfb94e491fc879cbdc3930672173efa5144f3004d')
|
|
sha512sums_i686=('8b6f3bb94a64b267af21ece72d977843173996ecc352f89ffeb27324e2e6f9bc8c924fa69b9858f120741119dc05a824de998be9a58e4996fbc47fa592ca7dda')
|
|
sha512ums_armv7h=('691afec7ffe6d3368f25a6d68cb3eadf88d815935675fbd175f6f31d46cc2d6ca72c824e6fdf11312be6111d2e17f4b882ca1e079d2d0a471b2d72de389ed818')
|
|
|
|
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:
|