summaryrefslogtreecommitdiff
path: root/community/meteorjs/PKGBUILD
blob: b64b79f012f49a8dbc8fc10f8904d42dd2b736ff (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
# $Id: PKGBUILD 84695 2013-02-22 11:25:02Z mtorromeo $
# Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
# Contributor: Parth Buch <parthbuch115 at gmail dot com>
# Contributor: Tom Vincent <http://tlvince.com/contact/>

pkgname=meteorjs
pkgver=0.5.7
pkgrel=1
pkgdesc="Open-source platform for building top-quality web apps in a fraction of the time."
arch=('i686' 'x86_64')
url="https://github.com/meteor/meteor"
license=('MIT')
depends=('nodejs' 'mongodb')
options=('!strip')

sha256sums=('dea74135489b89d7a7fdebb3966a05b2df41440bbdc31adce85e6b140aff8e23'
            'a3ac659c52b652676da0530f2148025e0f8bfa84bccf63431c20eb72d3bc5cb7')

if [ "$CARCH" = "x86_64" ]; then
    _arch="amd64"
else
    _arch="i386"
    sha256sums[0]='2a126beb5224e4063c8efc849e099d7bf302f062e76356f8f7662737bccd41b6'
fi

source=("http://d3sqy0vbqsdhku.cloudfront.net/meteor_$pkgver-1_$_arch.deb" meteor)

package() {
    tar xf data.tar.gz -C "$pkgdir" ./usr/lib/meteor

    install -Dm644 "$pkgdir/usr/lib/meteor/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt"
    install -Dm755 "$srcdir/meteor" "$pkgdir/usr/bin/meteor"

    cd "$pkgdir/usr/lib/meteor"
    rm -rf LICENSE.txt lib/node lib/dtrace lib/node_modules/npm share include \
           lib/node_modules/mongodb/node_modules/bson/build/Release/obj.target/bson.node \
           lib/node_modules/websocket/build/Release/obj.target/xor.node \
           lib/node_modules/websocket/build/Release/obj.target/validation.node

    # mongodb links
    rm -rf mongodb
    install -dm755 mongodb/bin
    ln -s /usr/bin/mongod mongodb/bin/mongod
    ln -s /usr/bin/mongo mongodb/bin/mongo

    # node links
    rm -rf bin
    install -dm755 bin
    ln -s /usr/bin/node bin/node
    ln -s /usr/bin/node-waf bin/node-waf
    ln -s /usr/bin/npm bin/npm
}