Permalink
Browse files

Simplify arch specifics

  • Loading branch information...
1 parent 4c86abb commit 723bc6b2adb8f438c86562aa27a0e3f02a70b212 Tom Vincent committed Apr 12, 2012
Showing with 21 additions and 21 deletions.
  1. +21 −21 meteorjs/PKGBUILD
View
42 meteorjs/PKGBUILD
@@ -1,31 +1,31 @@
# Maintainer: Parth Buch <parthbuch115 at gmail dot com>
+# Contributor: Tom Vincent <http://tlvince.com/contact/>
+
pkgname=meteorjs
pkgver=0.3.2
pkgrel=1
pkgdesc="A new way to build apps."
arch=('i686' 'x86_64')
url="https://github.com/meteor/meteor"
license=('GPL')
-if test "$CARCH" == x86_64; then
- source=(http://d3sqy0vbqsdhku.cloudfront.net/meteor_$pkgver-1_amd64.deb)
- md5sums=('6f67f51e0213b28225188155cf9ae063')
- build() {
- ar x meteor_$pkgver-1_amd64.deb
- mkdir -p meteor
- tar xf data.tar.gz -C meteor
- cp -r meteor/* $pkgdir
- rm -rf control.tar.gz data.tar.gz debian-binary
- }
-fi
+_source="http://d3sqy0vbqsdhku.cloudfront.net/meteor_$pkgver-1"
-if test "$CARCH" == i686; then
- source=(http://d3sqy0vbqsdhku.cloudfront.net/meteor_$pkgver-1_i386.deb)
- md5sums=('07189ffbe9d5f1202c41bcc84fac9a6f')
- build() {
- ar x meteor_$pkgver-1_i386.deb
- mkdir -p meteor
- tar xf data.tar.gz -C meteor
- cp -r meteor/* $pkgdir
- rm -rf control.tar.gz data.tar.gz debian-binary
- }
+if [ "$CARCH" == x86_64 ]; then
+ _arch="amd64.deb"
+ md5sums=('6f67f51e0213b28225188155cf9ae063')
+else
+ _arch="i386.deb"
+ md5sums=('07189ffbe9d5f1202c41bcc84fac9a6f')
fi
+
+source=(${_source}_${_arch})
+
+build() {
+ ar x meteor_$pkgver-1_$_arch
+ mkdir -p meteor
+ tar xf data.tar.gz -C meteor
+ cp -r meteor/* $pkgdir
+ rm -rf control.tar.gz data.tar.gz debian-binary
+}
+
+# vim:set ts=2 sw=2 et:

0 comments on commit 723bc6b

Please sign in to comment.