#!/usr/bin/make -f

include ../source.mk

nop:
	@:

build:
	oh-autobuild -T all
	touch $@

install: build
	oh-autoinstall
	install -m 0755 ../install-lilo.sh dest/sbin/install-lilo
	rm dest/etc/*/p*.d/* dest/etc/lilo.conf_example
	rm dest/boot/coffee.bmp dest/boot/debian*.bmp
	# Remove unneeded Perl and Bash scripts.
	set -e; \
	for script in keytab-lilo liloconfig lilo-uuid-diskid mkrescue; do \
		rm "dest/usr/sbin/$${script}"; \
		rm "dest/usr/share/man/man8/$${script}.8"; \
	done
	# Install package hooks.
	install -m 0755 -D ../kernel-postinst.sh \
		dest/etc/kernel/postinst.d/99-lilo
	install -m 0755 -D ../kernel-prerm.sh \
		dest/etc/kernel/prerm.d/99-lilo
	oh-fixperms
	oh-strip
	oh-installfiles