2009-07-26 11:04:25 +02:00
|
|
|
ver=2009.08
|
2009-07-24 19:00:46 +02:00
|
|
|
kver=2.6.30-ARCH
|
2008-10-21 06:41:54 +02:00
|
|
|
|
2008-12-19 05:08:38 +01:00
|
|
|
WORKDIR=work
|
|
|
|
|
2009-01-30 19:50:06 +01:00
|
|
|
ARCH?=`uname -m`
|
2008-12-21 09:20:56 +01:00
|
|
|
BOOTLOADER?=grub-gfx
|
|
|
|
|
|
|
|
PWD:=`pwd`
|
2009-07-26 11:04:25 +02:00
|
|
|
NETname:=$(PWD)/archlinux-$(ver)-netinstall-$(ARCH)
|
2008-12-21 09:20:56 +01:00
|
|
|
COREname:=$(PWD)/archlinux-$(ver)-core-$(ARCH)
|
|
|
|
|
2009-07-24 19:00:46 +02:00
|
|
|
PACKAGES="$(shell cat packages.$(ARCH)) $(BOOTLOADER)"
|
2008-09-07 03:39:35 +02:00
|
|
|
|
2009-07-26 11:04:25 +02:00
|
|
|
all: net-iso net-usb core-iso core-usb
|
|
|
|
all-iso: net-iso core-iso
|
|
|
|
all-usb: net-usb core-usb
|
|
|
|
all-net: net-iso net-usb
|
2008-12-23 08:36:38 +01:00
|
|
|
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
|
|
|
|
2009-07-26 11:04:25 +02:00
|
|
|
net-usb: overlay $(BOOTLOADER)
|
|
|
|
mkarchiso -f -p $(BOOTLOADER) usb $(WORKDIR) $(NETname).img
|
2008-09-07 03:39:35 +02:00
|
|
|
|
2009-07-26 11:04:25 +02:00
|
|
|
net-iso: overlay $(BOOTLOADER)
|
|
|
|
mkarchiso -f -p $(BOOTLOADER) iso $(WORKDIR) $(NETname).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-08-23 18:30:24 +02:00
|
|
|
if [ ! -d $(WORKDIR)/overlay/etc/pacman.d ]; then \
|
|
|
|
mkdir -m755 $(WORKDIR)/overlay/etc/pacman.d; \
|
|
|
|
fi
|
2009-07-24 19:03:14 +02:00
|
|
|
wget -O $(WORKDIR)/overlay/etc/pacman.d/mirrorlist http://www.archlinux.org/mirrorlist/$(ARCH)/all/
|
|
|
|
sed -i "s/#Server/Server/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
|
|
|
|
2009-07-26 11:00:44 +02: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
|
|
|
|
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-07-26 11:04:25 +02:00
|
|
|
rm -rf $(WORKDIR) *.img.part1 $(NETname).img $(NETname).iso $(COREname).img $(COREname).iso
|