summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Graef2020-08-29 23:47:43 +0200
committerAlbert Graef2020-08-29 23:47:43 +0200
commit275dbecd0c23e8621c83565b1af5f1bc0f8fe84d (patch)
tree810f020958ef214783f9a2cf22a6234e170bb577
downloadaur-275dbecd0c23e8621c83565b1af5f1bc0f8fe84d.tar.gz
Initial upload
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD71
2 files changed, 91 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..a550a0ba4d58
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = pd-faustgen2-git
+ pkgdesc = The FAUST compiler embedded in a Pd external - git version
+ pkgver = 2.0.0rc4.r0.gc1fdfb4
+ pkgrel = 1
+ url = https://github.com/agraef/pd-faustgen
+ arch = i686
+ arch = x86_64
+ license = MIT
+ makedepends = cmake
+ makedepends = faust
+ makedepends = llvm
+ depends = pd
+ depends = llvm-libs
+ provides = pd-faustgen2
+ conflicts = pd-faustgen2
+ source = git+https://github.com/agraef/pd-faustgen.git#branch=faustgen2
+ md5sums = SKIP
+
+pkgname = pd-faustgen2-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..426d678d88a5
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,71 @@
+# -*- shell-script -*-
+# Maintainer: Albert Graef <aggraef at gmail dot com>
+
+# This is a generic PKGBUILD which lets you build variants of the package for
+# all the different Pd flavors out there. Just `makepkg` will build the pd
+# (vanilla) package, `makepkg puredata=purr-data` will build a package for
+# purr-data, etc. Note that in any case, pd-faustgen2 uses its own copy of the
+# Pd source to build the external, but the resulting binary will work with all
+# current Pd flavors. The PKGBUILD just makes sure that the external will be
+# installed into the right directory for the target Pd version.
+
+# Name of the Pd flavor we're building this package for (pd, pd-l2ork,
+# purr-data, etc.). The package name prefix is derived from this (pd for
+# vanilla, pdl2ork for pd-l2ork, purrdata for purr-data, etc.).
+puredata=${puredata:-pd}
+pkgpref=$(echo "$puredata" | sed -e 's/-//g')
+
+# Branch to build, faustgen2 by default. Our repo is a fork of the upstream at
+# https://github.com/CICM/pd-faustgen. The present version has a lot of
+# additional functionality and is *not* backward-compatible. Thus the external
+# is named differently so that you can run both the original CICM faustgen~
+# and faustgen2~ at the same time.
+branch=${branch:-faustgen2}
+
+# Source and destination package names.
+src_pkgname=pd-faustgen
+dest_pkgname=$pkgpref-faustgen2
+
+pkgname=$dest_pkgname-git
+pkgver=2.0.0rc4.r0.gc1fdfb4
+pkgrel=1
+pkgdesc="The FAUST compiler embedded in a Pd external - git version"
+arch=("i686" "x86_64")
+license=('MIT')
+url="https://github.com/agraef/$src_pkgname"
+depends=("$puredata" 'llvm-libs')
+makedepends=('cmake' 'faust' 'llvm')
+provides=("$dest_pkgname")
+conflicts=("$dest_pkgname")
+source=("git+https://github.com/agraef/$src_pkgname.git#branch=$branch")
+md5sums=('SKIP')
+
+pkgver() {
+ cd "$src_pkgname"
+ git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-rc/rc/g;s/-/./g'
+}
+
+prepare() {
+ cd "$src_pkgname"
+ # We don't have to initialize the faust submodules, as we're building
+ # against an installed libfaust. This makes checking out the submodules
+ # much quicker.
+ git submodule update --init pd.build pure-data
+}
+
+# Installation goes into /usr/lib/$puredata. Figure out the real name of that
+# directory in case it is a link (as is the case with purr-data).
+pdlibdir=$(cd /usr/lib/$puredata && pwd -P)
+
+build() {
+ cd "$src_pkgname"
+ rm -rf build
+ mkdir build && cd build
+ cmake .. -DCMAKE_INSTALL_PREFIX="$pdlibdir" -DINSTALL_DIR="extra/faustgen2~" -DINSTALLED_FAUST=ON
+ make
+}
+
+package() {
+ cd "$src_pkgname/build"
+ make install DESTDIR="$pkgdir"
+}