# $Id: PKGBUILD 189480 2013-07-03 11:36:49Z dreisner $
# Maintainer: Dave Reisner <dreisner@archlinux.org>
# Maintainer: Andreas Radke <andyrtr@archlinux.org>

pkgname=ed
pkgver=1.9
pkgrel=1
pkgdesc="A POSIX-compliant line-oriented text editor"
arch=('i686' 'x86_64')
license=('GPL')
url="http://www.gnu.org/software/ed/ed.html"
depends=('glibc' 'sh')
options=('!emptydirs')
source=("ftp://ftp.gnu.org/gnu/ed/$pkgname-$pkgver.tar.gz"{,.sig})
install='ed.install'
md5sums=('565b6d1d5a9a8816b9b304fc4ed9405d'
         'SKIP')

build() {
  cd "$pkgname-$pkgver"

  ./configure --prefix=/ \
              --bindir=/usr/bin \
              --mandir=/usr/share/man \
              --infodir=/usr/share/info \
              "CFLAGS=$CFLAGS" \
              "LDFLAGS=$LDFLAGS"

  make
}

check() {
  make -C "$pkgname-$pkgver" check
}

package() {
  make -C "$pkgname-$pkgver" "DESTDIR=$pkgdir" install
}