jw-pkg/make/isolinux.mk

63 lines
1.4 KiB
Makefile
Raw Normal View History

2006-06-26 15:26:59 +00:00
# == defs
URL_BASE = http://www.kernel.org/pub/linux/utils/boot/syslinux
URL_FILE = SYSLINUX_URL
2012-02-04 11:06:22 +00:00
URL = $(shell $(CAT) $(URL_FILE))
DLOAD_DIR = /home/samba/dat/share/exe/linux/syslinux
BUILD_DIR = cd_root
DIRS = $(DLOAD_DIR) $(BUILD_DIR)
UNPACK_DIR = isolinux
ISO_IMAGE ?= image.iso
ISOLINUX_BIN = $(UNPACK_DIR)/isolinux.bin
MENU_32 = $(UNPACK_DIR)/com32/menu/menu.c32
INITRD = /boot/initrd
2006-06-26 15:26:59 +00:00
CD_FILES = \
$(MENU_32) \
$(ISOLINUX_BIN)
define SYSLINUX_BASE
2012-02-04 10:59:02 +00:00
$(notdir $(shell $(SED) 's/.tar.bz2$$//' $(URL_FILE)))
endef
2006-06-26 15:26:59 +00:00
# == targets
all: $(ISO_IMAGE)
install:
clean: syslinux.clean
2006-06-26 15:26:59 +00:00
distclean: clean
# == rules
syslinux.clean:
rm -rf *.done
rm -rf $(BUILD_DIR) $(UNPACK_DIR)
rm -f $(ISO_IMAGE) $(URL_FILE) $(URL_FILE).tmp
2006-06-26 15:26:59 +00:00
dirs.done:
mkdir -p $(DIRS)
touch $@
$(URL_FILE):
lynx -dump $(URL_BASE) | \
2012-02-04 10:59:02 +00:00
$(SED) '/syslinux-.*\.tar\.bz2$$/ !d; s/ .*http:/http:/' |\
tail -1 > $@.tmp
mv $@.tmp $@
dload.done: $(URL_FILE)
2012-02-04 11:06:22 +00:00
wget -c $(shell $(CAT) $<) -P $(DLOAD_DIR)
2006-06-26 15:26:59 +00:00
touch $@
$(MENU_32): unpack.done
unpack.done: $(URL_FILE) dload.done
2012-02-04 10:59:02 +00:00
tar -xjf $(shell echo $(DLOAD_DIR)/$(SYSLINUX_BASE).tar.bz2 | $(SED) 's/ //g')
mv $(SYSLINUX_BASE) $(UNPACK_DIR)
2006-06-26 15:26:59 +00:00
touch $@
GENERATE = /bin/bash $(MOD_SCRIPT_DIR)/generate-boot-medium.sh
BOOT_CONF = boot.conf
$(ISO_IMAGE): $(BOOT_CONF) dirs.done $(CD_FILES)
$(GENERATE) -o $@ -d $(BUILD_DIR) -f $< $(CD_FILES)
2006-06-26 15:26:59 +00:00