summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 58c2a2fb3e8a48e68626ed47821b5b8140ff0ac8 (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
# Maintainer: Christian Howe <cjhowe7@gmail.com>

pkgname=elixirscript
pkgver=0.16.0
pkgrel=2
pkgdesc='Converts Elixir to Javascript'
arch=('any')
url='https://github.com/bryanjos/elixirscript'
license=('MIT')
depends=('erlang-nox')
makedepends=('elixir' 'npm')
source=("https://github.com/bryanjos/elixirscript/archive/v$pkgver.tar.gz")
md5sums=('55f0e1e962b5405f6651fb3cc3765095')

build() {
  cd "$pkgname-$pkgver"

  MIX_ENV=prod mix deps.get
  npm install

  MIX_ENV=prod mix compile
  MIX_ENV=prod mix dist
}

package() {
  cd "$pkgname-$pkgver"

  install -Dm755 'elixirscript' "$pkgdir/usr/lib/elixirscript/bin/elixirscript"
  install -Dm644 '_build/prod/lib/elixir_script/priv/Elixir.js' \
    "$pkgdir/usr/lib/elixirscript/Elixir.js"
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  mkdir -p "$pkgdir/usr/bin"

  cd "$pkgdir/usr/bin"
  ln -s "../lib/elixirscript/bin/elixirscript" elixirscript
}

# Local Variables:
# mode: sh
# End: