summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian J. Bronner <waschtl@sbronner.com>2019-10-16 14:13:13 +0200
committerSebastian J. Bronner <waschtl@sbronner.com>2019-10-16 14:13:13 +0200
commit559118ce7ef613cdabc72e8f69ae862f60bfba15 (patch)
treee83dee263f1d47d88e248ab9fbe59421a29d675e
parentc9eb9f5381f48a31621f38d9388c98458287cf97 (diff)
Code cleanup and terminfo bug removal
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD32
2 files changed, 23 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 620cc42..ff171f7 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -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
diff --git a/PKGBUILD b/PKGBUILD
index 8a0056e..7ad8f2e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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"
}