summaryrefslogtreecommitdiff
blob: bdf7deacf360cf0ddeb70d4fe7774540998fd102 (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
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=4

DESCRIPTION="Meteor is an open-source platform for building top-quality web apps in a fraction of the time, whether you're an expert developer or just getting started."
HOMEPAGE="http://meteor.com/"
SRC_URI="https://github.com/meteor/meteor/tarball/v${PV} -> $P.tar.gz"
LICENSE="https://raw.github.com/meteor/meteor/master/LICENSE.txt"

SLOT="0"
KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd"

src_unpack() {
	unpack ${A}
	mv meteor* ${P}
}

src_prepare() {
	cd ${P}

	touch .git
	./meteor --version || die
	git rev-parse HEAD > .git_version.txt
	rm .git
	mv dev_bundle/* .
	mv dev_bundle/.bundle_version.txt .
	rm -rf dev_bundle

	rm -rf admin
	rm -rf packages/*/.meteor/local
	rm -rf examples/*/.meteor/local
	rm -rf examples/unfinished

	sed -e 's/DEV_BUNDLE=$(dirname "$SCRIPT_DIR")/DEV_BUNDLE=$SCRIPT_DIR/g' -i meteor
}

src_install() {
	mkdir -p ${D}/usr/local/meteor
	cp -ar ${WORKDIR}/${P}/* ${D}/usr/local/meteor
	cp ${WORKDIR}/${P}/.bundle_version.txt ${D}/usr/local/meteor

	mkdir -p ${D}/usr/local/bin
	ln -s /usr/local/meteor/meteor ${D}/usr/local/bin/meteor
}