summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7b05e02be67bc646d71a19dc4d6b6ed069c0cf21 (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
# Contributor: sumito3478 <sumito3478@gmail.com>
pkgname=emacs-scala-mode-git
pkgver=20150424
pkgrel=1
pkgdesc="Scala-mode for emacs, from the official Scala Github repository"
arch=('any')
url="https://github.com/scala/scala-tool-support/tree/master/tool-support/emacs"
license=('BSD')
depends=('emacs')
makedepends=('git')
provides=('emacs-scala-mode')
conflicts=('emacs-scala-mode')
install=install.sh

_gitroot="https://github.com/scala/scala-tool-support.git"
_gitname=scala-dist

build() {
  cd "$srcdir"
  msg "Connecting to GIT server...."

  if [[ -d "$_gitname" ]]; then
    cd "$_gitname" && git pull origin
    msg "The local files are updated."
  else
    git clone "$_gitroot" "$_gitname"
  fi

  msg "GIT checkout done or server timeout"

  cd "$srcdir/$_gitname"
  cd "tool-support/emacs"
  make || return 1
}

package() {
  cd "$srcdir/$_gitname"
  cd "tool-support/emacs"

  install -d -m755 ${pkgdir}/usr/share/emacs/scala-mode/ || return 1
  install -D -m644 *.elc ${pkgdir}/usr/share/emacs/scala-mode/ || return 1
}

# vim:set ts=2 sw=2 et: