Files
BMLFS/build-scripts/weston.build
2021-09-24 09:33:40 -05:00

67 lines
2.4 KiB
Bash

#! /bin/bash
# Weston
# Source: https://wayland.freedesktop.org/releases/weston-9.0.0.tar.xz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: Wayland, Wayland-protocols, libxkbcommon, xkeyboard-config
# Required: libinput,libunwind, mtdev, libxcursor, glu, lcms2, pango
# Required: libwebp, libva, dbus, linux-pam, libevdev, libjpeg-turbo
# Required: elogind
# Recommended: gstreamer, colord, freerdp, gst-plugins-base
# Optional: pipewire
patch -Np1 -i ../patches/weston-alpine/missing-fnctl_h.patch
patch -Np1 -i ../patches/weston-alpine/timespec.patch
mkdir BUILD && cd BUILD &&
meson --prefix=/usr \
-Dlauncher-logind=true \
-Dsystemd=false \
-Dsimple-dmabuf-drm=auto \
-Dpipewire=false \
-Dbackend-rdp=false . &&
read -p "Compile?" && ninja -j2 &&
sudo -S DESTDIR=$BUILD ninja install &&
sudo -S mkdir -pv ${BUILD}/usr/lib &&
sudo -S mv -v ${BUILD}/usr/share/pkgconfig/* ${BUILD}/usr/lib/pkgconfig/ &&
cd $BUILD && sudo -S mkdir -v ${BUILD}/install &&
cat > /tmp/slack-desc << "EOF"
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
weston: weston (Reference implementation of a Wayland compositor)
weston:
weston: Weston is the reference implementation of a Wayland compositor, as
weston: well as a useful environment in and of itself.
weston:
weston: Out of the box, Weston provides a very basic desktop or a
weston: full-featured environment for non-desktop users.
weston:
weston:
weston:
weston: Homepage: http://wayland.freedesktop.org/
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/weston-9.0.0-$(uname -m)-mlfs.txz &&
cp -v install/doinst.sh /tmp/ &&
cat >> /tmp/doinst.sh << "EOF"
echo "Setting up groups and permissions"
groupadd weston-launch
chown -v root /usr/bin/weston-launch
chmod -v +s /usr/bin/weston-launch
EOF
sudo -S mv /tmp/doinst.sh install/ &&
sudo -S makepkg -l y -c n $PKGS/weston-9.0.0-$(uname -m)-mlfs.txz &&
sudo -S rm -rf ${BUILD}/*