aboutsummaryrefslogtreecommitdiff
path: root/el9.sh
diff options
context:
space:
mode:
Diffstat (limited to 'el9.sh')
-rwxr-xr-xel9.sh449
1 files changed, 449 insertions, 0 deletions
diff --git a/el9.sh b/el9.sh
new file mode 100755
index 0000000..71d7c13
--- /dev/null
+++ b/el9.sh
@@ -0,0 +1,449 @@
+#!/bin/sh
+set -ex
+# export RIVERWM_BASE="${RIVERWM_BASE:-$HOME/.local/opt/rivercfg}"
+export RIVERWM_BASE="${RIVERWM_BASE:-$HOME/.local/opt/river}"
+codedir="${RIVERWM_BASE}/src"
+# Override for everything elsedownstream...
+export CODEDIR="$codedir"
+
+# Annoyingly scattered about inside of the prefix...
+export PKG_CONFIG_PATH="$(echo "$RIVERWM_BASE/lib64/pkgconfig
+$RIVERWM_BASE/lib/pkgconfig
+$RIVERWM_BASE/share/pkgconfig
+/usr/lib64/pkgconfig
+/usr/lib/pkgconfig" | tr '\n' ':')"
+
+_pfx="$RIVERWM_BASE"
+
+
+sudo dnf config-manager --set-enabled crb
+
+sudo yum -y install \
+ doxygen \
+ expat-devel \
+ libffi-devel \
+ libxml2-devel \
+ xmlto \
+ libxkbcommon-devel \
+ pixman \
+ pixman-devel \
+ libglvnd-devel \
+ vulkan-loader-devel \
+ libdrm-devel \
+ xwayland-devel \
+ libinput-devel \
+ hwdata \
+ hwdata-devel \
+ libdisplay-info-devel \
+ cairo-devel \
+ pipewire-devel \
+ inih-devel \
+ scdoc \
+ libevdev-devel \
+ mtdev-devel \
+ gtk3-devel \
+ lcms2-devel \
+ xcb-util-devel \
+ gtkmm30-devel \
+ flatpak-devel \
+ fuse3-devel \
+ gstreamer1-devel \
+ gstreamer1-plugins-base-devel \
+ vala \
+ libpcap-devel \
+ iniparser-devel \
+ catch-devel \
+
+
+sudo yum -y builddep \
+ systemd \
+ mesa-vulkan-drivers \
+ xorg-x11-server-Xwayland \
+ xwayland-devel \
+ libdrm \
+ libinput \
+ xdg-desktop-portal \
+
+
+# sudo yum -y install python3-virtualenv
+
+python3 -m venv "$codedir/venv"
+. "$codedir/venv/bin/activate"
+pip install meson
+pip install ninja
+
+
+if ! [ -d "$codedir/wayland" ] ; then
+ git clone https://gitlab.freedesktop.org/wayland/wayland \
+ "$codedir/wayland"
+fi
+cd "$codedir/wayland"
+git checkout 1.24.0
+meson setup --wipe -Dprefix="${_pfx}" build/
+ninja -C build/
+ninja -C build/ install
+cd -
+
+if ! [ -d "$codedir/wl/drm" ] ; then
+ git clone https://gitlab.freedesktop.org/mesa/drm \
+ "$codedir/wl/drm"
+fi
+cd "$codedir/wl/drm"
+git checkout libdrm-2.4.131
+meson setup --wipe -Dprefix="${_pfx}" build/
+ninja -C build/
+ninja -C build/ install
+cd -
+
+if ! [ -d "$codedir/wl/wayland-protocols" ] ; then
+ git clone https://gitlab.freedesktop.org/wayland/wayland-protocols \
+ "$codedir/wl/wayland-protocols"
+fi
+cd "$codedir/wl/wayland-protocols"
+git checkout 1.47
+meson setup --wipe -Dprefix="${_pfx}" build/
+ninja -C build/
+ninja -C build/ install
+cd -
+
+if ! [ -d "$codedir/wl/pixman" ] ; then
+ git clone https://gitlab.freedesktop.org/pixman/pixman \
+ "$codedir/wl/pixman"
+fi
+cd "$codedir/wl/pixman"
+git checkout pixman-0.46.4
+meson setup --wipe -Dprefix="${_pfx}" build/
+ninja -C build/
+ninja -C build/ install
+cd -
+
+
+if ! [ -d "$codedir/wl/libliftoff" ] ; then
+ git clone https://gitlab.freedesktop.org/emersion/libliftoff \
+ "$codedir/wl/libliftoff"
+fi
+cd "$codedir/wl/libliftoff"
+git checkout v0.5.0
+meson setup --wipe -Dprefix="${_pfx}" build/
+ninja -C build/
+ninja -C build/ install
+cd -
+
+# https://gitlab.gnome.org/GNOME/glib/
+# Needed for xdg-desktop-portal...
+# Libinput also needs a newer vesion...
+if ! [ -d "$codedir/glib" ] ; then
+ git clone https://gitlab.gnome.org/GNOME/glib \
+ "$codedir/glib"
+fi
+cd "$codedir/glib"
+# git checkout 2.87.1
+git checkout 2.76.6
+git reset --hard HEAD
+# git clean -fdx .
+meson setup --includedir "${_pfx}/include" -Dprefix="${_pfx}" build
+meson compile -C build
+meson install -C build
+cd -
+
+
+if ! [ -d "$codedir/libinput" ] ; then
+ git clone https://gitlab.freedesktop.org/libinput/libinput/ \
+ "$codedir/libinput"
+fi
+cd "$codedir/libinput"
+git checkout 1.30.1
+git reset --hard HEAD
+git clean -fdx .
+git submodule update
+meson setup -Ddebug-gui=false -Dprefix="${_pfx}" build/
+# _prev_ld_pth="$LD_LIBRARY_PATH"
+# unset LD_LIBRARY_PATH
+ninja -C build/
+ninja -C build/ install
+# export LD_LIBRARY_PATH="$_prev_ld_pth"
+cd -
+
+
+if ! [ -d "$codedir/seatd" ] ; then
+ git clone https://git.sr.ht/~kennylevinsen/seatd \
+ "$codedir/seatd"
+fi
+cd "$codedir/seatd"
+meson setup --wipe -Dprefix="${_pfx}" build/
+ninja -C build/
+ninja -C build/ install
+cd -
+
+if ! [ -d "$codedir/wl/wlroots" ] ; then
+ git clone https://gitlab.freedesktop.org/wlroots/wlroots \
+ "$codedir/wl/wlroots"
+fi
+cd "$codedir/wl/wlroots"
+git checkout 0.19.2
+meson setup --includedir "${_pfx}/include" --wipe -Dprefix="${_pfx}" build/
+ninja -C build/
+ninja -C build/ install
+cd -
+
+if ! [ -d "$codedir/wl/xdg-desktop-portal-wlr" ] ; then
+ git clone https://github.com/emersion/xdg-desktop-portal-wlr \
+ "$codedir/wl/xdg-desktop-portal-wlr"
+fi
+cd "$codedir/wl/xdg-desktop-portal-wlr"
+git checkout v0.8.1
+git checkout HEAD ./src
+git apply - <<EOF
+diff --git a/src/screencast/wlr_screencast.c b/src/screencast/wlr_screencast.c
+index 0c8aad7..84b15dc 100644
+--- a/src/screencast/wlr_screencast.c
++++ b/src/screencast/wlr_screencast.c
+@@ -18,6 +18,7 @@
+ #include <assert.h>
+ #include <wayland-client-protocol.h>
+ #include <xf86drm.h>
++#include <unistd.h>
+
+ #include "screencast.h"
+ #include "wlr_screencopy.h"
+EOF
+meson setup --wipe -Dprefix="${_pfx}" build/
+ninja -C build/
+ninja -C build/ install
+cd -
+
+if ! [ -d "$codedir/foot" ] ; then
+ git clone https://codeberg.org/dnkl/foot \
+ "$codedir/foot"
+fi
+cd "$codedir/foot"
+git checkout 1.25.0
+git checkout HEAD scripts meson.build
+# Fix for older python...
+git apply - <<EOF
+diff --git a/meson.build b/meson.build
+index a1d0104d..5a7ce8e4 100644
+--- a/meson.build
++++ b/meson.build
+@@ -350,28 +350,6 @@ install_data(
+ systemd = dependency('systemd', required: false)
+ custom_systemd_units_dir = get_option('systemd-units-dir')
+
+-if systemd.found() or custom_systemd_units_dir != ''
+- configuration = configuration_data()
+- configuration.set('bindir', join_paths(get_option('prefix'), get_option('bindir')))
+-
+- if (custom_systemd_units_dir == '')
+- systemd_units_dir = systemd.get_variable('systemduserunitdir')
+- else
+- systemd_units_dir = custom_systemd_units_dir
+- endif
+-
+- configure_file(
+- configuration: configuration,
+- input: 'foot-server.service.in',
+- output: '@BASENAME@',
+- install_dir: systemd_units_dir
+- )
+-
+- install_data(
+- 'foot-server.socket',
+- install_dir: systemd_units_dir)
+-endif
+-
+ scdoc = dependency('scdoc', native: true, required: get_option('docs'))
+ install_data('foot.ini', install_dir: join_paths(get_option('sysconfdir'), 'xdg', 'foot'))
+ if scdoc.found()
+diff --git a/scripts/generate-emoji-variation-sequences.py b/scripts/generate-emoji-variation-sequences.py
+index e05b6290..22cd6960 100644
+--- a/scripts/generate-emoji-variation-sequences.py
++++ b/scripts/generate-emoji-variation-sequences.py
+@@ -5,7 +5,7 @@ import sys
+
+
+ class Codepoint:
+- def __init__(self, start: int, end: None|int = None):
++ def __init__(self, start: int, end = None):
+ self.start = start
+ self.end = start if end is None else end
+ self.vs15 = False
+EOF
+mkdir -p bld/release
+cd -
+cd "$codedir/foot/bld/release"
+meson --buildtype=release --prefix="${_pfx}" -Ddefault-terminfo=xterm-256color -Db_lto=true ../..
+ninja
+ninja test
+ninja install
+cd -
+
+# https://gitlab.gnome.org/GNOME/json-glib/
+# Needed for xdg-desktop-portal...
+if ! [ -d "$codedir/json-glib" ] ; then
+ git clone https://gitlab.gnome.org/GNOME/json-glib \
+ "$codedir/json-glib"
+fi
+cd "$codedir/json-glib"
+git checkout 1.10.8
+meson setup --reconfigure -Dprefix="${_pfx}" build
+meson compile -C build
+meson install -C build
+cd -
+
+# https://github.com/martinpitt/umockdev/
+# Needed for xdg-desktop-portal...
+if ! [ -d "$codedir/umockdev" ] ; then
+ git clone https://github.com/martinpitt/umockdev/ \
+ "$codedir/umockdev"
+fi
+cd "$codedir/umockdev"
+git checkout 0.19.4
+meson setup --reconfigure -Dprefix="${_pfx}" build
+meson compile -C build
+meson install -C build
+cd -
+
+# https://flatpak.github.io/xdg-desktop-portal/docs/building-and-running.html
+if ! [ -d "$codedir/xdg-desktop-portal" ] ; then
+ git clone https://github.com/flatpak/xdg-desktop-portal \
+ "$codedir/xdg-desktop-portal"
+fi
+cd "$codedir/xdg-desktop-portal"
+git checkout 1.20.3
+meson setup -Dtests=disabled -Dprefix="${_pfx}" _build
+meson compile -C _build
+meson install -C _build
+cd -
+
+if ! [ -d "$codedir/bemenu" ] ; then
+ git clone https://github.com/Cloudef/bemenu \
+ "$codedir/bemenu"
+fi
+cd "$codedir/bemenu"
+git checkout 0.6.23
+make clients
+make wayland
+make curses
+make install PREFIX=$RIVERWM_BASE
+cd -
+
+if ! [ -d "$codedir/waybar" ] ; then
+ git clone https://github.com/Alexays/Waybar \
+ "$codedir/waybar"
+fi
+cd "$codedir/waybar"
+git reset --hard HEAD
+git checkout 0.14.0
+mkdir -p build
+git apply - <<EOF
+diff --git a/meson.build b/meson.build
+index b3e6ca0f..30245c18 100644
+--- a/meson.build
++++ b/meson.build
+@@ -146,17 +146,6 @@ conf_data.set('prefix', prefix)
+
+ add_project_arguments('-DSYSCONFDIR="@0@"'.format(prefix / sysconfdir), language : 'cpp')
+
+-if systemd.found()
+- user_units_dir = systemd.get_variable(pkgconfig: 'systemduserunitdir')
+-
+- configure_file(
+- configuration: conf_data,
+- input: './resources/waybar.service.in',
+- output: '@BASENAME@',
+- install_dir: user_units_dir
+- )
+-endif
+-
+ src_files = files(
+ 'src/factory.cpp',
+ 'src/AModule.cpp',
+EOF
+cd -
+cd "$codedir/waybar/build"
+meson setup -Dprefix="${_pfx}" ..
+ninja
+ninja install
+cd -
+
+if ! [ -d "$codedir/swaylock" ] ; then
+ git clone https://github.com/swaywm/swaylock \
+ "$codedir/swaylock"
+fi
+cd "$codedir/swaylock"
+git checkout v1.8.4
+meson setup \
+ -Dzsh-completions=false \
+ -Dbash-completions=false \
+ -Dfish-completions=false \
+ -Dpam=disabled \
+ -Dprefix="${_pfx}" build
+meson compile -C build
+meson install -C build
+# Sadly this one is going to need some more permissions...
+sudo chown root "$RIVERWM_BASE"/bin/swaylock
+sudo chmod +s "$RIVERWM_BASE"/bin/swaylock
+cd -
+
+if ! [ -d "$codedir/grim" ] ; then
+ git clone https://gitlab.freedesktop.org/emersion/grim \
+ "$codedir/grim"
+fi
+cd "$codedir/grim"
+git checkout v1.5.0
+meson setup -Dprefix="${_pfx}" build
+meson compile -C build
+meson install -C build
+cd -
+
+if ! [ -d "$codedir/slurp" ] ; then
+ git clone https://github.com/emersion/slurp \
+ "$codedir/slurp"
+fi
+cd "$codedir/slurp"
+git checkout v1.5.0
+meson setup -Dprefix="${_pfx}" build
+meson compile -C build
+meson install -C build
+cd -
+
+
+zigver=0.15.2
+zigdir="$RIVERWM_BASE/zig/zig$zigver"
+zigout="${zigdir}.tar.xz"
+# zigurl="https://ziglang.org/download/$zigver/zig-linux-x86_64-$zigver.tar.xz"
+zigurl="https://ziglang.org/download/$zigver/zig-x86_64-linux-$zigver.tar.xz"
+zigsigurl="${zigurl}.minisig"
+zigkey="RWSGOq2NVecA2UPNdBUZykf1CCb147pkmdtYxgb3Ti+JO/wCYvhbAb/U"
+sudo yum -y install \
+ minisign \
+ scdoc \
+ wget \
+ xwayland-run
+mkdir -p "$(dirname "$zigdir")"
+cd "$(dirname "$zigdir")"
+if ! [ -d "$zigdir" ] ; then
+ wget -O "$zigout" "$zigurl"
+ wget -O "${zigout}.minisig" "$zigsigurl"
+ minisign -Vm "$zigout" -P "$zigkey"
+ mkdir "$zigdir"
+ cd -
+ cd "$zigdir"
+ tar --strip-components=1 -xJf "$zigout"
+fi
+export PATH="$zigdir:$PATH"
+cd -
+./bldRiver.sh
+# ./bldSession.sh
+./link.sh
+
+
+echo '######################################################################'
+echo "NOTICE:"
+echo '######################################################################'
+echo
+echo You will need to add $RIVERWM_BASE/bin to your PATH and
+echo $RIVERWM_BASE/lib64 to the LD_LIBRARY_PATH environment variable.
+echo
+echo gdm has issues with wlcustom, login to a VT and run:
+echo . ~/.waylandrc