build-libwayland-deb.sh

This commit is contained in:
Andrei Radulescu
2024-08-08 11:42:59 +03:00
parent 0843bccb79
commit cd8d4d211e
2 changed files with 61 additions and 2 deletions
+59
View File
@@ -0,0 +1,59 @@
#!/bin/bash
set -e
################################################################################
# Custom libwayland is created by combining libwayland client0, cursor0, server0
# and dev 1.9.0-1 from Ubuntu 16.04 (xenial) for both aarch64 and armhf, without
# getting into dependency hell.
################################################################################
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
TMP=$DIR/tmp
TMP_SRC=$TMP/libwayland-src-debs
# Create a new folder `libwayland-1.9.0-1` and put the metadata in
# `libwayland-1.9.0-1/DEBIAN/control`:
mkdir -p $TMP
cd $TMP
mkdir -p libwayland-1.9.0-1/DEBIAN
cat << EOF > libwayland-1.9.0-1/DEBIAN/control
Package: libwayland-xenial
Version: 1.9.0-1
Architecture: all
Maintainer: Andrei Radulescu andi.radulescu@gmail.com
Depends: libc6 (>= 2.17), libexpat1 (>= 2.0.1), libffi6 (>= 3.2)
Replaces: libwayland-dev, libwayland-client0, libwayland-cursor0, libwayland-server0
Installed-Size: 0
Homepage: https://comma.ai
Description: libwayland client0, cursor0, server0 and dev 1.9.0-1 from Ubuntu Xenial
EOF
# Download the official debs:
mkdir -p $TMP_SRC
cd $TMP_SRC
curl -sSLO https://launchpad.net/ubuntu/+archive/primary/+files/libwayland-dev_1.9.0-1_arm64.deb
curl -sSLO https://launchpad.net/ubuntu/+archive/primary/+files/libwayland-dev_1.9.0-1_armhf.deb
curl -sSLO https://launchpad.net/ubuntu/+archive/primary/+files/libwayland-client0_1.9.0-1_arm64.deb
curl -sSLO https://launchpad.net/ubuntu/+archive/primary/+files/libwayland-client0_1.9.0-1_armhf.deb
curl -sSLO https://launchpad.net/ubuntu/+archive/primary/+files/libwayland-cursor0_1.9.0-1_arm64.deb
curl -sSLO https://launchpad.net/ubuntu/+archive/primary/+files/libwayland-cursor0_1.9.0-1_armhf.deb
curl -sSLO https://launchpad.net/ubuntu/+archive/primary/+files/libwayland-server0_1.9.0-1_arm64.deb
curl -sSLO https://launchpad.net/ubuntu/+archive/primary/+files/libwayland-server0_1.9.0-1_armhf.deb
# And unpack them:
for deb in *.deb; do dpkg-deb -R "$deb" "${deb%.deb}"; done
# Copy all files in libwayland-1.9.0-1
cd $TMP
cp -a $TMP_SRC/*/usr libwayland-1.9.0-1
# Package the deb and clean up everything else
dpkg-deb --root-owner-group --build "libwayland-1.9.0-1" "libwayland-1.9.0-1.deb"
mv libwayland-1.9.0-1.deb $DIR
rm -rf libwayland-1.9.0-1 $TMP_SRC
+2 -2
View File
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:042c68c537e51a39c7ccb829a3ccf5f435adb775e7af0f0d0085de121c8ea53c
size 135452
oid sha256:f75fc114c7f708f063866e0eef099a0caac2396693f9dee27e4769eb440bd171
size 174960