4
ARCH := $(shell dpkg --print-architecture)
5
setarchdevs = $(if $(findstring $(ARCH),$(1)),$(2))
7
DEVS := generic hde hdf hdg hdh sde sdf sdg sdh scd-all initrd input usb md lp rtc video \
8
$(call setarchdevs,i386,isdn-io eda edb sonycd mcd mcdx cdu535 \
9
optcd sjcd cm206cd gscd lmscd sbpcd \
10
aztcd bpcd dac960 ida fd0 fd1 ataraid cciss) \
11
$(call setarchdevs,sparc,hdc hdd busmice) \
12
$(call setarchdevs,m68k,fd0 fd1 adc add ade adf hdc hdd) \
13
$(call setarchdevs,powerpc,hdc hdd fd0 fd1 isdn-io m68k-mice) \
14
$(call setarchdevs,ia64,ida fd0 fd1 ataraid cciss)
16
all: pkgdetails devices.tar.gz debootstrap-arch
18
rm -f pkgdetails pkgdetails.o devices.tar.gz debootstrap-arch
21
DSDIR=$(DESTDIR)/usr/lib/debootstrap
23
mkdir -p $(DSDIR)/scripts
24
mkdir -p $(DESTDIR)/usr/sbin
25
mkdir -p $(DESTDIR)/usr/share/man/man8
26
install -o root -g root -m 0644 slink $(DSDIR)/scripts/
27
install -o root -g root -m 0644 potato $(DSDIR)/scripts/
28
install -o root -g root -m 0644 woody $(DSDIR)/scripts/
29
install -o root -g root -m 0644 sarge $(DSDIR)/scripts/
30
install -o root -g root -m 0644 sid $(DSDIR)/scripts/
31
install -o root -g root -m 0644 woody.buildd $(DSDIR)/scripts/
32
install -o root -g root -m 0644 sarge.buildd $(DSDIR)/scripts/
33
install -o root -g root -m 0644 sid.buildd $(DSDIR)/scripts/
34
install -o root -g root -m 0644 functions $(DSDIR)/
35
install -o root -g root -m 0755 pkgdetails $(DSDIR)/
36
install -o root -g root -m 0644 devices.tar.gz $(DSDIR)/
37
install -o root -g root -m 0644 debootstrap-arch $(DSDIR)/arch
38
install -o root -g root -m 0755 debootstrap.8 $(DESTDIR)/usr/share/man/man8/
39
install -o root -g root -m 0755 debootstrap $(DESTDIR)/usr/sbin/
41
pkgdetails: pkgdetails.o
45
echo $(ARCH) >debootstrap-arch
54
(cd dev && /dev/MAKEDEV $(DEVS))
56
ifeq ($(ARCH),powerpc)
57
# Maybe remove amiga/atari mice also? What about usbmouse?
59
ln -sf input/mice dev/mouse
60
ln -sf input/js0 dev/js0
61
ln -sf input/js1 dev/js1
64
@if ! find dev -maxdepth 0 -perm 755 -uid 0 -gid 0 | \
67
echo "======================================================="; \
69
echo "./dev has bad permissions! should be 755 root.root. Was:"; \
71
echo "======================================================="; \
75
tar cf - dev | gzip -9 >devices.tar.gz