summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO9
-rw-r--r--PKGBUILD53
2 files changed, 49 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 110440c85b18..5b2de686b9c7 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,21 @@
pkgbase = boram
pkgdesc = Cross-platform WebM converter
pkgver = 0.5.0
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/Kagami/boram
arch = x86_64
license = CC0-1.0
+ makedepends = p7zip
+ makedepends = python2
+ makedepends = node-gyp
depends = mpv
depends = ffmpeg
source = https://github.com/Kagami/boram/releases/download/v0.5.0/boram-v0.5.0-linux-x64.7z
+ source = git+https://github.com/Kagami/nacl_sdk.git
+ source = git+https://github.com/Kagami/boram.git#tag=v0.5.0
md5sums = 48c3bbd87c6409d0c244b2808546de95
+ md5sums = SKIP
+ md5sums = SKIP
pkgname = boram
diff --git a/PKGBUILD b/PKGBUILD
index 6f8eb1173623..661023d23843 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,25 +1,54 @@
# Maintainer: Šarūnas Gliebus <ssharunas at yahoo.co.uk>
pkgname=boram
pkgver=0.5.0
-pkgrel=1
+pkgrel=2
pkgdesc="Cross-platform WebM converter"
arch=('x86_64')
url="https://github.com/Kagami/boram"
license=('CC0-1.0')
depends=('mpv' 'ffmpeg')
-source=(https://github.com/Kagami/boram/releases/download/v$pkgver/$pkgname-v$pkgver-linux-x64.7z)
-md5sums=('48c3bbd87c6409d0c244b2808546de95')
+makedepends=('p7zip' 'python2' 'node-gyp')
+source=(
+ "https://github.com/Kagami/boram/releases/download/v$pkgver/$pkgname-v$pkgver-linux-x64.7z"
+ "git+https://github.com/Kagami/nacl_sdk.git"
+ "git+https://github.com/Kagami/boram.git#tag=v$pkgver"
+)
+md5sums=(
+ '48c3bbd87c6409d0c244b2808546de95'
+ 'SKIP'
+ 'SKIP'
+)
+
+build() {
+ # Since video preview does not work with default release, we will have to build libboram.so by ourselves.
+
+ # First of all we will need nacl for the build
+ cd "$srcdir/nacl_sdk"
+ rm -f ./python
+ ln -s /usr/bin/python2 ./python #nacl needs python2 as python
+ export PATH="$(pwd):$PATH"
+ ./naclsdk update
+ export NACL_SDK_ROOT="$(pwd)/pepper_49"
+
+ # Then we will need to build it with nody-gyp
+ cd "$srcdir/boram"
+ # Now we want to remove target ffmpeg57, because it does not compile and we have target ffmpeg58
+ sed -i -e '52,56d' binding.gyp
+ node-gyp rebuild
+}
package() {
- mkdir -p "$pkgdir/opt/"
- mkdir -p "$pkgdir/usr/bin/"
-
- cp -r "$srcdir/$pkgname-v$pkgver-linux-x64/" "$pkgdir/opt/$pkgname"
- find "$pkgdir/opt/$pkgname" -type f -exec chmod 644 -- {} +
- find "$pkgdir/opt/$pkgname" -type d -exec chmod 755 -- {} +
+ mkdir -p "$pkgdir/opt/"
+ mkdir -p "$pkgdir/usr/bin/"
+
+ cp -r "$srcdir/$pkgname-v$pkgver-linux-x64/" "$pkgdir/opt/$pkgname"
+ cp "$srcdir/boram/build/Release/boram.node" "$pkgdir/opt/$pkgname/resources/app/libboram.so"
+
+ find "$pkgdir/opt/$pkgname" -type f -exec chmod 644 -- {} +
+ find "$pkgdir/opt/$pkgname" -type d -exec chmod 755 -- {} +
- chmod 655 "$pkgdir/opt/$pkgname/boram"
- chmod 655 "$pkgdir/opt/$pkgname/resources/app/checklib"
+ chmod 655 "$pkgdir/opt/$pkgname/boram"
+ chmod 655 "$pkgdir/opt/$pkgname/resources/app/checklib"
- ln -s "/opt/$pkgname/boram" "$pkgdir/usr/bin/boram"
+ ln -s "/opt/$pkgname/boram" "$pkgdir/usr/bin/boram"
}