jobextra/cef-minimal-obs-bin/PKGBUILD

83 lines
2.6 KiB
Bash

#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=cef-minimal-obs-bin
_cefver="103.0.0-5060-shared-textures_143.2591"
_version=${_cefver//-/_}
_commit="4204d54"
_cefbranch="5060"
_chromiumver="103.0.${_cefbranch}.134"
_rebuild="1" # The tarball sometime can get rebuild by OBS Project
pkgver="${_version}+g${_commit}+chromium_${_chromiumver}_${_rebuild}"
pkgrel=03
pkgdesc="Chromium Embedded Framework minimal release needed by OBS Studio release in /opt/cef-obs"
arch=("x86_64")
_arch=(64)
url="https://bitbucket.org/chromiumembedded/cef"
depends=("nss" "alsa-lib" "pango" "libxrandr" "libxcomposite"
"at-spi2-core" "libxkbcommon" "libcups" "mesa")
makedepends=("cmake")
provides=("cef-minimal-obs=$pkgver")
conflicts=("cef-minimal-obs")
# Prevent people from using link time optimisation for this package because it make OBS unable to be built against it
options=('!lto' '!strip' 'debug')
source=("https://cdn-fastly.obsproject.com/downloads/cef_binary_${_cefbranch}_linux64.tar.bz2")
prepare() {
cd "$srcdir"/cef_binary_${_cefbranch}_linux${_arch}
# Fix permissions
chmod 755 Release
chmod 755 Resources
chmod 755 Resources/locales
chmod 755 include
chmod 755 include/base
chmod 755 include/base/internal
chmod 755 include/capi
chmod 755 include/capi/test
chmod 755 include/capi/views
chmod 755 include/internal
chmod 755 include/test
chmod 755 include/views
chmod 755 include/wrapper
# Remove pre-built wrapper
rm -rf build
}
build() {
cd "$srcdir"/cef_binary_${_cefbranch}_linux${_arch}
cmake \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DPROJECT_ARCH=$_parch .
make libcef_dll_wrapper
# Remove unneeded generated files
rm -f CMakeCache.txt Makefile cmake_install.cmake
rm -rf CMakeFiles
cd libcef_dll_wrapper
rm -f Makefile cmake_install.cmake
rm -rf CMakeFiles
}
package() {
mkdir -p "$pkgdir"/opt/cef-obs/
cp -a "$srcdir"/cef_binary_${_cefbranch}_linux${_arch}/* "$pkgdir"/opt/cef-obs
rm -f "$pkgdir"/opt/cef-obs/CMakeLists.txt "$pkgdir"/opt/cef-obs/LICENSE.txt "$pkgdir"/opt/cef-obs/README.txt
rm -rf "$pkgdir"/opt/cef-obs/cmake
install -Dm644 "$srcdir"/cef_binary_${_cefbranch}_linux${_arch}/LICENSE.txt "$pkgdir"/usr/share/licenses/${pkgname}/LICENSE
}
#---- license gpg-key sha256sums ----
license=("BSD")
sha256sums=(ac4e2a8ebf20700e4e36353e314f876623633dd5b474778a2548bb66bdbea11d)