From 1a3fa50ff0017d88d4c8563efacb277b22665a3d Mon Sep 17 00:00:00 2001 From: David Runge Date: Mon, 20 Mar 2023 14:04:37 +0000 Subject: 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. --- PKGBUILD | 35 +++++++++++++++++++++++++++++------ 1 file 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 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 -- cgit v1.2.3