diff options
author | Sebastian J. Bronner <waschtl@sbronner.com> | 2019-10-16 14:13:13 +0200 |
---|---|---|
committer | Sebastian J. Bronner <waschtl@sbronner.com> | 2019-10-16 14:13:13 +0200 |
commit | 559118ce7ef613cdabc72e8f69ae862f60bfba15 (patch) | |
tree | e83dee263f1d47d88e248ab9fbe59421a29d675e /PKGBUILD | |
parent | c9eb9f5381f48a31621f38d9388c98458287cf97 (diff) |
Code cleanup and terminfo bug removal
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 32 |
1 files changed, 20 insertions, 12 deletions
@@ -5,18 +5,24 @@ pkgname=st pkgver=0.8.2 -pkgrel=6 +pkgrel=7 pkgdesc='A simple virtual terminal emulator for X.' arch=('i686' 'x86_64' 'armv7h') license=('MIT') depends=(libxft) makedepends=(libxext ncurses) -url="http://st.suckless.org" -source=(http://dl.suckless.org/st/$pkgname-$pkgver.tar.gz) +url=https://st.suckless.org +source=(https://dl.suckless.org/$pkgname/$pkgname-$pkgver.tar.gz) sha256sums=('aeb74e10aa11ed364e1bcc635a81a523119093e63befd2f231f8b0705b15bf35') +_makedir=$pkgname-$pkgver +_makeopts="--directory=$_makedir" prepare() { - sed '/@tic/d' -i $pkgname-$pkgver/Makefile + # Do not install terminfo files, as they conflict with ncurses. + sed -r \ + -e '/^[[:space:]]+tic\>/d' \ + -e '/^[[:space:]]+@echo .* terminfo/d' \ + -i $_makedir/Makefile # This package provides a mechanism to provide a custom config.h. Multiple # configuration states are determined by the presence of two files in @@ -39,7 +45,7 @@ prepare() { abort= if [ -e "$BUILDDIR/config.h" ] then - cp "$BUILDDIR/config.h" "$pkgname-$pkgver" + cp "$BUILDDIR/config.h" "$_makedir" elif [ ! -e "$BUILDDIR/config.def.h" ] then abort=1 @@ -49,18 +55,20 @@ prepare() { msg+='values. Then restart the build process.' error "$msg" fi - cp "$pkgname-$pkgver/config.def.h" "$BUILDDIR" + cp "$_makedir/config.def.h" "$BUILDDIR" test -z "$abort" } 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" install - install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" - install -Dm644 README "$pkgdir/usr/share/doc/$pkgname/README" + 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" "$_makedir/LICENSE" + install $installopts "$docdir" "$_makedir/README" } |