summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Appelt2020-11-02 23:06:05 +0100
committerDaniel Appelt2020-11-02 23:06:05 +0100
commit59a558501e5bd384a7c61addd7df6a6dd5a61722 (patch)
tree1e938e682f04a37d96a463911895f53fc4fcdb2a
parent8148ad96c45dec4bc81ff2dc35c868cf1252c826 (diff)
downloadaur-59a558501e5bd384a7c61addd7df6a6dd5a61722.tar.gz
Use logic similar to open-stage-control (AUR)
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD74
2 files changed, 61 insertions, 37 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1838d70a885..e5d7de5040e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -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
diff --git a/PKGBUILD b/PKGBUILD
index e7dbed2f7aa..4443d55cc76 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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'
}