mirror of
https://github.com/dslm4515/BMLFS.git
synced 2025-08-10 02:45:15 +00:00
76 lines
2.9 KiB
Bash
76 lines
2.9 KiB
Bash
#! /bin/bash
|
|
|
|
# GPM
|
|
# Source: http://anduin.linuxfromscratch.org/BLFS/gpm/gpm-1.20.7.tar.bz2
|
|
#
|
|
# $BUILD = Directory to temporarily install
|
|
# $PKGS = Directory to store built packages
|
|
#
|
|
# DEPS
|
|
# Required: NONE
|
|
# Recommended: NONE
|
|
# Optional: NONE
|
|
|
|
patch -Np0 -i ../patches/gpm-void/musl-fcntl.patch &&
|
|
patch -Np0 -i ../patches/gpm-void/musl-gpm_h.patch &&
|
|
patch -Np0 -i ../patches/gpm-void/musl-linux_major_h.patch &&
|
|
patch -Np0 -i ../patches/gpm-void/musl-select.patch &&
|
|
patch -Np0 -i ../patches/gpm-void/musl-sigaction.patch &&
|
|
patch -Np1 -i ../patches/gpm-mlfs/utmpx-support.patch &&
|
|
|
|
./autogen.sh &&
|
|
export CFLAGS="-fcommon" &&
|
|
./configure --prefix=/usr --sysconfdir=/etc $BUILDTRUPLE &&
|
|
|
|
# fix generated man page source:
|
|
patch -Np1 -i ../patches/gpm-mlfs/fix-doc.patch
|
|
|
|
read -p "Compile?" && make -j2 &&
|
|
|
|
sudo -S make DESTDIR=$BUILD install &&
|
|
sudo -S install-info --dir-file=/usr/share/info/dir \
|
|
${BUILD}/usr/share/info/gpm.info &&
|
|
sudo -S mkdir -pv ${BUILD}/usr/lib &&
|
|
sudo -S ln -sfv libgpm.so.2.1.0 ${BUILD}/usr/lib/libgpm.so &&
|
|
sudo -S install -v -m755 -d ${BUILD}/usr/share/doc/gpm-1.20.7/support &&
|
|
sudo -S install -v -m644 doc/support/* \
|
|
${BUILD}/usr/share/doc/gpm-1.20.7/support &&
|
|
sudo -S install -v -m644 doc/{FAQ,HACK_GPM,README*} \
|
|
${BUILD}/usr/share/doc/gpm-1.20.7 &&
|
|
sudo -S mkdir /BMAN/install /BMAN/usr && \
|
|
sudo -S mv $BUILD/usr/share /BMAN/usr/ && \
|
|
unset CFLAGS
|
|
|
|
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------------------------------------------------------|
|
|
gpm: gpm (general purpose mouse server)
|
|
gpm:
|
|
gpm: The general purpose mouse server, or gpm, allows you to use the mouse
|
|
gpm: to cut and paste text from the screen. It also acts as a mouse
|
|
gpm: server for applications running on the Linux console, such as the
|
|
gpm: Midnight Commander file manager.
|
|
gpm:
|
|
EOF
|
|
sudo -S mv -v /tmp/slack-desc install/ &&
|
|
sudo -S makepkg -l y -c n $PKGS/gpm-1.20.7-$(uname -m)-mlfs.txz && \
|
|
cd /BMAN && \
|
|
cat > /tmp/slack-desc << "EOF"
|
|
gpm-doc: Documentation for GPM
|
|
gpm-doc:
|
|
gpm-doc: The general purpose mouse server, or gpm, allows you to use the mouse
|
|
gpm=doc: to cut and paste text from the screen. It also acts as a mouse
|
|
gpm-doc: server for applications running on the Linux console.
|
|
gpm-doc:
|
|
EOF
|
|
sudo -S mv -v /tmp/slack-desc install/ && \
|
|
sudo -S makepkg -l y -c n $PKGS/gpm-doc-1.20.7-noarch-mlfs.txz && \
|
|
sudo -S rm -rf ${BUILD}/* /BMAN/*
|