Files
st/PKGBUILD
Alexander Weidinger 05d92d8e48 Update to 0.8.3
2020-04-30 01:11:17 +02:00

87 lines
3.6 KiB
Bash

# Maintainer: Jose Riha <jose1711 gmail com>
# Maintainer: Sebastian J. Bronner <waschtl@sbronner.com>
# Contributor: Patrick Jackson <PatrickSJackson gmail com>
# Contributor: Christoph Vigano <mail@cvigano.de>
pkgname=st
pkgver=0.8.3
pkgrel=1
pkgdesc='A simple virtual terminal emulator for X.'
arch=('i686' 'x86_64' 'armv7h')
license=('MIT')
depends=(libxft)
url=https://st.suckless.org
source=(https://dl.suckless.org/$pkgname/$pkgname-$pkgver.tar.gz
config.h
https://st.suckless.org/patches/nordtheme/st-nordtheme-0.8.2.diff
https://st.suckless.org/patches/scrollback/st-scrollback-20200419-72e3f6c.diff
https://st.suckless.org/patches/scrollback/st-scrollback-mouse-20191024-a2c479c.diff
terminfo.patch
README.terminfo.rst)
sha256sums=('939ae3da237e7c9489694853c205c7cbd5f2a2f0c17fe41a07477f1df8e28552'
'e142793fc958f724e8e5867688d53f83c48cab7a5fe8a695568ccb2c79e23047'
'01de8a6d0d855c31496c7963e78edb7565a81b60dcb9e9f00dd3eab1f43b526b'
'1e41fe17a5ef5a8194eea07422b49d815e2c2bb4d58d84771f793be423005310'
'319458d980195d18fa0f81a6898d58f8d046c5ff982ab872d741f54bb60e267d'
'f9deea445a5c6203a0e8e699f3c3b55e27275f17fb408562c4dd5d649edeea23'
'0ebcbba881832adf9c98ce9fe7667c851d3cc3345077cb8ebe32702698665be2')
_sourcedir=$pkgname-$pkgver
_makeopts="--directory=$_sourcedir"
prepare() {
patch --directory="$_sourcedir" --strip=0 < terminfo.patch
# This package provides a mechanism to provide a custom config.h. Multiple
# configuration states are determined by the presence of two files in
# $BUILDDIR:
#
# config.h config.def.h state
# ======== ============ =====
# absent absent Initial state. The user receives a message on how
# to configure this package.
# absent present The user was previously made aware of the
# configuration options and has not made any
# configuration changes. The package is built using
# default values.
# present The user has supplied his or her configuration. The
# file will be copied to $srcdir and used during
# build.
#
# After this test, config.def.h is copied from $srcdir to $BUILDDIR to
# provide an up to date template for the user.
if [ -e "$BUILDDIR/config.h" ]
then
cp "$BUILDDIR/config.h" "$_sourcedir"
elif [ ! -e "$BUILDDIR/config.def.h" ]
then
msg='This package can be configured in config.h. Copy the config.def.h '
msg+='that was just placed into the package directory to config.h and '
msg+='modify it to change the configuration. Or just leave it alone to '
msg+='continue to use default values.'
warning "$msg"
fi
cp "$_sourcedir/config.def.h" "$BUILDDIR"
# apply patches
cd $srcdir/$pkgname-$pkgver/
patch -p1 config.h < $srcdir/st-nordtheme-0.8.2.diff
patch -p1 < $srcdir/st-scrollback-20200419-72e3f6c.diff
patch -p1 < $srcdir/st-scrollback-mouse-20191024-a2c479c.diff
}
build() {
make $_makeopts X11INC=/usr/include/X11 X11LIB=/usr/lib/X11
}
package() {
local installopts='--mode 0644 -D --target-directory'
local shrdir="$pkgdir/usr/share"
local licdir="$shrdir/licenses/$pkgname"
local docdir="$shrdir/doc/$pkgname"
make $_makeopts PREFIX=/usr DESTDIR="$pkgdir" install
install $installopts "$licdir" "$_sourcedir/LICENSE"
install $installopts "$docdir" "$_sourcedir/README"
install $installopts "$docdir" README.terminfo.rst
install $installopts "$shrdir/$pkgname" "$_sourcedir/st.info"
}