~ubuntu-branches/ubuntu/oneiric/debootstrap/oneiric

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2005-02-25 22:23:30 UTC
  • Revision ID: james.westby@ubuntu.com-20050225222330-dunyf2rhdn7nouyr
Tags: 0.2.45-0.2
* Non-maintainer upload.
* [sarge, sid] Replace libparted1.6-0 with libparted1.6-12 for ia64,
  to keep up with the ABI changes for that package. (Closes: #295571)
* [sarge, sid] include pciutils on hppa as well, per request of the
  hppa folks. (Closes: #283752)

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 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)
 
15
 
 
16
all: pkgdetails devices.tar.gz debootstrap-arch
 
17
clean:
 
18
        rm -f pkgdetails pkgdetails.o devices.tar.gz debootstrap-arch
 
19
        rm -rf dev
 
20
 
 
21
DSDIR=$(DESTDIR)/usr/lib/debootstrap
 
22
install:
 
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/
 
40
 
 
41
pkgdetails: pkgdetails.o
 
42
        $(CC) -o $@ $^
 
43
 
 
44
debootstrap-arch:
 
45
        echo $(ARCH) >debootstrap-arch
 
46
 
 
47
devices.tar.gz:
 
48
        rm -rf dev
 
49
 
 
50
        mkdir -p dev
 
51
        chown 0:0 dev
 
52
        chmod 755 dev
 
53
 
 
54
        (cd dev && /dev/MAKEDEV $(DEVS))
 
55
 
 
56
ifeq ($(ARCH),powerpc)
 
57
#       Maybe remove amiga/atari mice also? What about usbmouse?
 
58
        rm -f dev/adbmouse
 
59
        ln -sf input/mice dev/mouse
 
60
        ln -sf input/js0 dev/js0
 
61
        ln -sf input/js1 dev/js1
 
62
endif
 
63
 
 
64
        @if ! find dev -maxdepth 0 -perm 755 -uid 0 -gid 0 | \
 
65
                grep -q "^dev$$"; \
 
66
        then \
 
67
           echo "======================================================="; \
 
68
           echo "ERROR"; echo; \
 
69
           echo "./dev has bad permissions! should be 755 root.root. Was:"; \
 
70
           ls -ld ./dev; \
 
71
           echo "======================================================="; \
 
72
           false; \
 
73
        fi
 
74
 
 
75
        tar cf - dev | gzip -9 >devices.tar.gz
 
76
        rm -rf dev