foodotfiles/suckless/st/PKGBUILD

65 lines
1.7 KiB
Bash
Raw Normal View History

# Maintainer: Marko Korhonen <reekymarko@reekynet.com>
pkgname=reeky-st
appname='st'
conflicts=(${appname})
provides=(${appname})
pkgver=0.8
pkgrel=0
pkgdesc='A simple virtual terminal emulator for X. My personal config.'
arch=('i686' 'x86_64')
license=('MIT')
depends=('libxext' 'libxft')
makedepends=('ncurses')
url="http://st.suckless.org"
_patches=(
"https://st.suckless.org/patches/scrollback/$appname-scrollback-$pkgver.diff"
"https://st.suckless.org/patches/scrollback/$appname-scrollback-mouse-$pkgver.diff"
"https://st.suckless.org/patches/scrollback/$appname-scrollback-mouse-altscreen-$pkgver.diff"
)
source=(
"http://dl.suckless.org/st/$appname-$pkgver.tar.gz"
"config.h"
"st.desktop"
"${_patches[@]}"
)
md5sums=('4cae10d2dcc1f97ead37181b21b54212'
'e89bc7a7aa2beb6bc7a43597e2f562cc'
'a984de398f12717f0144b9a2bd2953ed'
'bbe056eaed5914f55ccea001ca7f05e9'
'72227737f6cd831afd014a3613bd559d'
'fa0bf6c0dae5a69e3b1916ce093f6aff')
prepare() {
cd $srcdir/$appname-$pkgver
for patch in "${_patches[@]}"; do
echo "Applying patch $(basename $patch)..."
patch -Np1 -i "$srcdir/$(basename $patch)"
done
# skip terminfo which conflicts with nsurses
sed -i '/tic /d' Makefile
cp $srcdir/config.h config.h
}
build() {
cd $srcdir/$appname-$pkgver
make X11INC=/usr/include/X11 X11LIB=/usr/lib/X11
}
package() {
cd $srcdir/$appname-$pkgver
make PREFIX=/usr DESTDIR="$pkgdir" TERMINFO="$pkgdir/usr/share/terminfo" install
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$appname/LICENSE"
install -Dm644 README "$pkgdir/usr/share/doc/$appname/README"
mkdir "$pkgdir/usr/share/applications"
install -m755 "$srcdir/st.desktop" "$pkgdir/usr/share/applications/st.desktop"
}