summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6e295c0c989cb9c9ef2eb072e2dc1edc6ea1b73f (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
pkgname=jcef-jetbrains-git
pkgdesc="A simple framework for embedding Chromium-based browsers into Java-based applications. (Used for JetBrainsRuntime)"
pkgver=122.1.8.api1.16.r5.f8bb25b
pkgrel=1
arch=('x86_64')
url="https://github.com/JetBrains/jcef"
license=('BSD')
depends=('java-runtime' 'libxcursor' 'at-spi2-atk' 'libxkbcommon' 'libxcomposite' 'mesa' 'libcups' 'pango' 'libxrandr' 'alsa-lib' 'nss')
makedepends=('java-environment' 'cmake' 'git' 'ninja' 'python' 'ant' 'unzip' 'zip')
source=("git+$url.git#branch=dev")
sha256sums=('SKIP')
provides=('jcef-jetbrains')
conflicts=('jcef-jetbrains')

pkgver() {
    cd jcef
    ver=$(cat build.xml | grep \"jcef.version\" | cut -d \" -f 4 | sed "s/\(.*\)-.*-chromium-.*-api-\(.*\)/\1.api\2/g")
    count=$(git log $(git rev-list -1 HEAD build.xml)..HEAD | grep commit | wc -l)
    printf "$ver.r$count.%s" "$(git rev-parse --short HEAD)"
}

build() {
    cd $srcdir/jcef
    sed -i "s/make -j4/make/g" ./jb/tools/linux/build_native.sh
    JAVA_HOME=/usr/lib/jvm/default ./jb/tools/linux/build.sh all
}

package() {
    cd $srcdir/jcef
    mkdir -p $pkgdir/usr/lib/jcef-jetbrains
    tar -xvf jcef_linux_x64.tar.gz -C $pkgdir/usr/lib/jcef-jetbrains --no-same-owner
    install -Dm644 LICENSE.txt $pkgdir/usr/share/licenses/jcef-jetbrains/LICENSE
}