138 lines
3.4 KiB
Bash
138 lines
3.4 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 |---------------------------------------
|
|
|
|
pkgbase=libcamera
|
|
pkgname=(libcamera libcamera-tools gst-plugin-libcamera) # libcamera-docs
|
|
pkgver=0.0.4
|
|
_commit=6a57d964abdb3f24608c0fc2839d96e02eebddeb # refs/tags/v0.0.4
|
|
pkgrel=02
|
|
pkgdesc="A complex camera support library for Linux, Android, and ChromeOS w/o systemd"
|
|
url="https://libcamera.org/"
|
|
depends=(glibc)
|
|
makedepends=(doxygen git glib2 graphviz gst-plugins-base gtest libdrm
|
|
libjpeg-turbo libtiff libyaml meson python-jinja python-ply python-sphinx
|
|
python-pyyaml qt5-base qt5-tools sdl2 texlive-core)
|
|
source=(git+https://git.libcamera.org/$pkgname/$pkgname.git#tag=$_commit)
|
|
|
|
_pick() {
|
|
local p="$1" f d; shift
|
|
for f; do
|
|
d="$srcdir/$p/${f#$pkgdir/}"
|
|
mkdir -p "$(dirname "$d")"
|
|
mv "$f" "$d"
|
|
rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
|
|
done
|
|
}
|
|
|
|
prepare() {
|
|
cd $pkgname
|
|
# add version, so that utils/gen-version.sh may rely on it
|
|
printf "%s\n" "$pkgver" > .tarball-version
|
|
}
|
|
|
|
build() {
|
|
local meson_options=(
|
|
-D v4l2=true
|
|
-D tracing=disabled
|
|
-D test=true
|
|
)
|
|
|
|
arch-meson $pkgname build "${meson_options[@]}"
|
|
meson compile -C build
|
|
}
|
|
|
|
check() {
|
|
meson test -C build || echo "Tests require CLONE_NEWUSER/ CLONE_NEWNET."
|
|
}
|
|
|
|
package_libcamera() {
|
|
depends=(
|
|
gcc-libs
|
|
glibc
|
|
gnutls
|
|
libdrm
|
|
libelf
|
|
libunwind
|
|
libyaml
|
|
libudev.so
|
|
)
|
|
optdepends=(
|
|
'gst-plugin-libcamera: GStreamer plugin'
|
|
'libcamera-docs: for documentation'
|
|
'libcamera-tools: for applications'
|
|
)
|
|
provides=(libcamera.so libcamera-base.so)
|
|
|
|
meson install -C build --destdir "$pkgdir"
|
|
|
|
# remove unneeded signatures as they make the package unreproducible
|
|
rm -frv "$pkgdir/usr/lib/$pkgname/"*.sign
|
|
|
|
(
|
|
cd "$pkgdir"
|
|
# _pick $pkgbase-docs usr/share/doc
|
|
_pick $pkgbase-tools usr/bin/{cam,qcam,lc-compliance}
|
|
_pick gst-plugin-$pkgbase usr/lib/gstreamer-*
|
|
)
|
|
}
|
|
|
|
#package_libcamera-docs() {
|
|
# pkgdesc+=" - documentation"
|
|
#
|
|
# mv -v $pkgname/* "$pkgdir"
|
|
# mv -v "$pkgdir/usr/share/doc/$pkgbase-$pkgver/" "$pkgdir/usr/share/doc/$pkgbase/"
|
|
# rm -frv "$pkgdir/usr/share/doc/$pkgbase/html/.buildinfo"
|
|
#}
|
|
|
|
package_libcamera-tools() {
|
|
pkgdesc+=" - tools"
|
|
depends=(
|
|
gcc-libs
|
|
glibc
|
|
gtest
|
|
libcamera libcamera.so libcamera-base.so
|
|
libevent libevent-2.1.so libevent_pthreads-2.1.so
|
|
libjpeg-turbo libjpeg.so
|
|
libtiff libtiff.so
|
|
libyaml
|
|
qt5-base
|
|
sdl2
|
|
)
|
|
conflicts=("$pkgbase-tests<0.0.1-2")
|
|
replaces=("$pkgbase-tests<0.0.1-2")
|
|
|
|
mv -v $pkgname/* "$pkgdir"
|
|
}
|
|
|
|
package_gst-plugin-libcamera() {
|
|
pkgdesc="Multimedia graph framework - libcamera plugin"
|
|
depends=(
|
|
gcc-libs
|
|
glibc
|
|
glib2 libg{lib,object}-2.0.so
|
|
gstreamer
|
|
gst-plugins-base-libs
|
|
libcamera libcamera.so libcamera-base.so
|
|
)
|
|
|
|
mv -v $pkgname/* "$pkgdir"
|
|
}
|
|
|
|
#---- arch license gpg-key & sha256sums ----
|
|
|
|
arch=(x86_64)
|
|
|
|
license=(LGPL2.1 GPL2)
|
|
|
|
sha256sums=(SKIP)
|
|
|
|
## fb26fb957f1ae679ccc2e0a2e43d92c98702112cf93643c83e9c960bd06a2e6f gst-plugin-libcamera-0.0.4-02-x86_64.pkg.tar.lz
|
|
## 5135cbbf70cef7ae2153b9c426f8327058dbbae5f91e1da8496fcac59acec8fd libcamera-0.0.4-02-x86_64.pkg.tar.lz
|
|
## e5d8af1fbf262423ff7441d4bb67b70351c4154e1625c87438237bbbcb7c466c libcamera-tools-0.0.4-02-x86_64.pkg.tar.lz
|
|
|
|
|