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
pkgdesc = A simple virtual terminal emulator for X.
pkgver = 0.8.2
pkgrel = 6
url = http://st.suckless.org
pkgrel = 7
url = https://st.suckless.org
arch = i686
arch = x86_64
arch = armv7h
@@ -10,7 +10,7 @@ pkgbase = st
makedepends = libxext
makedepends = ncurses
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
pkgname = st

View File

@@ -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"
}