Files
BMLFS/build-scripts/seatd.build

81 lines
2.4 KiB
Bash

#! /bin/bash
# seatd
# Source: https://git.sr.ht/~kennylevinsen/seatd/archive/0.8.0.tar.gz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: scdoc (for manpages)
# Recommended: NONE
# Optional: elogind
# If optimizing, use flags with GCC
export CFLAGS="-march=native -pipe "
export CFLAGS+="-O3 -ffat-lto-objects -flto=4 "
export CXXFLAGS=$CFLAGS
export LDFLAGS="-flto=4 -Wl,-O2 -Wl,--as-needed "
mkdir build && cd build &&
meson --prefix=/usr \
-Dlibseat-builtin=enabled \
-Dlibseat-logind=disabled \
-Dserver=enabled \
-Dman-pages=enabled \
-Dwerror=false ..
read -p "Compile?" && ninja -j2 &&
sudo -S DESTDIR=$BUILD ninja install &&
sudo mkdir -pv /BMAN/install
sudo mkdir -pv /BMAN/usr
sudo mv $BUILD/usr/share /BMAN/usr/
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------------------------------------------------------|
seatd: seatd
seatd:
seatd: A minimal seat management daemon, and a universal seat management
seatd: library. It can support elogind.
seatd:
seatd: Currently supports Linux, FreeBSD, and Alpha
seatd:
seatd: Homepage: https://git.sr.ht/~kennylevinsen/seatd
seatd:
seatd:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/seatd-0.8.0-$PSUFFIX &&
cp -v install/doinst.sh /tmp/ && \
cat >> /tmp/doinst.sh << "EOF"
groupadd -g 28 seat
EOF
sudo -S mv -v /tmp/doinst.sh install/doinst.sh && \
sudo -S makepkg -l y -c n $PKGS/seatd-0.8.0-$PSUFFIX && \
cd /BMAN
cat > /tmp/slack-desc << "EOF"
seatd-doc: Manuals for seatd
seatd-doc:
seatd-doc: A minimal seat management daemon, and a universal seat management
seatd-doc: library. It can support elogind.
seatd-doc:
seatd-doc: Currently supports Linux, FreeBSD, and Alpha
seatd-doc:
seatd-doc: Homepage: https://git.sr.ht/~kennylevinsen/seatd
seatd-doc:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/seatd-doc-0.7.0-$NOPSUFFIX
sudo -S rm -rf /BMAN/*
sudo -S rm -rf ${BUILD}/*