summaryrefslogtreecommitdiff
path: root/PKGBUILD
diff options
context:
space:
mode:
authorMichaël Ball <michael@michaelball.name>2020-06-10 21:59:46 +0100
committerMichaël Ball <michael@michaelball.name>2020-06-10 21:59:46 +0100
commit4acfe329f64d92667da691e86e3804ad66843525 (patch)
tree6a377880f065dc0fbd2bab6f68cdb9c49346038b /PKGBUILD
parentdd6db0e1a307c8ff845fa24715ea0624eec599cd (diff)
parent9e75dfb7c30e78bfefc0fe70730442a2c8bafbd0 (diff)
Merge branch 'master' into base16-synth-midnight
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD72
1 files changed, 55 insertions, 17 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 8d3a2c3..ce8e249 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,34 +1,72 @@
# 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.2
-pkgrel=2
+pkgver=0.8.3
+pkgrel=1
pkgdesc='A simple virtual terminal emulator for X.'
arch=('i686' 'x86_64' 'armv7h')
license=('MIT')
-depends=('libxft' 'libxext' 'xorg-fonts-misc')
-makedepends=('ncurses')
-url="http://st.suckless.org"
-source=(http://dl.suckless.org/st/$pkgname-$pkgver.tar.gz config.h)
-sha256sums=('aeb74e10aa11ed364e1bcc635a81a523119093e63befd2f231f8b0705b15bf35' 'SKIP')
+depends=(libxft)
+url=https://st.suckless.org
+source=(https://dl.suckless.org/$pkgname/$pkgname-$pkgver.tar.gz
+ terminfo.patch
+ README.terminfo.rst)
+sha256sums=(939ae3da237e7c9489694853c205c7cbd5f2a2f0c17fe41a07477f1df8e28552
+ f9deea445a5c6203a0e8e699f3c3b55e27275f17fb408562c4dd5d649edeea23
+ 0ebcbba881832adf9c98ce9fe7667c851d3cc3345077cb8ebe32702698665be2)
+_sourcedir=$pkgname-$pkgver
+_makeopts="--directory=$_sourcedir"
prepare() {
- # user is supposed to maintain config.h him/herself
- cp $srcdir/config.h $srcdir/$pkgname-$pkgver/config.h
+ 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() {
- cd $srcdir/$pkgname-$pkgver
- make X11INC=/usr/include/X11 X11LIB=/usr/lib/X11
+ make $_makeopts X11INC=/usr/include/X11 X11LIB=/usr/lib/X11
}
package() {
- cd $srcdir/$pkgname-$pkgver
- make PREFIX=/usr DESTDIR="$pkgdir" TERMINFO="$pkgdir/usr/share/terminfo" install
- install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
- install -Dm644 README "$pkgdir/usr/share/doc/$pkgname/README"
- # remove to avoid conflict with ncurses
- rm "${pkgdir}/usr/share/terminfo/s/st" "${pkgdir}/usr/share/terminfo/s/st-256color"
+ 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"
}