2009-01-24 00:19:36 +01:00
|
|
|
ver=2009.01-1
|
2009-01-18 02:09:55 +01:00
|
|
|
kver=2.6.28-ARCH
|
2008-10-21 06:41:54 +02:00
|
|
|
|
2008-12-19 05:08:38 +01:00
|
|
|
WORKDIR=work
|
|
|
|
|
2008-12-21 09:20:56 +01:00
|
|
|
ARCH?=i686
|
|
|
|
BOOTLOADER?=grub-gfx
|
|
|
|
|
|
|
|
PWD:=`pwd`
|
|
|
|
FTPname:=$(PWD)/archlinux-$(ver)-ftp-$(ARCH)
|
|
|
|
COREname:=$(PWD)/archlinux-$(ver)-core-$(ARCH)
|
2009-01-25 00:58:26 +01:00
|
|
|
FALLBACKname=$(PWD)/archlinux-$(ver)-ftp-$(ARCH)-isolinux
|
2008-12-21 09:20:56 +01:00
|
|
|
|
|
|
|
PACKAGES="`cat packages.list` $(BOOTLOADER)"
|
2008-09-07 03:39:35 +02:00
|
|
|
|
2009-01-25 00:58:26 +01:00
|
|
|
all: ftp-iso ftp-usb core-iso core-usb fallback
|
2008-12-24 05:11:32 +01:00
|
|
|
all-iso: ftp-iso core-iso
|
|
|
|
all-usb: ftp-usb core-usb
|
2008-12-23 08:36:38 +01:00
|
|
|
all-ftp: ftp-iso ftp-usb
|
|
|
|
all-core: core-iso core-usb
|
2008-09-07 03:39:35 +02:00
|
|
|
|
2008-12-19 09:02:00 +01:00
|
|
|
core-usb: core-pkgs overlay $(BOOTLOADER)
|
2008-12-23 23:49:35 +01:00
|
|
|
mkarchiso -f -p $(BOOTLOADER) usb $(WORKDIR) $(COREname).img
|
2008-09-07 03:39:35 +02:00
|
|
|
|
2008-12-19 09:02:00 +01:00
|
|
|
core-iso: core-pkgs overlay $(BOOTLOADER)
|
2008-12-23 23:49:35 +01:00
|
|
|
mkarchiso -f -p $(BOOTLOADER) iso $(WORKDIR) $(COREname).iso
|
2008-09-07 03:39:35 +02:00
|
|
|
|
2008-12-19 09:02:00 +01:00
|
|
|
ftp-usb: overlay $(BOOTLOADER)
|
2008-12-23 09:02:31 +01:00
|
|
|
mkarchiso -f -p $(BOOTLOADER) usb $(WORKDIR) $(FTPname).img
|
2008-09-07 03:39:35 +02:00
|
|
|
|
2008-12-19 09:02:00 +01:00
|
|
|
ftp-iso: overlay $(BOOTLOADER)
|
2008-12-23 09:02:31 +01:00
|
|
|
mkarchiso -f -p $(BOOTLOADER) iso $(WORKDIR) $(FTPname).iso
|
2008-09-07 03:39:35 +02:00
|
|
|
|
2008-12-19 05:08:38 +01:00
|
|
|
overlay: base-iso
|
|
|
|
cp -r overlay $(WORKDIR)/
|
2009-01-25 00:59:22 +01:00
|
|
|
sed -i "s|@ARCH@|$(ARCH)|g" "$(WORKDIR)/overlay/etc/pacman.d/mirrorlist"
|
2008-09-07 03:39:35 +02:00
|
|
|
|
2008-10-21 06:41:54 +02:00
|
|
|
root-image:
|
2008-12-23 07:53:16 +01:00
|
|
|
mkarchiso -p $(PACKAGES) create $(WORKDIR)
|
2008-12-19 05:08:38 +01:00
|
|
|
|
|
|
|
base-iso: root-image
|
|
|
|
mv $(WORKDIR)/root-image/boot $(WORKDIR)/iso/
|
|
|
|
cp -r boot-files/* $(WORKDIR)/iso/boot/
|
2008-12-21 09:20:56 +01:00
|
|
|
cp isomounts $(WORKDIR)
|
2008-12-24 19:27:42 +01:00
|
|
|
sed -i "s|@ARCH@|$(ARCH)|g" "$(WORKDIR)/isomounts"
|
2008-12-19 05:08:38 +01:00
|
|
|
|
2008-12-21 09:20:56 +01:00
|
|
|
mkinitcpio -c initcpio-ide -b $(WORKDIR)/root-image -k $(kver) -g $(WORKDIR)/iso/boot/archiso_ide.img
|
|
|
|
mkinitcpio -c initcpio-pata -b $(WORKDIR)/root-image -k $(kver) -g $(WORKDIR)/iso/boot/archiso_pata.img
|
2008-12-19 05:08:38 +01:00
|
|
|
|
2009-01-25 00:58:26 +01:00
|
|
|
fallback:
|
|
|
|
#Build the fallback ISO (isolinux) in a separate workdir
|
|
|
|
#root-image
|
|
|
|
mkarchiso -p "`cat packages.list` syslinux" create $(WORKDIR)-fallback
|
|
|
|
#base-iso
|
|
|
|
mv $(WORKDIR)-fallback/root-image/boot $(WORKDIR)-fallback/iso/
|
|
|
|
cp -r boot-files/* $(WORKDIR)-fallback/iso/boot/
|
|
|
|
#ugh... copied from syslinux rule
|
|
|
|
cp -r $(WORKDIR)-fallback/root-image/usr/lib/syslinux/isolinux.bin $(WORKDIR)-fallback/iso/boot/isolinux
|
|
|
|
cp isomounts $(WORKDIR)-fallback
|
|
|
|
sed -i "s|@ARCH@|$(ARCH)|g" "$(WORKDIR)-fallback/isomounts"
|
|
|
|
|
|
|
|
mkinitcpio -c initcpio-ide -b $(WORKDIR)-fallback/root-image -k $(kver) -g $(WORKDIR)-fallback/iso/boot/archiso_ide.img
|
|
|
|
mkinitcpio -c initcpio-pata -b $(WORKDIR)-fallback/root-image -k $(kver) -g $(WORKDIR)-fallback/iso/boot/archiso_pata.img
|
|
|
|
#overlay
|
|
|
|
cp -r overlay $(WORKDIR)-fallback/
|
|
|
|
#ftp-iso
|
|
|
|
mkarchiso -f -p syslinux iso $(WORKDIR)-fallback $(FALLBACKname).iso
|
|
|
|
|
2008-12-21 09:20:56 +01:00
|
|
|
core-pkgs: base-iso
|
|
|
|
mkdir $(WORKDIR)/core-pkgs/
|
2009-01-18 02:09:55 +01:00
|
|
|
./download-repo.sh core "$(WORKDIR)/core-pkgs"
|
2008-12-21 09:20:56 +01:00
|
|
|
|
|
|
|
# Bootloaders
|
2008-12-19 09:02:00 +01:00
|
|
|
grub-gfx:
|
|
|
|
cp -r $(WORKDIR)/root-image/usr/lib/grub/i386-pc/* $(WORKDIR)/iso/boot/grub
|
|
|
|
|
|
|
|
grub:
|
|
|
|
cp -r $(WORKDIR)/root-image/usr/lib/grub/i386-pc/* $(WORKDIR)/iso/boot/grub
|
|
|
|
|
2008-12-23 10:03:05 +01:00
|
|
|
syslinux:
|
2008-12-19 09:02:00 +01:00
|
|
|
cp -r $(WORKDIR)/root-image/usr/lib/syslinux/isolinux.bin $(WORKDIR)/iso/boot/isolinux
|
|
|
|
|
2008-09-07 03:39:35 +02:00
|
|
|
clean:
|
2009-01-25 00:58:26 +01:00
|
|
|
rm -rf $(WORKDIR) $(WORKDIR)-fallback *.img.part1 $(FTPname).img $(FTPname).iso $(COREname).img $(COREname).iso $(FALLBACKname).iso
|