#Maintainer: Thorsten Muehlfelder <thenktor(at)gmx.de>

pkgname=lilo
pkgver=22.8
pkgrel=9tm
arch=i486
source=("ftp://ftp.slackware.at/slackware-current/slackware/a/lilo-$pkgver-$arch-14.txz" "http://thenktor.dyndns.org/packages/$pkgname/salix.bmp" "http://thenktor.dyndns.org/packages/$arch/a/$pkgname/liloconfig")

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"$pkgname (Linux Loader)"
"Generic Boot Loader for Linux ('LInux LOader') by Werner Almesberger."
"LILO boots Linux from your hard drive. It can also boot other"
"operating systems such as MS-DOS and OS/2, and can even boot DOS from"
"the second hard drive. LILO comes with utilities and documentation"
"that make it easier to install, such as 'liloconfig' and 'QuickStart'."
"NOTE: Installing boot loaders is inherently dangerous. Be sure to have"
"some means to boot your system from a different media if you install"
"LILO on your hard disk."
)

build() {
	cd $startdir/src/
	#
	# just take the slackware package and add our own background bitmap and settings
	#

	# background bitmap
	mv salix.bmp boot/ || return 1
	rm boot/slack.bmp

	# liloconfig
	mv liloconfig sbin/ || return 1
	chmod 755 sbin/liloconfig

	## tweak some lilo default settings in original liloconfig
	#sed -i s/slack.bmp/salix.bmp/g sbin/liloconfig
	#sed -i s/bmp-timer\ =\ .*/bmp-timer\ =\ 65,29,0,255/ sbin/liloconfig
	#sed -i s/bmp-colors\ =\ .*/bmp-colors\ =\ 255,20,255,20,255,20/ sbin/liloconfig
	#sed -i s/timeout\ =\ .*/timeout\ =\ 50/ sbin/liloconfig
	#sed -i s/APPEND=\"/APPEND=\"quiet\ / sbin/liloconfig

	# mv everything to the new package
	mv boot install sbin var $startdir/pkg/
	mv usr/* $startdir/pkg/usr/
}