# $Id: PKGBUILD 58333 2009-11-07 03:56:18Z eric $
# Maintainer: Eric Belanger <eric@archlinux.org>
# Contributor: judd <jvinet@zeroflux.org>

pkgname=lilo
pkgver=22.8
pkgrel=4
pkgdesc="A bootloader for Linux"
arch=('i686' 'x86_64')
url="ftp://metalab.unc.edu/pub/Linux/system/boot/lilo/!INDEX.html"
license=('BSD')
# While lilo should stay in the base category,
# it usually makes no sense if it is installed
# with pacman -S base, therefore, don't add
# the base group here.
#groups=('base')
backup=('etc/lilo.conf')
depends=('device-mapper' 'coreutils')
makedepends=('bin86')
install=lilo.install
options=('!makeflags')
source=(ftp://metalab.unc.edu/pub/Linux/system/boot/lilo/lilo-${pkgver}.src.tar.gz \
	lilo.conf fix_lilo_dm.patch)
md5sums=('72765f2aafd20e23ecf07ebd22baeec7' 'a3a4c90bead3f9b8672bd384ff9f8db1'\
         'd82cd0a08b89782261e534a81b82bb88')
sha1sums=('59852eab59b93dcea63b39eef1db7963b7268b0d' '9ca31ef52ae0a29269c608f9470fb9341bb38f2e'\
         '4d2ce83a1bf50fb18594713e4c15bce6e6149b6f')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  patch -p1 < ../fix_lilo_dm.patch || return 1
  LANG=en_US
  make all || return 1
  make ROOT="${pkgdir}" MAN_DIR=/usr/share/man install || return 1
  install -D -m644 "${srcdir}/lilo.conf" "${pkgdir}/etc/lilo.conf" || return 1
  install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" || return 1
}
