~ubuntu-branches/ubuntu/gutsy/debootstrap/gutsy-backports

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson, warty
  • Date: 2004-10-13 00:02:10 UTC
  • Revision ID: james.westby@ubuntu.com-20041013000210-6kxir6wy5l3x0qm0
Tags: 0.2.39ubuntu22
[warty] Remove pcmcia-cs from Base.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
CC=gcc
 
2
CFLAGS=-Wall -W -O2
 
3
 
 
4
ARCH := $(shell dpkg --print-architecture)
 
5
setarchdevs = $(if $(findstring $(ARCH),$(1)),$(2))
 
6
 
 
7
DEVS := generic hde hdf hdg hdh sde sdf sdg sdh scd-all initrd input usb md lp rtc \
 
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
 
 
15
all: pkgdetails devices.tar.gz debootstrap-arch
 
16
clean:
 
17
        rm -f pkgdetails pkgdetails.o devices.tar.gz debootstrap-arch
 
18
        rm -rf dev
 
19
 
 
20
DSDIR=$(DESTDIR)/usr/lib/debootstrap
 
21
install:
 
22
        mkdir -p $(DSDIR)/scripts
 
23
        mkdir -p $(DESTDIR)/usr/sbin
 
24
        mkdir -p $(DESTDIR)/usr/share/man/man8
 
25
        install -o root -g root -m 0644 slink $(DSDIR)/scripts/
 
26
        install -o root -g root -m 0644 potato $(DSDIR)/scripts/
 
27
        install -o root -g root -m 0644 woody $(DSDIR)/scripts/
 
28
        install -o root -g root -m 0644 sarge $(DSDIR)/scripts/
 
29
        install -o root -g root -m 0644 sid $(DSDIR)/scripts/
 
30
        install -o root -g root -m 0644 warty $(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 warty.buildd $(DSDIR)/scripts/
 
35
        install -o root -g root -m 0644 functions $(DSDIR)/
 
36
        install -o root -g root -m 0755 pkgdetails $(DSDIR)/
 
37
        install -o root -g root -m 0644 devices.tar.gz $(DSDIR)/
 
38
        install -o root -g root -m 0644 debootstrap-arch $(DSDIR)/arch
 
39
        install -o root -g root -m 0755 debootstrap.8 $(DESTDIR)/usr/share/man/man8/
 
40
        install -o root -g root -m 0755 debootstrap $(DESTDIR)/usr/sbin/
 
41
 
 
42
pkgdetails: pkgdetails.o
 
43
        $(CC) -o $@ $^
 
44
 
 
45
debootstrap-arch:
 
46
        echo $(ARCH) >debootstrap-arch
 
47
 
 
48
devices.tar.gz:
 
49
        rm -rf dev
 
50
 
 
51
        mkdir -p dev
 
52
        chown 0.0 dev
 
53
        chmod 755 dev
 
54
 
 
55
        (cd dev && /dev/MAKEDEV $(DEVS))
 
56
 
 
57
ifeq ($(ARCH),powerpc)
 
58
#       Maybe remove amiga/atari mice also? What about usbmouse?
 
59
        rm -f dev/adbmouse
 
60
        ln -sf input/mice dev/mouse
 
61
        ln -sf input/js0 dev/js0
 
62
        ln -sf input/js1 dev/js1
 
63
endif
 
64
 
 
65
        @if ! find dev -maxdepth 0 -perm 755 -uid 0 -gid 0 | \
 
66
                grep -q "^dev$$"; \
 
67
        then \
 
68
           echo "======================================================="; \
 
69
           echo "ERROR"; echo; \
 
70
           echo "./dev has bad permissions! should be 755 root.root. Was:"; \
 
71
           ls -ld ./dev; \
 
72
           echo "======================================================="; \
 
73
           false; \
 
74
        fi
 
75
 
 
76
        tar cf - dev | gzip -9 >devices.tar.gz
 
77
        rm -rf dev