PKGBUILDs/extra/dart/PKGBUILD
2024-03-21 23:30:56 +00:00

61 lines
2.5 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Maintainer: Orhun Parmaksız <orhun@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>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - added source and sha512 for ARMv7h, AArch64 builds of Dart
pkgname=dart
pkgver=3.3.2
pkgrel=1
pkgdesc='The dart programming language SDK'
arch=('x86_64' 'armv7h' 'aarch64')
url='https://www.dartlang.org/'
depends=('bash')
license=('BSD')
makedepends=('setconf')
options=('!strip')
source_x86_64+=("$pkgname-$pkgver-64.zip::https://storage.googleapis.com/dart-archive/channels/stable/release/$pkgver/sdk/dartsdk-linux-x64-release.zip")
source_armv7h+=("$pkgname-$pkgver-arm.zip::https://storage.googleapis.com/dart-archive/channels/stable/release/$pkgver/sdk/dartsdk-linux-arm-release.zip")
source_aarch64+=("$pkgname-$pkgver-arm64.zip::https://storage.googleapis.com/dart-archive/channels/stable/release/$pkgver/sdk/dartsdk-linux-arm64-release.zip")
sha512sums_x86_64=('35bac41f4155495415d8532b5713f28457627fb882cf1a144f0498265c3e345bb4aa6ac1796a30c6475cfc3c0895e990d3211ed850a9971dd19e6eacb31cd7dd')
sha512sums_armv7h=('d103420aab5c8b4e6a910f66e4de37498bbc68798fc2cfb658d0be8523b3dbd81719ef204718cc5e929e43dc58bbaaf7aeba131259b0f10815832e1d65911f00')
sha512sums_aarch64=('d65d4746c94919bffb7e1e79ad94e20339e63144750311b8a180b511ca7d1ffd7176c2d9e899dbf1a4304902c7446a3c730cfa937a75ac0ca92b36fa36906379')
prepare() {
# Fix permissions
find "$pkgname-sdk" -type d -exec chmod a+rx '{}' + \
-or -type f -exec chmod a+r '{}' +
cd "$pkgname-sdk/bin"
# 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"}}
# Package the files
cp -a "$pkgname-sdk/"* "$pkgdir/opt/$pkgname-sdk/"
# Set up symbolic links for the executables
for f in dart dartaotruntime; do
ln -s "/opt/$pkgname-sdk/bin/$f" "$pkgdir/usr/bin/$f"
done
# Package documentation
install -Dm644 "$pkgdir/opt/$pkgname-sdk/README" -t "$pkgdir/usr/share/doc/$pkgname"
# BSD License
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
# vim:set ts=2 sw=2 et: