Files
BMLFS/build-scripts/upower.build
2023-12-21 23:22:28 -06:00

65 lines
2.3 KiB
Bash

#! /bin/bash
# UPower
# Source: https://gitlab.freedesktop.org/upower/upower/-/archive/v1.90.2/upower-v1.90.2.tar.bz2
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: libgudev libusb
# Recommended: gobject-introspection
# Optional: GTK-Doc PyGObject dbusmock umockdev(for part of the test suite) libimobiledevice
#./configure --prefix=/usr \
# --sysconfdir=/etc \
# --localstatedir=/var \
# --enable-deprecated \
# --disable-static $BT
# Per BLFS, remove an unneeded dependency from a test
sed '/parse_version/d' -i src/linux/integration-test.py
meson setup --prefix=/usr --buildtype=release \
-Dgtk-doc=false -Dman=false \
-Dos_backend=linux \
-Dsystemdsystemunitdir=no \
-Dintrospection=enabled \
-Dudevrulesdir=/usr/lib/udev/rules.d OUT
read -p "Compile?" && ninja -C OUT -j2 &&
sudo -S DESTDIR=$BUILD ninja -C OUT install &&
sudo -S mkdir -pv /BMAN/install /BMAN/usr/share && \
sudo -S mv $BUILD/usr/share/man /BMAN/usr/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------------------------------------------------------|
upower: UPower
upower:
upower: This provides an interface for enumerating power devices, listening
upower: to device events and querying history and statistics
upoeer:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/upower-1.90.2-$PSUFFIX && \
cd /BMAN && \
cat > /tmp/slack-desc << "EOF"
upower-doc: Manuals for UPower
upower-doc:
upower-doc: An interface for enumerating power devices, listening to device events
upower-doc: and querying history and statistics
upower-doc:
EOF
sudo -S mv -v /tmp/slack-desc install/ && \
sudo -S makepkg -l y -c n $PKGS/upower-doc-1.90.2-$NOPSUFFIX && \
sudo -S rm -rf ${BUILD}/* /BMAN/*