diff options
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | PKGBUILD | 74 |
2 files changed, 61 insertions, 37 deletions
@@ -1,17 +1,21 @@ pkgbase = open-stage-control-node-git - pkgdesc = A libre desktop OSC bi-directional control surface application - pkgver = 0.39.6.r2.g40f89293 + pkgdesc = A libre desktop OSC bi-directional control surface application (node-only package) + pkgver = 1.6.0 pkgrel = 1 url = http://osc.ammd.net/ - arch = any + arch = i686 + arch = x86_64 + arch = armv7h + arch = aarch64 license = GPL3 - makedepends = git - depends = npm - optdepends = python-pyrtmidi: send and receive midi messages - provides = open-stage-control - conflicts = open-stage-control - source = git+https://github.com/jean-emmanuel/open-stage-control - md5sums = SKIP + makedepends = npm + makedepends = rsync + depends = nodejs + optdepends = python-rtmidi: send and receive midi messages + source = https://github.com/jean-emmanuel/open-stage-control/archive/v1.6.0.tar.gz + sha256sums = f5a2c2d4856017f43228509571fd2c87ec08a8b1ba1dc0fe48f03976423e3be0 + depends_i686 = gcc-libs + depends_x86_64 = gcc-libs-multilib pkgname = open-stage-control-node-git @@ -1,46 +1,66 @@ -# Maintainer: nucularjohn <nucularjohn@gmail.com> -pkgname=open-stage-control-node-git -pkgver=0.39.6.r2.g40f89293 +# Maintainer: Daniel Appelt <daniel.appelt@gmail.com> +# Contributor: nucularjohn <nucularjohn@gmail.com> +_pkgbasename=open-stage-control +pkgname=$_pkgbasename-node-git +pkgver=1.6.0 pkgrel=1 -pkgdesc="A libre desktop OSC bi-directional control surface application" -arch=('any') -url="http://osc.ammd.net/" +pkgdesc='A libre desktop OSC bi-directional control surface application (node-only package)' +arch=(i686 x86_64 armv7h aarch64) +url='http://osc.ammd.net/' license=('GPL3') -depends=('npm') -makedepends=('git') -optdepends=('python-pyrtmidi: send and receive midi messages') -provides=("${pkgname%-node-git}") -conflicts=("${pkgname%-node-git}") -source=('git+https://github.com/jean-emmanuel/open-stage-control') -md5sums=('SKIP') - -pkgver() { - cd "$srcdir/${pkgname%-node-git}" - printf "%s" "$(git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g')" -} +depends=('nodejs') +depends_i686=('gcc-libs') +depends_x86_64=('gcc-libs-multilib') +optdepends=('python-rtmidi: send and receive midi messages') +makedepends=('npm' 'rsync') +source=("https://github.com/jean-emmanuel/$_pkgbasename/archive/v${pkgver//_/-}.tar.gz") +sha256sums=('f5a2c2d4856017f43228509571fd2c87ec08a8b1ba1dc0fe48f03976423e3be0') +_platform=linux +case "$CARCH" in + i686) + _arch=ia32 + ;; + x86_64) + _arch=x64 + ;; + armv7h) + _arch=armv7l + ;; + aarch64) + _arch=arm64 + ;; +esac prepare() { - cd "$srcdir/${pkgname%-node-git}" - cat > "$pkgname" << EOF + cd "$srcdir/$_pkgbasename-${pkgver//_/-}" + + cat > "$_pkgbasename-node" << EOF #!/bin/bash -node /usr/share/$pkgname/index.js "\$@" +node /usr/share/$_pkgbasename-node/index.js "\$@" EOF } build() { - cd "$srcdir/${pkgname%-node-git}" - npm install + cd "$srcdir/$_pkgbasename-${pkgver//_/-}" + + # Use PKBUILD conforming environment variables and allow redefining the build location. + sed -i "s/PLATFORM/_platform/g" scripts/package.js + sed -i "s/ARCH/_arch/g" scripts/package.js + + # Make sure to run this inside build() with non-fakeroot privileges + npm install --arch=$_arch npm run build } package() { - cd "$srcdir/${pkgname%-node-git}" + cd "$srcdir/$_pkgbasename-${pkgver//_/-}" npm run package-node - install -d "${pkgdir}/usr/share/" - rsync -a dist/${pkgname%-git}/ "${pkgdir}/usr/share/$pkgname" + install -d "$pkgdir/usr/share/" + rsync -a dist/$_pkgbasename-node/ "$pkgdir/usr/share/$_pkgbasename-node" - install -Dm755 $pkgname "${pkgdir}/usr/bin/${pkgname%-git}" + install -Dm755 "$_pkgbasename-node" "$pkgdir/usr/bin/$_pkgbasename-node" + echo $'\nPlease note that this package will be renamed to open-stage-control-node in the near future.\n' } |