summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 323e243f7b98ca384a99fd3c008c463556b69e5e (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
# Maintainer: Šarūnas Gliebus <ssharunas at yahoo.co.uk>
pkgname=boram
pkgver=0.5.6
pkgrel=3
pkgdesc="Cross-platform WebM converter"
arch=('x86_64')
url="https://github.com/Kagami/boram"
license=('CC0-1.0')
depends=('mpv' 'ffmpeg' 'gconf' 'gtk2')
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=('7e3557a468e3582b5eb7620e89b2a94c'
         '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"

	# Now we need to build boram with nody-gyp for the libboram.so, so that video preview would work
	cd "$srcdir/boram"
	node-gyp rebuild
}

package() {
	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"
  
	ln -s "/opt/$pkgname/boram" "$pkgdir/usr/bin/boram"
}