# Maintainer: Jesus E. pkgname=st pkgver=0.9.2 pkgrel=1 pkgdesc="A simple virtual terminal emulator for X" arch=('i686' 'x86_64') url='https://st.suckless.org' license=('Expat') depends=('libxft' 'ttf-liberation') source=(https://dl.suckless.org/$pkgname/$pkgname-$pkgver.tar.gz terminfo.patch) sha512sums=('1ca484227189d9e92ffc1092183fdc6a162da8bb41b9c18df662212d49a9551a84c3c87784ae16f2294105776b9d58983f29396bc681e367b761610bd7071b61' '59b793b0fee6bc7048d31ddd981e8d4805d7c72833a4fae109f64f2f8dea06f8b9f67ec18567c445c2a6f5e892be95abc563bd0f86924500ed624c8c25cf8aba') _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" } 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 "$shrdir/$pkgname" "$_sourcedir/st.info" }