Code cleanup and terminfo bug removal

This commit is contained in:
Sebastian J. Bronner
2019-10-16 14:13:13 +02:00
parent c9eb9f5381
commit 559118ce7e
2 changed files with 23 additions and 15 deletions

View File

@@ -1,8 +1,8 @@
pkgbase = st pkgbase = st
pkgdesc = A simple virtual terminal emulator for X. pkgdesc = A simple virtual terminal emulator for X.
pkgver = 0.8.2 pkgver = 0.8.2
pkgrel = 6 pkgrel = 7
url = http://st.suckless.org url = https://st.suckless.org
arch = i686 arch = i686
arch = x86_64 arch = x86_64
arch = armv7h arch = armv7h
@@ -10,7 +10,7 @@ pkgbase = st
makedepends = libxext makedepends = libxext
makedepends = ncurses makedepends = ncurses
depends = libxft depends = libxft
source = http://dl.suckless.org/st/st-0.8.2.tar.gz source = https://dl.suckless.org/st/st-0.8.2.tar.gz
sha256sums = aeb74e10aa11ed364e1bcc635a81a523119093e63befd2f231f8b0705b15bf35 sha256sums = aeb74e10aa11ed364e1bcc635a81a523119093e63befd2f231f8b0705b15bf35
pkgname = st pkgname = st

View File

@@ -5,18 +5,24 @@
pkgname=st pkgname=st
pkgver=0.8.2 pkgver=0.8.2
pkgrel=6 pkgrel=7
pkgdesc='A simple virtual terminal emulator for X.' pkgdesc='A simple virtual terminal emulator for X.'
arch=('i686' 'x86_64' 'armv7h') arch=('i686' 'x86_64' 'armv7h')
license=('MIT') license=('MIT')
depends=(libxft) depends=(libxft)
makedepends=(libxext ncurses) makedepends=(libxext ncurses)
url="http://st.suckless.org" url=https://st.suckless.org
source=(http://dl.suckless.org/st/$pkgname-$pkgver.tar.gz) source=(https://dl.suckless.org/$pkgname/$pkgname-$pkgver.tar.gz)
sha256sums=('aeb74e10aa11ed364e1bcc635a81a523119093e63befd2f231f8b0705b15bf35') sha256sums=('aeb74e10aa11ed364e1bcc635a81a523119093e63befd2f231f8b0705b15bf35')
_makedir=$pkgname-$pkgver
_makeopts="--directory=$_makedir"
prepare() { 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 # This package provides a mechanism to provide a custom config.h. Multiple
# configuration states are determined by the presence of two files in # configuration states are determined by the presence of two files in
@@ -39,7 +45,7 @@ prepare() {
abort= abort=
if [ -e "$BUILDDIR/config.h" ] if [ -e "$BUILDDIR/config.h" ]
then then
cp "$BUILDDIR/config.h" "$pkgname-$pkgver" cp "$BUILDDIR/config.h" "$_makedir"
elif [ ! -e "$BUILDDIR/config.def.h" ] elif [ ! -e "$BUILDDIR/config.def.h" ]
then then
abort=1 abort=1
@@ -49,18 +55,20 @@ prepare() {
msg+='values. Then restart the build process.' msg+='values. Then restart the build process.'
error "$msg" error "$msg"
fi fi
cp "$pkgname-$pkgver/config.def.h" "$BUILDDIR" cp "$_makedir/config.def.h" "$BUILDDIR"
test -z "$abort" test -z "$abort"
} }
build() { build() {
cd $srcdir/$pkgname-$pkgver make $_makeopts X11INC=/usr/include/X11 X11LIB=/usr/lib/X11
make X11INC=/usr/include/X11 X11LIB=/usr/lib/X11
} }
package() { package() {
cd $srcdir/$pkgname-$pkgver local installopts='--mode 0644 -D --target-directory'
make PREFIX=/usr DESTDIR="$pkgdir" install local shrdir="$pkgdir/usr/share"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" local licdir="$shrdir/licenses/$pkgname"
install -Dm644 README "$pkgdir/usr/share/doc/$pkgname/README" local docdir="$shrdir/doc/$pkgname"
make $_makeopts PREFIX=/usr DESTDIR="$pkgdir" install
install $installopts "$licdir" "$_makedir/LICENSE"
install $installopts "$docdir" "$_makedir/README"
} }