]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - lfs/udev
QoS-Update - Komplette grafische Ueberarbeitung
[people/pmueller/ipfire-2.x.git] / lfs / udev
1 ###############################################################################
2 # This file is part of the IPCop Firewall. #
3 # #
4 # IPCop is free software; you can redistribute it and/or modify #
5 # it under the terms of the GNU General Public License as published by #
6 # the Free Software Foundation; either version 2 of the License, or #
7 # (at your option) any later version. #
8 # #
9 # IPCop is distributed in the hope that it will be useful, #
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
12 # GNU General Public License for more details. #
13 # #
14 # You should have received a copy of the GNU General Public License #
15 # along with IPCop; if not, write to the Free Software #
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
17 # #
18 # Makefiles are based on LFSMake, which is #
19 # Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
20 # #
21 ###############################################################################
22
23 ###############################################################################
24 # Definitions
25 ###############################################################################
26
27 include Config
28
29 VER = 096
30
31 THISAPP = udev-$(VER)
32 DL_FILE = $(THISAPP).tar.bz2
33 DL_FROM = $(URL_IPFIRE)
34 DIR_APP = $(DIR_SRC)/$(THISAPP)
35 ifeq "$(LFS_PASS)" "install"
36 TARGET = $(DIR_INFO)/$(THISAPP)-install
37 else
38 TARGET = $(DIR_INFO)/$(THISAPP)
39 endif
40
41 ###############################################################################
42 # Top-level Rules
43 ###############################################################################
44
45 objects = $(DL_FILE) udev-config-6.2.tar.bz2
46
47 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
48 udev-config-6.2.tar.bz2 = $(DL_FROM)/udev-config-6.2.tar.bz2
49
50 $(DL_FILE)_MD5 = f4effef7807ce1dc91ab581686ef197b
51 udev-config-6.2.tar.bz2_MD5 = 9ff2667ab0f7bfe8182966ef690078a0
52
53 install : $(TARGET)
54
55 check : $(patsubst %,$(DIR_CHK)/%,$(objects))
56
57 download :$(patsubst %,$(DIR_DL)/%,$(objects))
58
59 md5 : $(subst %,%_MD5,$(objects))
60
61 ###############################################################################
62 # Downloading, checking, md5sum
63 ###############################################################################
64
65 $(patsubst %,$(DIR_CHK)/%,$(objects)) :
66 @$(CHECK)
67
68 $(patsubst %,$(DIR_DL)/%,$(objects)) :
69 @$(LOAD)
70
71 $(subst %,%_MD5,$(objects)) :
72 @$(MD5)
73
74 ###############################################################################
75 # Installation Details
76 ###############################################################################
77
78 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
79 @$(PREBUILD)
80 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
81 ifeq "$(LFS_PASS)" "install"
82 cd $(DIR_APP) && make DESTDIR=/install/initrd sbindir=/sbin udevdir=/dev
83 cd $(DIR_APP) && make DESTDIR=/install/initrd sbindir=/sbin udevdir=/dev install
84 rm -f /install/initrd/sbin/udev* /install/initrd/usr/sbin/udev* /install/initrd/usr/bin/udev*
85 cd $(DIR_APP) && install udevstart /install/initrd/sbin
86 cd /install/initrd/usr/share && rm -rf man
87 cd /install/initrd/dev && rm -f console
88 cd /install/initrd/dev && mknod -m 0600 console c 5 1
89 cd /install/initrd/dev && rm -f null
90 cd /install/initrd/dev && mknod -m 0777 null c 1 3
91 cd /install/initrd/dev && rm -f tty*
92 cd /install/initrd/dev && mknod -m 0600 tty1 c 4 1
93 cd /install/initrd/dev && mknod -m 0600 tty2 c 4 2
94 cd /install/initrd/dev && mknod -m 0600 tty3 c 4 3
95 cd /install/initrd/dev && mknod -m 0600 tty4 c 4 4
96 cd /install/initrd/dev && mknod -m 0600 tty5 c 4 5
97 cd /install/initrd/dev && mknod -m 0600 tty6 c 4 6
98 else
99 cd $(DIR_APP) && tar jxf $(DIR_DL)/udev-config-6.2.tar.bz2
100 install -dv /lib/{firmware,udev/devices/{pts,shm}}
101 mknod -m0666 /lib/udev/devices/null c 1 3
102 ln -sv /proc/self/fd /lib/udev/devices/fd
103 ln -sv /proc/self/fd/0 /lib/udev/devices/stdin
104 ln -sv /proc/self/fd/1 /lib/udev/devices/stdout
105 ln -sv /proc/self/fd/2 /lib/udev/devices/stderr
106 ln -sv /proc/kcore /lib/udev/devices/core
107 cd $(DIR_APP) && make $(MAKETUNING) EXTRAS="extras/ata_id extras/cdrom_id extras/edd_id \
108 extras/firmware extras/floppy extras/path_id \
109 extras/scsi_id extras/usb_id extras/volume_id"
110 cd $(DIR_APP) && make DESTDIR=/ EXTRAS="extras/ata_id extras/cdrom_id extras/edd_id \
111 extras/firmware extras/floppy extras/path_id \
112 extras/scsi_id extras/usb_id extras/volume_id" install
113 cd $(DIR_APP) && cp -v udev-config-6.2/[0-9]* /etc/udev/rules.d/
114 endif
115 @rm -rf $(DIR_APP)
116 @$(POSTBUILD)