summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Runge <dvzrv@archlinux.org>2023-03-20 14:04:37 +0000
committerDavid Runge <dvzrv@archlinux.org>2023-03-20 14:04:37 +0000
commit1a3fa50ff0017d88d4c8563efacb277b22665a3d (patch)
treed77805061c18bb13fce174b7618771fe3de58d49
parenta5adb74751eeb3d4771a08341dd279e9cab59ef2 (diff)
Rebuild to split out IPA files to libcamera-ipa.
When stripping the IPA shared objects, they need to be re-signed. Split out IPA files so we can manually strip and re-sign. NOTE: The signature files are required (although this unfortunately makes the package unreproducible :( ). Add missing depends to libcamera an libcamera-tools.
-rw-r--r--PKGBUILD35
1 files changed, 29 insertions, 6 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 6a41309..734d448 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,10 +1,16 @@
# Maintainer: David Runge <dvzrv@archlinux.org>
pkgbase=libcamera
-pkgname=(libcamera libcamera-docs libcamera-tools gst-plugin-libcamera)
+pkgname=(
+ libcamera
+ libcamera-docs
+ libcamera-ipa
+ libcamera-tools
+ gst-plugin-libcamera
+)
pkgver=0.0.4
_commit=6a57d964abdb3f24608c0fc2839d96e02eebddeb # refs/tags/v0.0.4
-pkgrel=2
+pkgrel=3
pkgdesc="A complex camera support library for Linux, Android, and ChromeOS"
arch=(x86_64)
url="https://libcamera.org/"
@@ -71,10 +77,11 @@ package_libcamera() {
gcc-libs
glibc
gnutls
- libdrm
+ libcamera-ipa
libelf
libunwind
libyaml
+ sh
systemd-libs libudev.so
)
optdepends=(
@@ -86,12 +93,10 @@ package_libcamera() {
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-ipa usr/lib/libcamera/
_pick $pkgbase-tools usr/bin/{cam,qcam,lc-compliance}
_pick gst-plugin-$pkgbase usr/lib/gstreamer-*
)
@@ -105,6 +110,23 @@ package_libcamera-docs() {
rm -frv "$pkgdir/usr/share/doc/$pkgbase/html/.buildinfo"
}
+package_libcamera-ipa() {
+ pkgdesc+=" - signed IPA"
+ depends=(
+ gcc-libs
+ glibc
+ libcamera libcamera.so libcamera-base.so
+ )
+ # stripping requires re-signing of IPA libs, so we do it manually
+ options=(!strip)
+
+ strip $pkgname/usr/lib/libcamera/*{.so,proxy}
+ for _lib in $pkgname/usr/lib/libcamera/*.so; do
+ $pkgbase/src/ipa/ipa-sign.sh "$(find build -type f -iname "*ipa-priv-key.pem")" "$_lib" "$_lib.sign"
+ done
+ mv -v $pkgname/* "$pkgdir"
+}
+
package_libcamera-tools() {
pkgdesc+=" - tools"
depends=(
@@ -112,6 +134,7 @@ package_libcamera-tools() {
glibc
gtest
libcamera libcamera.so libcamera-base.so
+ libdrm
libevent libevent-2.1.so libevent_pthreads-2.1.so
libjpeg-turbo libjpeg.so
libtiff libtiff.so