summaryrefslogtreecommitdiff
path: root/PKGBUILD
blob: 258dea3b62a039baa56a47e87223b85cc8550752 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Contributor: Patrick Jackson <PatrickSJackson gmail com>
# Maintainer: Christoph Vigano <mail@cvigano.de>

pkgname=st
pkgver=0.7
pkgrel=1
pkgdesc='A simple virtual terminal emulator for X.'
arch=('i686' 'x86_64')
license=('MIT')
depends=('libxft' 'libxext' 'xorg-fonts-misc')
makedepends=('ncurses')
url="http://st.suckless.org"
source=(http://dl.suckless.org/st/$pkgname-$pkgver.tar.gz
        config.h)
md5sums=('29b2a599cf1511c8062ed8f025c84c63'
         '9cb789e3912df36f296a219e1b9da850')

prepare() {
  cd $srcdir/$pkgname-$pkgver
  # skip terminfo which conflicts with nsurses
  sed -i '/\@tic /d' Makefile
  cp $srcdir/config.h config.h
}

build() {
  cd $srcdir/$pkgname-$pkgver
  make X11INC=/usr/include/X11 X11LIB=/usr/lib/X11
}

package() {
  cd $srcdir/$pkgname-$pkgver
  make PREFIX=/usr DESTDIR="$pkgdir" TERMINFO="$pkgdir/usr/share/terminfo" install
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  install -Dm644 README "$pkgdir/usr/share/doc/$pkgname/README"
}
fig.def.h only: The user was previously made aware of the # configuration options and has opted not to make any configuration # changes. The package is built using default values. # * neither file: Initial state. The user receives a message on how to # configure this package. The build process is aborted after the copy # operation below. # # After this test, config.def.h is copied from $srcdir to provide an up to # date template for the user. If neither file was present initially, further # build steps are aborted at this point. Even if no config.h is provided, # future runs will proceed with default values due to the presence of # config.def.h. abort= if [ -e "$BUILDDIR/config.h" ] then cp "$BUILDDIR/config.h" "$_makedir" elif [ ! -e "$BUILDDIR/config.def.h" ] then abort=1 msg='This package can be configured in config.h. Copy config.def.h just ' msg+='placed into the package directory to config.h and modify it to ' msg+='change the configuration. Or just leave it alone to use default ' msg+='values. Then restart the build process.' error "$msg" fi cp "$_makedir/config.def.h" "$BUILDDIR" test -z "$abort" } build() { make $_makeopts X11INC=/usr/include/X11 X11LIB=/usr/lib/X11 } package() { 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" }