summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 083a896f977f48c8f8a1f637efb67ac4535efd88 (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# Maintainer: Albert Graef <aggraef at gmail.com>
# Contributor: Bernardo Barros <bernardobarros at gmail dot com>
# Contributor: bjoern lindig (bjoern _dot_ lindig _at_ google.com)

pkgname=faust-git
pkgver=4767.3a27663e0
pkgrel=1
pkgdesc="A functional programming language for realtime audio signal processing."
arch=('i686' 'x86_64')
url="http://faust.grame.fr/"
license=('GPL')
depends=(
# needed for sound2faust:
	 'libsndfile'
# needed for libHTTPDFaust:
	 'libmicrohttpd' 'openssl')
# We need xxd at build time, which is provided by 'gvim', 'vim' and 'xxd'
# (AUR).
makedepends=('git' 'xxd')
optdepends=('python2: needed for faust2md'
	    'ruby: needed for faust2sc and scbuilder')
provides=('faust')
conflicts=('faust')
# This keeps the static libraries. Remove the 'staticlibs' option if this
# isn't wanted.
options=('strip' 'staticlibs')
# We're using the (default) master-dev branch of Faust here, which has all the
# latest changes. End users might want to use the master branch instead, which
# is recommended, since it's supposedly more stable and tested, but
# nevertheless (mostly) up-to-date.
source=("$pkgname::git+https://github.com/grame-cncm/faust.git#branch=master-dev"
	"git+https://github.com/rukano/emacs-faust-mode.git"
	"python2-fix.patch")
md5sums=('SKIP' 'SKIP'
         '6f0a99a68e1b774200a53c7140364f37')

pkgver() {
  cd $srcdir/$pkgname
  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

prepare() {
  cd $srcdir/$pkgname
  # fix up scripts like faust2md which need python2 to run
  patch -Np1 < $srcdir/python2-fix.patch
}

# NOTE: libHTTPDFaust requires 'liblo', 'libmicrohttpd' and 'openssl'.
# Similarly, sound2faust requires libsndfile which we also include by default.
# These are all optional, so you can get rid of the extra dependencies by
# changing the build target from 'world' to 'all' and removing the
# corresponding dependencies above.

build() {
  cd $srcdir/$pkgname
  make PREFIX=/usr world
}

package() {
  cd $srcdir/$pkgname
  make install PREFIX=/usr DESTDIR="$pkgdir"

  # docs
  install -d "$pkgdir/usr/share/doc/faust"
  install -Dm644 documentation/*.{pdf,html} "$pkgdir/usr/share/doc/faust"

  # examples
  install -d "$pkgdir/usr/share/faust/examples"
  cp -R "examples/"* "$pkgdir/usr/share/faust/examples/"

  ## syntax highlighting files
  cd syntax-highlighting

  # kate
  install -Dm644 faust.xml "$pkgdir/usr/share/apps/katepart/syntax/faust.xml"
  # gedit
  install -Dm644 faust.lang "$pkgdir/usr/share/gtksourceview-2.0/language-specs/faust.lang"
  install -Dm644 faust.lang "$pkgdir/usr/share/gtksourceview-3.0/language-specs/faust.lang"

  # highlight
  install -Dm644 dsp.lang "$pkgdir/usr/share/highlight/langDefs/dsp.lang"

  # vim
  install -Dm644 faust.vim "$pkgdir/usr/share/vim/vimfiles/syntax/faust.vim"

  # emacs
  install -d "$pkgdir/usr/share/emacs/site-lisp/"
  install -Dm644 "$srcdir/emacs-faust-mode/faust-mode.el" "$pkgdir/usr/share/emacs/site-lisp/"
}