udev: Update to 125.
[people/pmueller/ipfire-2.x.git] / lfs / udev
CommitLineData
90d372c4 1###############################################################################
90d372c4 2# #
70df8302
MT
3# IPFire.org - A linux based firewall #
4# Copyright (C) 2007 Michael Tremer & Christian Schmidt #
5# #
6# This program is free software: you can redistribute it and/or modify #
90d372c4 7# it under the terms of the GNU General Public License as published by #
70df8302 8# the Free Software Foundation, either version 3 of the License, or #
90d372c4
MT
9# (at your option) any later version. #
10# #
70df8302 11# This program is distributed in the hope that it will be useful, #
90d372c4
MT
12# but WITHOUT ANY WARRANTY; without even the implied warranty of #
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14# GNU General Public License for more details. #
15# #
16# You should have received a copy of the GNU General Public License #
70df8302 17# along with this program. If not, see <http://www.gnu.org/licenses/>. #
90d372c4
MT
18# #
19###############################################################################
20
21###############################################################################
22# Definitions
23###############################################################################
24
25include Config
26
1ea989eb 27VER = 125
90d372c4
MT
28
29THISAPP = udev-$(VER)
1ea989eb 30DL_FILE = $(THISAPP).tar.gz
90d372c4
MT
31DL_FROM = $(URL_IPFIRE)
32DIR_APP = $(DIR_SRC)/$(THISAPP)
c66941dd
MT
33ifeq "$(LFS_PASS)" "install"
34 TARGET = $(DIR_INFO)/$(THISAPP)-install
35else
36 TARGET = $(DIR_INFO)/$(THISAPP)
37endif
90d372c4
MT
38
39###############################################################################
40# Top-level Rules
41###############################################################################
42
43objects = $(DL_FILE) udev-config-6.2.tar.bz2
44
45$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
46udev-config-6.2.tar.bz2 = $(DL_FROM)/udev-config-6.2.tar.bz2
47
1ea989eb 48$(DL_FILE)_MD5 = be98e04cefdd9ca76b8fe7e92735ce29
90d372c4
MT
49udev-config-6.2.tar.bz2_MD5 = 9ff2667ab0f7bfe8182966ef690078a0
50
51install : $(TARGET)
52
53check : $(patsubst %,$(DIR_CHK)/%,$(objects))
54
55download :$(patsubst %,$(DIR_DL)/%,$(objects))
56
57md5 : $(subst %,%_MD5,$(objects))
58
59###############################################################################
60# Downloading, checking, md5sum
61###############################################################################
62
63$(patsubst %,$(DIR_CHK)/%,$(objects)) :
64 @$(CHECK)
65
66$(patsubst %,$(DIR_DL)/%,$(objects)) :
67 @$(LOAD)
68
69$(subst %,%_MD5,$(objects)) :
70 @$(MD5)
71
72###############################################################################
73# Installation Details
74###############################################################################
75
76$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
77 @$(PREBUILD)
1ea989eb
MT
78 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
79 cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/udev-125-netif_rename.patch
c66941dd 80ifeq "$(LFS_PASS)" "install"
73d9a908
MT
81 cd $(DIR_APP) && make DESTDIR=/install/initrd sbindir=/sbin udevdir=/dev
82 cd $(DIR_APP) && make DESTDIR=/install/initrd sbindir=/sbin udevdir=/dev install
83 rm -f /install/initrd/sbin/udev* /install/initrd/usr/sbin/udev* /install/initrd/usr/bin/udev*
1ea989eb 84 cd $(DIR_APP) && install udevadm udevd /install/initrd/sbin
7bc1b6ac
MT
85 cd $(DIR_APP) && make $(MAKETUNING) EXTRAS="extras/ata_id extras/cdrom_id extras/edd_id \
86 extras/firmware extras/floppy extras/path_id \
87 extras/scsi_id extras/usb_id extras/volume_id"
88 cd $(DIR_APP) && make DESTDIR=/install/initrd EXTRAS="extras/ata_id extras/cdrom_id extras/edd_id \
89 extras/firmware extras/floppy extras/path_id \
90 extras/scsi_id extras/usb_id extras/volume_id" install
c66941dd 91 cd /install/initrd/usr/share && rm -rf man
1ea989eb 92 -mkdir -pv /install/initrd/dev
c66941dd
MT
93 cd /install/initrd/dev && rm -f console
94 cd /install/initrd/dev && mknod -m 0600 console c 5 1
95 cd /install/initrd/dev && rm -f null
96 cd /install/initrd/dev && mknod -m 0777 null c 1 3
97 cd /install/initrd/dev && rm -f tty*
98 cd /install/initrd/dev && mknod -m 0600 tty1 c 4 1
99 cd /install/initrd/dev && mknod -m 0600 tty2 c 4 2
100 cd /install/initrd/dev && mknod -m 0600 tty3 c 4 3
101 cd /install/initrd/dev && mknod -m 0600 tty4 c 4 4
102 cd /install/initrd/dev && mknod -m 0600 tty5 c 4 5
103 cd /install/initrd/dev && mknod -m 0600 tty6 c 4 6
c7445b87
AF
104 cp -f /etc/udev/rules.d/55-scsi-cdrom.rules /install/initrd/etc/udev/rules.d/55-scsi-cdrom.rules
105
c66941dd 106else
ef6396c0 107 rm -rf /lib/udev/devices
90d372c4 108 cd $(DIR_APP) && tar jxf $(DIR_DL)/udev-config-6.2.tar.bz2
c674e147
AF
109 install -dv /lib/{firmware,udev/devices/{pts,shm}}
110 echo "Put device firmwares here ..." > /lib/firmware/dirinfo
90d372c4
MT
111 mknod -m0666 /lib/udev/devices/null c 1 3
112 ln -sv /proc/self/fd /lib/udev/devices/fd
113 ln -sv /proc/self/fd/0 /lib/udev/devices/stdin
114 ln -sv /proc/self/fd/1 /lib/udev/devices/stdout
115 ln -sv /proc/self/fd/2 /lib/udev/devices/stderr
116 ln -sv /proc/kcore /lib/udev/devices/core
117 cd $(DIR_APP) && make $(MAKETUNING) EXTRAS="extras/ata_id extras/cdrom_id extras/edd_id \
118 extras/firmware extras/floppy extras/path_id \
119 extras/scsi_id extras/usb_id extras/volume_id"
120 cd $(DIR_APP) && make DESTDIR=/ EXTRAS="extras/ata_id extras/cdrom_id extras/edd_id \
121 extras/firmware extras/floppy extras/path_id \
122 extras/scsi_id extras/usb_id extras/volume_id" install
123 cd $(DIR_APP) && cp -v udev-config-6.2/[0-9]* /etc/udev/rules.d/
debeaeaa 124 cp -rf $(DIR_SRC)/config/udev/10-dvb.rules /etc/udev/rules.d/
c7445b87 125 cp -rf $(DIR_SRC)/config/udev/55-scsi-cdrom.rules /etc/udev/rules.d/
debeaeaa 126 chmod 644 /etc/udev/rules.d/10-dvb.rules
c7445b87 127 chmod 644 /etc/udev/rules.d/55-scsi-cdrom.rules
debeaeaa
AF
128 cp -rf $(DIR_SRC)/config/udev/dvb.sh /etc/udev/
129 chmod 755 /etc/udev/dvb.sh
59de0b00 130 touch /etc/udev/rules.d/30-persistent-network.rules
ef6396c0 131 cp -vf $(DIR_SRC)/config/udev/blacklist /etc/modprobe.d/blacklist
c66941dd 132endif
90d372c4
MT
133 @rm -rf $(DIR_APP)
134 @$(POSTBUILD)