Files
BMLFS/build-scripts/xkeyboard-config.build
2024-06-02 13:13:11 -05:00

72 lines
3.0 KiB
Bash

#! /bin/bash
# Xkeyboard Config
# Source: https://www.x.org/pub/individual/data/xkeyboard-config/xkeyboard-config-2.41.tar.xz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: NONE
# Recommended: Xorg-Libraries
# Optional: Doxygen
# If optimizing, use flags with GCC
export CFLAGS="-march=native -pipe "
export CFLAGS+="-O3 -ffat-lto-objects -flto=4 "
export LDFLAGS="-flto=4 -Wl,-O2 -Wl,--as-needed "
# If building with Xorg Libraries:
meson setup --prefix=$XORG_PREFIX --buildtype=release OUT
# Without Xorg:
meson --prefix=/usr --buildtype=release OUT
read -p "Compile?" && ninja -j2 -C OUT &&
sudo -S DESTDIR=$BUILD ninja -C OUT install &&
sudo -S mkdir -pv /BMAN/install
sudo -S mkdir -pv /BMAN/$XORG_PREFIX/share
sudo -S mv $BUILD/$XORG_PREFIX/share/man /BMAN/$XORG_PREFIX/share/
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------------------------------------------------------|
xkeyboard-config: xkeyboard-config (X Keyboard Extension config files)
xkeyboard-config:
xkeyboard-config: The X Keyboard Extension essentially replaces the core protocol
xkeyboard-config: definition of keyboard. The extension makes possible to clearly and
xkeyboard-config: explicitly specify most aspects of keyboard behaviour on per-key
xkeyboard-config: basis and to more closely track the logical and physical state of the
xkeyboard-config: keyboard. It also includes a number of keyboard controls designed to
xkeyboard-config: make keyboards more accessible to people with physical impairments.
xkeyboard-config:
xkeyboard-config:
xkeyboard-config:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/xkeyboard-config-2.41-$NOPSUFFIX &&
cd /BMAN
cat > /tmp/slack-desc << "EOF"
xkeyboard-config-doc: Manual for xkeyboard-config (X Keyboard Extension config files)
xkeyboard-config-doc:
xkeyboard-config-doc: The X Keyboard Extension essentially replaces the core protocol
xkeyboard-config-doc: definition of keyboard. The extension makes possible to clearly and
xkeyboard-config-doc: explicitly specify most aspects of keyboard behaviour on per-key
xkeyboard-config-doc: basis and to more closely track the logical and physical state of the
xkeyboard-config-doc: keyboard. It also includes a number of keyboard controls designed to
xkeyboard-config-doc: make keyboards more accessible to people with physical impairments.
xkeyboard-config-doc:
xkeyboard-config-doc:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/xkeyboard-config-doc-2.41-$NOPSUFFIX
sudo -S rm -rf /BMAN/
sudo -S rm -rf ${BUILD}/*