# Install/upgrade Python pip and Meson as root
# (or whatever virtual environment way you normally do)
su
python3 -m pip install --upgrade pip
pip3 install --upgrade meson
exit
# Get the source tarball
cd
test -f installed/raqm-0.10.1.tar.xz &&
mv -f installed/raqm-0.10.1.tar.xz .
test ! -f raqm-0.10.1.tar.xz &&
wget https://github.com/HOST-Oman/libraqm/releases/download/v0.10.1/\
raqm-0.10.1.tar.xz
# Extract the source
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "raqm-*" -exec rm -r {} \;
tar xJvf ~/raqm-0.10.1.tar.xz
cd raqm-0.10.1
test $UID = 0 && chown -R root:root .
# Create a build directory
mkdir build
cd build
# Make it a Meson build directory
meson setup .. .
# List configuration options, if you need to change anything
# It should already know to use lib64 if 64-bit
meson configure
# Change some options
meson configure -Dprefix=/usr -Dinfodir=info -Dmandir=man -Dsysconfdir=/etc
# Build it
ninja
# Test the build
ninja test
# Become root to install it
su
# Install it
ninja install
ldconfig
# Become your non-root user again
exit
# Save the source for later
cd
mkdir -p -m 0700 installed
rm -f installed/raqm-*.tar.*
mv raqm-0.10.1.tar.xz installed/
# If you ever want to uninstall Raqm, this should do it:
cd
su
test -d src/raqm-* && ( cd src/raqm-* ; make uninstall )
( cd /usr/include
rm -f raqm.h raqm-version.h )
test -d /usr/lib64 &&
( cd /usr/lib64
rm -f libraqm.* pkgconfig/raqm.pc )
test -d /usr/share/gtk-doc/html/raqm &&
rm -r /usr/share/gtk-doc/html/raqm
rm -f /usr/lib/libraqm.* /usr/lib/pkgconfig/raqm.pc
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "raqm-*" -exec rm -r {} \;
rm -f ~/installed/raqm-*.tar.*