blob: f353194caf3c775836f9bb345c5e86c1aeced610 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
# $Id: PKGBUILD 105737 2014-02-14 17:58:11Z arodseth $
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# 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>
pkgname=dart
pkgver=1.1.3
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=("$pkgname-$pkgver-64.zip::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=('5019225dd58ffba9ae726f100993345e2801f7b59f6b49edbb5020ec3621e67a'
'de16a5ac94310b1bdfc27a2a6d620531172bb31af894caeced37af41fb8e2650')
else
source=("$pkgname-$pkgver-32.zip::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=('de33b20167727d50903c1cf33d86320472d728f93641ec37a541a233e377acc4'
'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:
|