summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorYour Name2022-07-30 15:45:05 +0800
committerYour Name2022-07-30 15:45:05 +0800
commit1d01c3fac40ace2d91e670a24841d7758419580f (patch)
treee4902a0fbf89034695c859351373f56363ee2811
downloadaur-1d01c3fac40ace2d91e670a24841d7758419580f.tar.gz
pack cef-jetbrains-git
-rw-r--r--.SRCINFO34
-rw-r--r--PKGBUILD48
-rw-r--r--pkgver.py34
3 files changed, 116 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..de8f18a436bc
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,34 @@
+pkgbase = cef-jetbrains-git
+ pkgdesc = CEF for JetBrains
+ pkgver = 98.3.42+gf00e174+chromium+98.0.4758.102
+ pkgrel = 1
+ url = https://github.com/JetBrains/cef
+ arch = x86_64
+ license = BSD
+ makedepends = python
+ makedepends = gn
+ makedepends = ninja
+ makedepends = clang
+ makedepends = lld
+ makedepends = gperf
+ makedepends = nodejs
+ makedepends = pipewire
+ makedepends = java-runtime-headless
+ makedepends = git
+ depends = at-spi2-atk
+ depends = libxkbcommon
+ depends = libxcomposite
+ depends = mesa
+ depends = libcups
+ depends = pango
+ depends = libxrandr
+ depends = alsa-lib
+ depends = nss
+ provides = cef-jetbrains
+ conflicts = cef-jetbrains
+ source = git+https://github.com/JetBrains/cef.git#branch=jb_master
+ source = pkgver.py
+ sha256sums = SKIP
+ sha256sums = 7cacaccd96492a74c8f0e47ed08dc30d7f85f56e0d76ab3805007dfe05d116d5
+
+pkgname = cef-jetbrains-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..55c25615cfe3
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,48 @@
+pkgname=cef-jetbrains-git
+pkgver=98.3.42+gf00e174+chromium+98.0.4758.102
+pkgrel=1
+pkgdesc="CEF for JetBrains"
+arch=('x86_64')
+url="https://github.com/JetBrains/cef"
+license=('BSD')
+depends=('at-spi2-atk' 'libxkbcommon' 'libxcomposite' 'mesa' 'libcups' 'pango' 'libxrandr' 'alsa-lib' 'nss')
+makedepends=('python' 'gn' 'ninja' 'clang' 'lld' 'gperf' 'nodejs' 'pipewire'
+ 'java-runtime-headless' 'git')
+# makedepends list is copied from community/chromium
+provides=('cef-jetbrains')
+conflicts=('cef-jetbrains')
+source=('git+https://github.com/JetBrains/cef.git#branch=jb_master'
+'pkgver.py')
+sha256sums=('SKIP'
+ '7cacaccd96492a74c8f0e47ed08dc30d7f85f56e0d76ab3805007dfe05d116d5')
+
+pkgver() {
+ cd $srcdir/chromium/cef
+ python $srcdir/pkgver.py
+}
+
+prepare() {
+ cd $srcdir
+ mkdir -p chromium
+ mv cef chromium
+ cd chromium
+
+ bash cef/jb/tools/common/get_sources.sh x64
+ sed -i 's/.*install-build-deps.sh.*/echo/g' cef/jb/tools/linux/create_project.sh
+ bash cef/jb/tools/linux/create_project.sh x64
+
+}
+
+build() {
+ cd $srcdir/chromium
+ bash cef/jb/tools/linux/build.sh x64
+ bash cef/jb/tools/linux/create_distr.sh x64
+}
+
+package() {
+ cd $srcdir/chromium/chromium_git/chromium/src/cef/binary_distrib
+ mkdir -p $pkgdir/usr/lib/cef-jetbrains
+ cp -r $(find . -mindepth 1 -maxdepth 1 -type d)/* $pkgdir/usr/lib/cef-jetbrains/
+ mkdir -p $pkgdir/usr/share/licenses/cef-jetbrains
+ install -Dm644 ../LICENSE.txt $pkgdir/usr/share/licenses/cef-jetbrains/LICENSE
+} \ No newline at end of file
diff --git a/pkgver.py b/pkgver.py
new file mode 100644
index 000000000000..26a47c1b1ac4
--- /dev/null
+++ b/pkgver.py
@@ -0,0 +1,34 @@
+from subprocess import check_output
+
+hash=check_output(['git', 'rev-parse', 'HEAD']).decode('utf-8').strip()
+hashsout=check_output(['git', 'cherry', 'origin/master', 'HEAD']).decode('utf-8').rstrip('\n').split('\n')
+hashs=[h[2:] for h in hashsout if h.startswith('+')]
+
+minor = 0
+bugfix = 0
+
+for hash in hashs:
+ found = False
+ files=check_output(['git','diff-tree','--no-commit-id', '--name-only', '-r', hash]).decode('utf-8').rstrip('\n').split('\n')
+ for file in files:
+ if file.find('cef_api_hash.h') >= 0:
+ found = True
+ break
+
+ if found:
+ minor += 1
+ bugfix = 0
+ else:
+ bugfix += 1
+
+versions=check_output(['cat','CHROMIUM_BUILD_COMPATIBILITY.txt']).decode('utf-8').rstrip('\n').split('\n')
+for line in versions:
+ if line.find('chromium_checkout')!=-1:
+ major=line.split('/')[-1].split('.')[0]
+ chromium=line.split('/')[-1].split("'")[0]
+ break
+
+
+shorthash=hash[:7]
+
+print('%s.%s.%s+g%s+chromium+%s' % (major, minor, bugfix, shorthash, chromium)) \ No newline at end of file