summaryrefslogtreecommitdiff
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD32
1 files changed, 20 insertions, 12 deletions
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"
}